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
This commit is contained in:
parent
09b3490b9d
commit
26de2bcdf2
3 changed files with 23 additions and 1 deletions
10
ChangeLog
10
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>
|
2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Fix warnings
|
Fix warnings
|
||||||
|
|
|
@ -66,7 +66,12 @@ not_found:
|
||||||
popf
|
popf
|
||||||
pushf
|
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))
|
lcall *%cs:INT13H_OFFSET (EXT_C (grub_drivemap_oldhandler))
|
||||||
|
#endif
|
||||||
|
|
||||||
push %bp
|
push %bp
|
||||||
mov %sp, %bp
|
mov %sp, %bp
|
||||||
|
@ -89,7 +94,11 @@ norestore:
|
||||||
popf
|
popf
|
||||||
pushf
|
pushf
|
||||||
|
|
||||||
|
#ifdef APPLE_CC
|
||||||
|
lcall *%cs:grub_drivemap_oldhandler_ofs
|
||||||
|
#else
|
||||||
lcall *%cs:INT13H_OFFSET (EXT_C (grub_drivemap_oldhandler))
|
lcall *%cs:INT13H_OFFSET (EXT_C (grub_drivemap_oldhandler))
|
||||||
|
#endif
|
||||||
|
|
||||||
push %bp
|
push %bp
|
||||||
mov %sp, %bp
|
mov %sp, %bp
|
||||||
|
|
|
@ -308,7 +308,6 @@ fi
|
||||||
AC_SUBST(TARGET_IMG_LDSCRIPT)
|
AC_SUBST(TARGET_IMG_LDSCRIPT)
|
||||||
AC_SUBST(TARGET_IMG_LDFLAGS)
|
AC_SUBST(TARGET_IMG_LDFLAGS)
|
||||||
AC_SUBST(TARGET_IMG_CFLAGS)
|
AC_SUBST(TARGET_IMG_CFLAGS)
|
||||||
AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC])
|
|
||||||
|
|
||||||
# For platforms where ELF is not the default link format.
|
# For platforms where ELF is not the default link format.
|
||||||
AC_MSG_CHECKING([for command to convert module to ELF 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.
|
# Set them to their new values for the tests below.
|
||||||
CC="$TARGET_CC"
|
CC="$TARGET_CC"
|
||||||
|
if test "x$TARGET_APPLE_CC" = x1 ; then
|
||||||
|
CFLAGS="$TARGET_CFLAGS -nostdlib"
|
||||||
|
else
|
||||||
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
|
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
|
||||||
|
fi
|
||||||
CPPFLAGS="$TARGET_CPPFLAGS"
|
CPPFLAGS="$TARGET_CPPFLAGS"
|
||||||
LDFLAGS="$TARGET_LDFLAGS"
|
LDFLAGS="$TARGET_LDFLAGS"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue