The first fixes "make dist" on 64 bit EFI: make[2]: Entering directory `/home/bor/build/grub/grub-core' gcc -Wall -W -I../include -I../include -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -DGRUB_TARGET_CPU_X86_64=1 -m64 ... -Wtrampolines -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1 -Os -I.. -S -DSTANDALONE -o rs_decoder.S lib/reed_solomon.c -g0 -mregparm=3 -ffreestanding lib/reed_solomon.c:1:0: error: -mregparm is ignored in 64-bit mode [-Werror] cc1: all warnings being treated as errors make[2]: *** [rs_decoder.S] Error 1 make[2]: Leaving directory `/home/bor/build/grub/grub-core' make[1]: *** [distdir] Error 1 make[1]: Leaving directory `/home/bor/build/grub' make: *** [dist] Error 2
Add rs_decoder.S as NODIST header to kernel to avoid triggering rebuild on "make dist". As it should not be compiled on its own, but included, rename it into rs_decoder.h, so automake does the right thing. For consistency do the same with sm712_start.S which is not required during "make dist" as well. Signed-off-by: Andrey Borzenkov <arvidj...@gmail.com> --- grub-core/Makefile.am | 9 +++------ grub-core/Makefile.core.def | 2 ++ grub-core/boot/i386/pc/startup_raw.S | 2 +- grub-core/boot/mips/loongson/fwstart.S | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am index fa6afcf..6d810e9 100644 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@ -45,9 +45,9 @@ gensm712: video/sm712.c CLEANFILES += gensm712 # trigtables.c -sm712_start.S: gensm712 video/sm712.c $(top_srcdir)/configure.ac +sm712_start.h: gensm712 video/sm712.c $(top_srcdir)/configure.ac $(builddir)/gensm712 > $@ -CLEANFILES += sm712_start.S +CLEANFILES += sm712_start.h # XXX Use Automake's LEX & YACC support grub_script.tab.h: script/parser.y @@ -60,12 +60,9 @@ grub_script.yy.h: script/yylex.l $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $< grub_script.yy.c: grub_script.yy.h -rs_decoder.S: $(srcdir)/lib/reed_solomon.c +rs_decoder.h: $(srcdir)/lib/reed_solomon.c $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding -boot/i386/pc/startup_raw.S: $(builddir)/rs_decoder.S -boot/mips/loongson/fwstart.S: $(builddir)/sm712_start.S - CLEANFILES += grub_script.yy.c grub_script.yy.h include $(srcdir)/Makefile.core.am diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 7e19acb..0715971 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -396,6 +396,7 @@ image = { image = { name = lzma_decompress; i386_pc = boot/i386/pc/startup_raw.S; + i386_pc_nodist = rs_decoder.h; objcopyflags = '-O binary'; ldflags = '$(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200'; @@ -405,6 +406,7 @@ image = { image = { name = fwstart; mips_loongson = boot/mips/loongson/fwstart.S; + mips_loongson_nodist = sm712_start.h; objcopyflags = '-O binary'; ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic'; enable = mips_loongson; diff --git a/grub-core/boot/i386/pc/startup_raw.S b/grub-core/boot/i386/pc/startup_raw.S index 81c0bc4..06dec8c 100644 --- a/grub-core/boot/i386/pc/startup_raw.S +++ b/grub-core/boot/i386/pc/startup_raw.S @@ -119,7 +119,7 @@ LOCAL (codestart): #include "../../../kern/i386/realmode.S" -#include <rs_decoder.S> +#include <rs_decoder.h> .text diff --git a/grub-core/boot/mips/loongson/fwstart.S b/grub-core/boot/mips/loongson/fwstart.S index ec57be6..11ad1c9 100644 --- a/grub-core/boot/mips/loongson/fwstart.S +++ b/grub-core/boot/mips/loongson/fwstart.S @@ -886,7 +886,7 @@ table_cont: b init_end nop init_table: -#include "sm712_start.S" +#include "sm712_start.h" init_table_end: .align 4 init_end: -- tg: (93daf86..) u/startup_raw_nodist (depends on: master) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel