]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-01-23 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 23 Jan 2010 21:56:08 +0000 (22:56 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 23 Jan 2010 21:56:08 +0000 (22:56 +0100)
* configure.ac: Check for libgcc symbols with -nostdlib.

ChangeLog
configure.ac

index 9bb6b1c01373bda2d4f5f6979e9156d7a82dfc2e..cec7af8a52161d3582d338c25e9665bac3f2cdc5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * configure.ac: Check for libgcc symbols with -nostdlib.
+
 2010-01-23  BVK Chaitanya  <bvk.groups@gmail.com>
 
        * acinclude.m4: Quote underquoted AC_DEFUN parameters.
index f621b5648548fd43cd65843f51206424ea45790f..012aef96ebce86c1f96561aef9ae63ba53c68fc7 100644 (file)
@@ -438,18 +438,25 @@ AC_SUBST(TARGET_ASFLAGS)
 AC_SUBST(TARGET_CPPFLAGS)
 AC_SUBST(TARGET_LDFLAGS)
 
-# Check for libgcc symbols (must be performed before we add -nostdlib to LDFLAGS)
-AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x)
-
 # Set them to their new values for the tests below.
 CC="$TARGET_CC"
 if test "x$TARGET_APPLE_CC" = x1 ; then
-CFLAGS="$TARGET_CFLAGS -nostdlib"
+CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
 else
-CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
+CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wl,--defsym,abort=main -Wno-error"
 fi
 CPPFLAGS="$TARGET_CPPFLAGS"
 LDFLAGS="$TARGET_LDFLAGS"
+LIBS=-lgcc
+
+# Check for libgcc symbols
+AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x)
+
+if test "x$TARGET_APPLE_CC" = x1 ; then
+CFLAGS="$TARGET_CFLAGS -nostdlib"
+else
+CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
+fi
 
 # Defined in aclocal.m4.
 grub_PROG_TARGET_CC