Commit cb71ba20 authored by proski's avatar proski

2008-07-02 Pavel Roskin <proski@gnu.org>

	* Makefile.in (MODULE_LDFLAGS): New variable.
	* aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
	the linker accepts --build-id=none.
	* configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
	MODULE_LDFLAGS.
	* genmk.rb: Use MODULE_LDFLAGS when linking modules.
parent d4c9b428
2008-07-02 Pavel Roskin <proski@gnu.org>
* Makefile.in (MODULE_LDFLAGS): New variable.
* aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
the linker accepts --build-id=none.
* configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
MODULE_LDFLAGS.
* genmk.rb: Use MODULE_LDFLAGS when linking modules.
* fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
those in Linux XFS code. Provide a way to access 64-bit parent
inode.
......
......@@ -68,6 +68,7 @@ TARGET_CFLAGS = @TARGET_CFLAGS@
TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I. -Iinclude -I$(srcdir)/include \
-Wall -W
TARGET_LDFLAGS = @TARGET_LDFLAGS@
MODULE_LDFLAGS = @MODULE_LDFLAGS@
OBJCOPY = @OBJCOPY@
STRIP = @STRIP@
NM = @NM@
......
......@@ -81,6 +81,26 @@ fi
])
dnl Supply --build-id=none to ld if building modules.
dnl This suppresses warnings from ld on some systems
AC_DEFUN(grub_PROG_LD_BUILD_ID_NONE,
[AC_MSG_CHECKING([whether linker accepts --build-id=none])
AC_CACHE_VAL(grub_cv_prog_ld_build_id_none,
[save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--build-id=none"
AC_TRY_LINK([], [],
grub_cv_prog_ld_build_id_none=yes,
grub_cv_prog_ld_build_id_none=no)
LDFLAGS="$save_LDFLAGS"
])
AC_MSG_RESULT([$grub_cv_prog_ld_build_id_none])
if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
MODULE_LDFLAGS="$MODULE_LDFLAGS -Wl,--build-id=none"
fi
])
dnl Mass confusion!
dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
dnl instructions, but implicitly insert addr32 and data32 bytes so
......
This diff is collapsed.
......@@ -137,7 +137,7 @@ UNDSYMFILES += und-kernel.lst
kernel.mod: pre-kernel.o mod-kernel.o
-rm -f $@
$(TARGET_CC) $(kernel_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(kernel_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-kernel.o: $(kernel_mod_DEPENDENCIES) kernel_mod-kern_i386_efi_startup.o kernel_mod-kern_main.o kernel_mod-kern_device.o kernel_mod-kern_disk.o kernel_mod-kern_dl.o kernel_mod-kern_file.o kernel_mod-kern_fs.o kernel_mod-kern_err.o kernel_mod-kern_misc.o kernel_mod-kern_mm.o kernel_mod-kern_loader.o kernel_mod-kern_rescue.o kernel_mod-kern_term.o kernel_mod-kern_i386_dl.o kernel_mod-kern_i386_efi_init.o kernel_mod-kern_parser.o kernel_mod-kern_partition.o kernel_mod-kern_env.o kernel_mod-symlist.o kernel_mod-kern_efi_efi.o kernel_mod-kern_efi_init.o kernel_mod-kern_efi_mm.o kernel_mod-term_efi_console.o kernel_mod-disk_efi_efidisk.o
......@@ -649,7 +649,7 @@ UNDSYMFILES += und-normal.lst
normal.mod: pre-normal.o mod-normal.o
-rm -f $@
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-normal.o: $(normal_mod_DEPENDENCIES) normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_completion.o normal_mod-normal_execute.o normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_menu_entry.o normal_mod-normal_misc.o normal_mod-grub_script_tab.o normal_mod-normal_script.o normal_mod-normal_i386_setjmp.o normal_mod-normal_color.o
......@@ -972,7 +972,7 @@ UNDSYMFILES += und-_chain.lst
_chain.mod: pre-_chain.o mod-_chain.o
-rm -f $@
$(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_chain_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_chain.o: $(_chain_mod_DEPENDENCIES) _chain_mod-loader_efi_chainloader.o
......@@ -1028,7 +1028,7 @@ UNDSYMFILES += und-chain.lst
chain.mod: pre-chain.o mod-chain.o
-rm -f $@
$(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(chain_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-chain.o: $(chain_mod_DEPENDENCIES) chain_mod-loader_efi_chainloader_normal.o
......@@ -1084,7 +1084,7 @@ UNDSYMFILES += und-_linux.lst
_linux.mod: pre-_linux.o mod-_linux.o
-rm -f $@
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_linux.o: $(_linux_mod_DEPENDENCIES) _linux_mod-loader_i386_efi_linux.o
......@@ -1140,7 +1140,7 @@ UNDSYMFILES += und-linux.lst
linux.mod: pre-linux.o mod-linux.o
-rm -f $@
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-linux.o: $(linux_mod_DEPENDENCIES) linux_mod-loader_i386_efi_linux_normal.o
......@@ -1196,7 +1196,7 @@ UNDSYMFILES += und-cpuid.lst
cpuid.mod: pre-cpuid.o mod-cpuid.o
-rm -f $@
$(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-cpuid.o: $(cpuid_mod_DEPENDENCIES) cpuid_mod-commands_i386_cpuid.o
......@@ -1252,7 +1252,7 @@ UNDSYMFILES += und-halt.lst
halt.mod: pre-halt.o mod-halt.o
-rm -f $@
$(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-halt.o: $(halt_mod_DEPENDENCIES) halt_mod-commands_halt.o
......@@ -1308,7 +1308,7 @@ UNDSYMFILES += und-reboot.lst
reboot.mod: pre-reboot.o mod-reboot.o
-rm -f $@
$(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-reboot.o: $(reboot_mod_DEPENDENCIES) reboot_mod-commands_reboot.o
......
......@@ -602,7 +602,7 @@ UNDSYMFILES += und-normal.lst
normal.mod: pre-normal.o mod-normal.o
-rm -f $@
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-normal.o: $(normal_mod_DEPENDENCIES) normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_completion.o normal_mod-normal_execute.o normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_menu_entry.o normal_mod-normal_misc.o normal_mod-grub_script_tab.o normal_mod-normal_script.o normal_mod-normal_i386_setjmp.o normal_mod-normal_color.o
......@@ -927,7 +927,7 @@ UNDSYMFILES += und-_multiboot.lst
_multiboot.mod: pre-_multiboot.o mod-_multiboot.o
-rm -f $@
$(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_multiboot.o: $(_multiboot_mod_DEPENDENCIES) _multiboot_mod-loader_ieee1275_multiboot2.o _multiboot_mod-loader_multiboot2.o _multiboot_mod-loader_multiboot_loader.o
......@@ -1021,7 +1021,7 @@ UNDSYMFILES += und-multiboot.lst
multiboot.mod: pre-multiboot.o mod-multiboot.o
-rm -f $@
$(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-multiboot.o: $(multiboot_mod_DEPENDENCIES) multiboot_mod-loader_multiboot_loader_normal.o
......@@ -1077,7 +1077,7 @@ UNDSYMFILES += und-aout.lst
aout.mod: pre-aout.o mod-aout.o
-rm -f $@
$(TARGET_CC) $(aout_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(aout_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-aout.o: $(aout_mod_DEPENDENCIES) aout_mod-loader_aout.o
......@@ -1133,7 +1133,7 @@ UNDSYMFILES += und-suspend.lst
suspend.mod: pre-suspend.o mod-suspend.o
-rm -f $@
$(TARGET_CC) $(suspend_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(suspend_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-suspend.o: $(suspend_mod_DEPENDENCIES) suspend_mod-commands_ieee1275_suspend.o
......@@ -1189,7 +1189,7 @@ UNDSYMFILES += und-reboot.lst
reboot.mod: pre-reboot.o mod-reboot.o
-rm -f $@
$(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-reboot.o: $(reboot_mod_DEPENDENCIES) reboot_mod-commands_reboot.o
......@@ -1245,7 +1245,7 @@ UNDSYMFILES += und-halt.lst
halt.mod: pre-halt.o mod-halt.o
-rm -f $@
$(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-halt.o: $(halt_mod_DEPENDENCIES) halt_mod-commands_halt.o
......@@ -1301,7 +1301,7 @@ UNDSYMFILES += und-cpuid.lst
cpuid.mod: pre-cpuid.o mod-cpuid.o
-rm -f $@
$(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-cpuid.o: $(cpuid_mod_DEPENDENCIES) cpuid_mod-commands_i386_cpuid.o
......@@ -1357,7 +1357,7 @@ UNDSYMFILES += und-serial.lst
serial.mod: pre-serial.o mod-serial.o
-rm -f $@
$(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-serial.o: $(serial_mod_DEPENDENCIES) serial_mod-term_i386_pc_serial.o
......@@ -1413,7 +1413,7 @@ UNDSYMFILES += und-_linux.lst
_linux.mod: pre-_linux.o mod-_linux.o
-rm -f $@
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_linux.o: $(_linux_mod_DEPENDENCIES) _linux_mod-loader_i386_ieee1275_linux.o
......@@ -1469,7 +1469,7 @@ UNDSYMFILES += und-linux.lst
linux.mod: pre-linux.o mod-linux.o
-rm -f $@
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-linux.o: $(linux_mod_DEPENDENCIES) linux_mod-loader_i386_ieee1275_linux_normal.o
......@@ -1525,7 +1525,7 @@ UNDSYMFILES += und-nand.lst
nand.mod: pre-nand.o mod-nand.o
-rm -f $@
$(TARGET_CC) $(nand_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(nand_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-nand.o: $(nand_mod_DEPENDENCIES) nand_mod-disk_ieee1275_nand.o
......
......@@ -564,7 +564,7 @@ UNDSYMFILES += und-_linux.lst
_linux.mod: pre-_linux.o mod-_linux.o
-rm -f $@
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_linux.o: $(_linux_mod_DEPENDENCIES) _linux_mod-loader_i386_pc_linux.o
......@@ -620,7 +620,7 @@ UNDSYMFILES += und-linux.lst
linux.mod: pre-linux.o mod-linux.o
-rm -f $@
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-linux.o: $(linux_mod_DEPENDENCIES) linux_mod-loader_i386_pc_linux_normal.o
......@@ -680,7 +680,7 @@ UNDSYMFILES += und-normal.lst
normal.mod: pre-normal.o mod-normal.o
-rm -f $@
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-normal.o: $(normal_mod_DEPENDENCIES) normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_completion.o normal_mod-normal_execute.o normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_menu_entry.o normal_mod-normal_misc.o normal_mod-grub_script_tab.o normal_mod-normal_script.o normal_mod-normal_i386_setjmp.o normal_mod-normal_color.o
......@@ -1003,7 +1003,7 @@ UNDSYMFILES += und-serial.lst
serial.mod: pre-serial.o mod-serial.o
-rm -f $@
$(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(serial_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-serial.o: $(serial_mod_DEPENDENCIES) serial_mod-term_i386_pc_serial.o
......@@ -1062,7 +1062,7 @@ UNDSYMFILES += und-_multiboot.lst
_multiboot.mod: pre-_multiboot.o mod-_multiboot.o
-rm -f $@
$(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_multiboot.o: $(_multiboot_mod_DEPENDENCIES) _multiboot_mod-loader_i386_pc_multiboot.o _multiboot_mod-loader_i386_pc_multiboot2.o _multiboot_mod-loader_multiboot2.o _multiboot_mod-loader_multiboot_loader.o
......@@ -1175,7 +1175,7 @@ UNDSYMFILES += und-multiboot.lst
multiboot.mod: pre-multiboot.o mod-multiboot.o
-rm -f $@
$(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-multiboot.o: $(multiboot_mod_DEPENDENCIES) multiboot_mod-loader_multiboot_loader_normal.o
......@@ -1231,7 +1231,7 @@ UNDSYMFILES += und-aout.lst
aout.mod: pre-aout.o mod-aout.o
-rm -f $@
$(TARGET_CC) $(aout_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(aout_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-aout.o: $(aout_mod_DEPENDENCIES) aout_mod-loader_aout.o
......@@ -1287,7 +1287,7 @@ UNDSYMFILES += und-play.lst
play.mod: pre-play.o mod-play.o
-rm -f $@
$(TARGET_CC) $(play_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(play_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-play.o: $(play_mod_DEPENDENCIES) play_mod-commands_i386_pc_play.o
......@@ -1343,7 +1343,7 @@ UNDSYMFILES += und-cpuid.lst
cpuid.mod: pre-cpuid.o mod-cpuid.o
-rm -f $@
$(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(cpuid_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-cpuid.o: $(cpuid_mod_DEPENDENCIES) cpuid_mod-commands_i386_cpuid.o
......@@ -1399,7 +1399,7 @@ UNDSYMFILES += und-ata.lst
ata.mod: pre-ata.o mod-ata.o
-rm -f $@
$(TARGET_CC) $(ata_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(ata_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-ata.o: $(ata_mod_DEPENDENCIES) ata_mod-disk_ata.o
......
This diff is collapsed.
......@@ -592,7 +592,7 @@ UNDSYMFILES += und-_linux.lst
_linux.mod: pre-_linux.o mod-_linux.o
-rm -f $@
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_linux.o: $(_linux_mod_DEPENDENCIES) _linux_mod-loader_powerpc_ieee1275_linux.o
......@@ -648,7 +648,7 @@ UNDSYMFILES += und-linux.lst
linux.mod: pre-linux.o mod-linux.o
-rm -f $@
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(linux_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-linux.o: $(linux_mod_DEPENDENCIES) linux_mod-loader_powerpc_ieee1275_linux_normal.o
......@@ -708,7 +708,7 @@ UNDSYMFILES += und-normal.lst
normal.mod: pre-normal.o mod-normal.o
-rm -f $@
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(normal_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-normal.o: $(normal_mod_DEPENDENCIES) normal_mod-normal_arg.o normal_mod-normal_cmdline.o normal_mod-normal_command.o normal_mod-normal_completion.o normal_mod-normal_execute.o normal_mod-normal_function.o normal_mod-normal_lexer.o normal_mod-normal_main.o normal_mod-normal_menu.o normal_mod-normal_menu_entry.o normal_mod-normal_misc.o normal_mod-grub_script_tab.o normal_mod-normal_script.o normal_mod-normal_powerpc_setjmp.o normal_mod-normal_color.o
......@@ -1031,7 +1031,7 @@ UNDSYMFILES += und-suspend.lst
suspend.mod: pre-suspend.o mod-suspend.o
-rm -f $@
$(TARGET_CC) $(suspend_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(suspend_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-suspend.o: $(suspend_mod_DEPENDENCIES) suspend_mod-commands_ieee1275_suspend.o
......@@ -1087,7 +1087,7 @@ UNDSYMFILES += und-reboot.lst
reboot.mod: pre-reboot.o mod-reboot.o
-rm -f $@
$(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(reboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-reboot.o: $(reboot_mod_DEPENDENCIES) reboot_mod-commands_reboot.o
......@@ -1143,7 +1143,7 @@ UNDSYMFILES += und-halt.lst
halt.mod: pre-halt.o mod-halt.o
-rm -f $@
$(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(halt_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-halt.o: $(halt_mod_DEPENDENCIES) halt_mod-commands_halt.o
......@@ -1201,7 +1201,7 @@ UNDSYMFILES += und-_multiboot.lst
_multiboot.mod: pre-_multiboot.o mod-_multiboot.o
-rm -f $@
$(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(_multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-_multiboot.o: $(_multiboot_mod_DEPENDENCIES) _multiboot_mod-loader_ieee1275_multiboot2.o _multiboot_mod-loader_multiboot2.o _multiboot_mod-loader_multiboot_loader.o
......@@ -1295,7 +1295,7 @@ UNDSYMFILES += und-multiboot.lst
multiboot.mod: pre-multiboot.o mod-multiboot.o
-rm -f $@
$(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(multiboot_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
pre-multiboot.o: $(multiboot_mod_DEPENDENCIES) multiboot_mod-loader_multiboot_loader_normal.o
......
This diff is collapsed.
......@@ -694,6 +694,7 @@ NM
TARGET_CFLAGS
TARGET_CPPFLAGS
TARGET_LDFLAGS
MODULE_LDFLAGS
LIBCURSES
enable_grub_emu
enable_grub_fstest
......@@ -6723,6 +6724,7 @@ fi
# Set them to their new values for the tests below.
CC="$TARGET_CC"
CFLAGS="$TARGET_CFLAGS"
......@@ -6801,6 +6803,67 @@ echo "$as_me: error: GRUB requires a working absolute objcopy; upgrade your binu
{ (exit 1); exit 1; }; }
fi
{ echo "$as_me:$LINENO: checking whether linker accepts --build-id=none" >&5
echo $ECHO_N "checking whether linker accepts --build-id=none... $ECHO_C" >&6; }
if test "${grub_cv_prog_ld_build_id_none+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--build-id=none"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
grub_cv_prog_ld_build_id_none=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
grub_cv_prog_ld_build_id_none=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS="$save_LDFLAGS"
fi
{ echo "$as_me:$LINENO: result: $grub_cv_prog_ld_build_id_none" >&5
echo "${ECHO_T}$grub_cv_prog_ld_build_id_none" >&6; }
if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
MODULE_LDFLAGS="$MODULE_LDFLAGS -Wl,--build-id=none"
fi
{ echo "$as_me:$LINENO: checking if C symbols get an underscore after compilation" >&5
echo $ECHO_N "checking if C symbols get an underscore after compilation... $ECHO_C" >&6; }
......@@ -8851,6 +8914,7 @@ NM!$NM$ac_delim
TARGET_CFLAGS!$TARGET_CFLAGS$ac_delim
TARGET_CPPFLAGS!$TARGET_CPPFLAGS$ac_delim
TARGET_LDFLAGS!$TARGET_LDFLAGS$ac_delim
MODULE_LDFLAGS!$MODULE_LDFLAGS$ac_delim
LIBCURSES!$LIBCURSES$ac_delim
enable_grub_emu!$enable_grub_emu$ac_delim
enable_grub_fstest!$enable_grub_fstest$ac_delim
......@@ -8858,7 +8922,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 84; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
......@@ -253,6 +253,7 @@ fi
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_CPPFLAGS)
AC_SUBST(TARGET_LDFLAGS)
AC_SUBST(MODULE_LDFLAGS)
# Set them to their new values for the tests below.
CC="$TARGET_CC"
......@@ -262,6 +263,7 @@ LDFLAGS="$TARGET_LDFLAGS"
# Defined in aclocal.m4.
grub_PROG_OBJCOPY_ABSOLUTE
grub_PROG_LD_BUILD_ID_NONE
grub_ASM_USCORE
if test "x$target_cpu" = xi386; then
grub_CHECK_START_SYMBOL
......
......@@ -114,7 +114,7 @@ UNDSYMFILES += #{undsym}
#{@name}: #{pre_obj} #{mod_obj}
-rm -f $@
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ $^
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ $^
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
#{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment