From e20f1a62d3d2ee96aab5ca55e3a2e1daf9f18b25 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Wed, 28 Aug 2019 00:29:20 +0300 Subject: [PATCH] Put LFLAGS last for linker For some reason, some versions of the GNU linker will fail to find libraries if the -l flags are listed before the .o files to be linked. --- scripts/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index f2dafaf..24080d8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -117,7 +117,7 @@ $CC $CFLAGS -c ../c/time_unix.c $CC $CFLAGS -c ../c/utf8.c $CC $CFLAGS -c ../c/boot_image.c -$CC $LFLAGS -o upscheme $o_files +$CC -o upscheme $o_files $LFLAGS { set +x; } 2>/dev/null cd ../scheme-core @@ -134,7 +134,7 @@ echo "Entering directory '$PWD'" set -x $CC $CFLAGS -c ../c/boot_image.c -$CC $LFLAGS -o upscheme $o_files +$CC -o upscheme $o_files $LFLAGS { set +x; } 2>/dev/null cd ../scheme-core @@ -151,7 +151,7 @@ echo "Entering directory '$PWD'" set -x $CC $CFLAGS -c ../c/boot_image.c -$CC $LFLAGS -o upscheme $o_files +$CC -o upscheme $o_files $LFLAGS { set +x; } 2>/dev/null cd ../scheme-tests