diff --git a/gentpl.py b/gentpl.py index 5081cf483..a85dd3ed9 100644 --- a/gentpl.py +++ b/gentpl.py @@ -254,7 +254,7 @@ def kernel(platform): r += gvar_add("platform_DATA", "[+ name +].img") r += gvar_add("CLEANFILES", "[+ name +].img") r += rule("[+ name +].img", "[+ name +].exec$(EXEEXT)", - if_platform_tagged(platform, "nostrip", lambda: "cp $@ $<", + if_platform_tagged(platform, "nostrip", lambda: "cp $< $@", lambda: "$(STRIP) $(" + cname() + "_STRIPFLAGS) -o $@ $<")) return r diff --git a/grub-core/modules.def b/grub-core/modules.def index b63c70922..b2d57a6fd 100644 --- a/grub-core/modules.def +++ b/grub-core/modules.def @@ -3,6 +3,8 @@ AutoGen definitions Makefile.tpl; kernel = { name = kernel; + nostrip = emu; + emu_ldflags = '-Wl,-r,-d'; x86_efi_ldflags = '-Wl,-r,-d'; x86_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment'; @@ -1218,6 +1220,7 @@ module = { mips = lib/mips/setjmp.S; sparc64 = lib/sparc64/setjmp.S; powerpc = lib/powerpc/setjmp.S; + emu = 'lib/$(target_cpu)/setjmp.S'; }; module = {