]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* configure.ac: Add -static to LDFLAGS when using apple linker to
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 25 Nov 2013 04:47:20 +0000 (05:47 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 25 Nov 2013 04:47:20 +0000 (05:47 +0100)
prevent it from pulling in dynamic linker.

ChangeLog
configure.ac

index 821ab2481e704807fc1614c3e8fdb9acef0a97e7..8c3ffe2db8502dc3533454f12c35aa9213eb51f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-24  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * configure.ac: Add -static to LDFLAGS when using apple linker to
+       prevent it from pulling in dynamic linker.
+
 2013-11-24  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Apple assembly doesn't handle symbol arithmetic well. So define an
index 8619a676e468d543fac529379f21025a6a8ca048..d1292c9c1aa0bc4efeb2ea6d4245f6ddeeb11fee 100644 (file)
@@ -673,8 +673,8 @@ if test x"$target_cpu" = xi386 || test x"$target_cpu" = xx86_64; then
       if test x${target_cpu} != xi386 && test x$format = x${target_cpu}pe; then
         continue
       fi
-      CFLAGS="$TARGET_CFLAGS -static"
-      LDFLAGS="$TARGET_LDFLAGS -Wl,$format -nostdlib"
+      CFLAGS="$TARGET_CFLAGS"
+      LDFLAGS="$TARGET_LDFLAGS -Wl,$format -nostdlib -static"
       AC_LINK_IFELSE([AC_LANG_PROGRAM([[
       asm (".globl start; start:");
       asm (".globl _start; _start:");
@@ -825,7 +825,7 @@ fi
 # Set them to their new values for the tests below.
 CC="$TARGET_CC"
 if test "x$TARGET_APPLE_LINKER" = x1 ; then
-CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
+CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
 else
 CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wno-error"
 fi
@@ -851,7 +851,7 @@ fi
 AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __ucmpdi2 _restgpr_14_x)
 
 if test "x$TARGET_APPLE_LINKER" = x1 ; then
-CFLAGS="$TARGET_CFLAGS -nostdlib"
+CFLAGS="$TARGET_CFLAGS -nostdlib -static"
 else
 CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
 fi