tools: put -lm after objects
authorJean Privat <jean@pryen.org>
Mon, 6 Feb 2012 20:27:48 +0000 (15:27 -0500)
committerJean Privat <jean@pryen.org>
Thu, 9 Feb 2012 19:11:01 +0000 (14:11 -0500)
As requested by some linkers that use by default --as-needed, libraries
must appears after objects that use them.

The problem was first noticed with Ubuntu 11.10 but some other systems
may use it soon or latter.

Signed-off-by: Jean Privat <jean@pryen.org>

bin/gccx

index 83f8c9f..3f2890d 100755 (executable)
--- a/bin/gccx
+++ b/bin/gccx
@@ -158,6 +158,6 @@ fi
 done
 
 if [ $vverbose = true  ] ; then
-       echo "* $CC $OPTS -lm $objs -o $out" >&2
+       echo "* $CC $OPTS $objs -lm -o $out" >&2
 fi
-$CC $OPTS -lm $objs -o "$out"
+$CC $OPTS $objs -lm -o "$out"