]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/Makefile.am (efiemu): Remove leftover -DAPPLE_CC and
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 10 Nov 2013 12:13:41 +0000 (13:13 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 10 Nov 2013 12:13:41 +0000 (13:13 +0100)
-DELF.
* grub-core/efiemu/runtime/config.h: Use __i386__ and __x86_64__
instead of ELF*.

ChangeLog
grub-core/Makefile.am
grub-core/efiemu/runtime/config.h

index 29d59587bfdf2844f7a27107f47a6b7697bcd828..368dcf19b3d8818ed013c7d21a4ac65277726b98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2013-11-09  Vladimir Serbinenko  <phcoder@gmail.com>
+2013-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/Makefile.am (efiemu): Remove leftover -DAPPLE_CC and
+       -DELF.
+       * grub-core/efiemu/runtime/config.h: Use __i386__ and __x86_64__
+       instead of ELF*.
+
+2013-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * configure.ac: Restore CFLAGS to TARGET_CFLAGS before external tests.
        Add -march=core2 when testing compile of efiemu64.
index 980acf34607a7fcb29dcebead39fc281f8cf93a2..6c20c7d590ac01ff099c086b5d4b088d93613bd9 100644 (file)
@@ -390,27 +390,27 @@ if COND_ENABLE_EFIEMU
 efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
        -rm -f $@; \
        if test "x$(TARGET_APPLE_CC)" = x1; then \
-         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -DAPPLE_CC -m32 -Wall -Werror -nostdlib -O2 -c -o $@.bin $< || exit 1; \
+         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -O2 -c -o $@.bin $< || exit 1; \
          $(OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
          rm -f $@.bin; \
        else \
-         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -m32 -Wall -Werror -nostdlib -O2 -c -o $@ $< || exit 1; \
+         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -O2 -c -o $@ $< || exit 1; \
          if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
        fi
 
 efiemu64_c.o: efiemu/runtime/efiemu.c
        if test "x$(TARGET_APPLE_CC)" = x1; then \
-         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -nostdlib -Wall -Werror -mno-red-zone -c -o $@ $< || exit 1; \
+         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -mno-red-zone -c -o $@ $< || exit 1; \
        else \
-         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
+         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
        fi
 
 efiemu64_s.o: efiemu/runtime/efiemu.S
        -rm -f $@
        if test "x$(TARGET_APPLE_CC)" = x1; then \
-         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -Wall -Werror -nostdlib -O2 -mno-red-zone -c -o $@ $< || exit 1; \
+         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mno-red-zone -c -o $@ $< || exit 1; \
        else \
-         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
+         $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
        fi
 
 efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
index 26fb2ff08384607e85675e6217eefaacdd3d517c..c9fe0271661a4e1f536da0a7407022db4f202d3e 100644 (file)
 
 #define GRUB_TYPES_CPU_HEADER  1
 
-#ifdef ELF32
+#ifdef __i386__
 # define SIZEOF_VOID_P 4
 # define SIZEOF_LONG   4
 # define GRUB_TARGET_SIZEOF_VOID_P     4
 # define GRUB_TARGET_SIZEOF_LONG       4
 # define EFI_FUNC(x) x
-#else
+#elif defined (__x86_64__)
 # define SIZEOF_VOID_P 8
 # define SIZEOF_LONG   8
 # define GRUB_TARGET_SIZEOF_VOID_P     8
 # define GRUB_TARGET_SIZEOF_LONG       8
 # define EFI_FUNC(x) x ## _real
+#else
+#error "Unknown architecture"
 #endif