]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Thu, 18 Jun 2009 14:02:23 +0000 (14:02 +0000)
committerphcoder <phcoder@localhost>
Thu, 18 Jun 2009 14:02:23 +0000 (14:02 +0000)
Fix build with Apple's toolchain. Part 1

* commands/i386/pc/drivemap_int13h.S: use assembly-time constants
for long calls
* configure.ac: remove a leftover AC_MSG_RESULT
(CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
Apple's toolchain

ChangeLog
commands/i386/pc/drivemap_int13h.S
configure.ac

index 589fad1f6a2a83542ca29888abaed5c02fc3308d..94109604a340910597336b2fa3ed4045a08a7798 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Fix build with Apple's toolchain. Part 1
+
+       * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
+       for long calls
+       * configure.ac: remove a leftover AC_MSG_RESULT
+       (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with 
+       Apple's toolchain
+
 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Fix warnings
index 542da09007c5c37af5dae14858b92364683718e6..440349685c91ab68a8a843e615b487c29ce29f83 100644 (file)
@@ -66,7 +66,12 @@ not_found:
        popf
        pushf
 
+#ifdef APPLE_CC
+       grub_drivemap_oldhandler_ofs = INT13H_OFFSET (EXT_C (grub_drivemap_oldhandler))
+       lcall *%cs:grub_drivemap_oldhandler_ofs
+#else
        lcall *%cs:INT13H_OFFSET (EXT_C (grub_drivemap_oldhandler))
+#endif
 
        push    %bp
        mov     %sp, %bp
@@ -89,7 +94,11 @@ norestore:
        popf
        pushf
 
+#ifdef APPLE_CC
+       lcall *%cs:grub_drivemap_oldhandler_ofs
+#else
        lcall *%cs:INT13H_OFFSET (EXT_C (grub_drivemap_oldhandler))
+#endif
 
        push    %bp
        mov     %sp, %bp
index 371c32d03ba17ce349838eadb809da9f2e68bcbb..a8cb234682c0362d453b88755bd049549291d4d4 100644 (file)
@@ -308,7 +308,6 @@ fi
 AC_SUBST(TARGET_IMG_LDSCRIPT)
 AC_SUBST(TARGET_IMG_LDFLAGS)
 AC_SUBST(TARGET_IMG_CFLAGS)
-AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC])
 
 # For platforms where ELF is not the default link format.
 AC_MSG_CHECKING([for command to convert module to ELF format])
@@ -396,7 +395,11 @@ AC_SUBST(TARGET_LDFLAGS)
 
 # 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"
+else
 CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
+fi
 CPPFLAGS="$TARGET_CPPFLAGS"
 LDFLAGS="$TARGET_LDFLAGS"