aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-05-09 11:26:33 -0700
committerMichael Forney <mforney@mforney.org>2019-05-09 11:26:33 -0700
commitc1c71a0f08781a5e92ebd50abb996800a57b3ca1 (patch)
treebf0c7325431d6a7cac16797e4980c6a67a5c2105
parent4e408708a1c0a3ab4a9a30f5e043e3d328bc8062 (diff)
Fix ordering of endfiles
-lc should come before crtn.o.
-rwxr-xr-xconfigure6
1 files changed, 3 insertions, 3 deletions
diff --git a/configure b/configure
index ca65faf..4337c75 100755
--- a/configure
+++ b/configure
@@ -66,7 +66,7 @@ case "$target" in
*) fail "unsuported target '$target'"
esac
startfiles='"-l", ":crt1.o", "-l", ":crti.o"'
- endfiles='"-l", ":crtn.o", "-l", "c"'
+ endfiles='"-l", "c", "-l", ":crtn.o"'
;;
*-linux-*gnu*)
test "$DEFAULT_DYNAMIC_LINKER" || case "$target" in
@@ -75,7 +75,7 @@ case "$target" in
*) fail "unsuported target '$target'"
esac
startfiles='"-l", ":crt1.o", "-l", ":crti.o", "-l", ":crtbegin.o"'
- endfiles='"-l", ":crtend.o", "-l", ":crtn.o", "-l", "c"'
+ endfiles='"-l", "c", "-l", ":crtend.o", "-l", ":crtn.o"'
if [ -z "$gcclibdir" ] ; then
test "$host" = "$target" || fail "gcc libdir must be specified when building a cross-compiler"
crtbegin=$($CC -print-file-name=crtbegin.o 2>/dev/null)
@@ -90,7 +90,7 @@ case "$target" in
*-*freebsd*)
: ${DEFAULT_DYNAMIC_LINKER:=/libexec/ld-elf.so.1}
startfiles='"-l", ":crt1.o", "-l", ":crti.o"'
- endfiles='"-l", ":crtn.o", "-l", "c"'
+ endfiles='"-l", "c", "-l", ":crtn.o"'
# any value of __GNUC__ will cause FreeBSD's headers to use asm for bswap
gnuc=
linkflags='"-L", "/usr/lib"',