* [PATCH] x86: fix rebuild with EFI_STUB enabled
@ 2013-04-03 14:47 Jan Beulich
2013-04-03 14:48 ` H. Peter Anvin
2013-04-05 22:29 ` [tip:x86/urgent] x86: Fix " tip-bot for Jan Beulich
0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2013-04-03 14:47 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: Matt Fleming, mjg, linux-kernel
eboot.o and efi_stub_$(BITS).o didn't get added to "targets", and hence
their .cmd files don't get included by the build machinery, leading to
the files always getting rebuilt.
Rather than adding the two files individually, take the opportunity and
add $(VMLINUX_OBJS) to "targets" instead, thus allowing the assignment
at the top of the file to be shrunk quite a bit.
At the same time, remove a pointless flags override line - the variable
assigned to was misspelled anyway, and the options added are
meaningless for assembly sources.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Matt Fleming <matt.fleming@intel.com>
---
arch/x86/boot/compressed/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- 3.9-rc5/arch/x86/boot/compressed/Makefile
+++ 3.9-rc5-x86-EFI-stub-rebuild/arch/x86/boot/compressed/Makefile
@@ -4,7 +4,7 @@
# create a compressed vmlinux image from the original vmlinux
#
-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo head_$(BITS).o misc.o string.o cmdline.o early_serial_console.o piggy.o
+targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
@@ -29,7 +29,6 @@ VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)
$(obj)/piggy.o
$(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
-$(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar -mno-red-zone
ifeq ($(CONFIG_EFI_STUB), y)
VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
@@ -43,7 +42,7 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment
$(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy)
-targets += vmlinux.bin.all vmlinux.relocs
+targets += $(patsubst $(obj)/%,%,$(VMLINUX_OBJS)) vmlinux.bin.all vmlinux.relocs
CMD_RELOCS = arch/x86/tools/relocs
quiet_cmd_relocs = RELOCS $@
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: fix rebuild with EFI_STUB enabled
2013-04-03 14:47 [PATCH] x86: fix rebuild with EFI_STUB enabled Jan Beulich
@ 2013-04-03 14:48 ` H. Peter Anvin
2013-04-03 14:58 ` Jan Beulich
2013-04-05 22:29 ` [tip:x86/urgent] x86: Fix " tip-bot for Jan Beulich
1 sibling, 1 reply; 5+ messages in thread
From: H. Peter Anvin @ 2013-04-03 14:48 UTC (permalink / raw)
To: Jan Beulich, mingo, tglx; +Cc: Matt Fleming, mjg, linux-kernel
This looks awesome for 3.10, but getting a minimal fix for 3.9/stable would be good, too.
Jan Beulich <JBeulich@suse.com> wrote:
>eboot.o and efi_stub_$(BITS).o didn't get added to "targets", and hence
>their .cmd files don't get included by the build machinery, leading to
>the files always getting rebuilt.
>
>Rather than adding the two files individually, take the opportunity and
>add $(VMLINUX_OBJS) to "targets" instead, thus allowing the assignment
>at the top of the file to be shrunk quite a bit.
>
>At the same time, remove a pointless flags override line - the variable
>assigned to was misspelled anyway, and the options added are
>meaningless for assembly sources.
>
>Signed-off-by: Jan Beulich <jbeulich@suse.com>
>Cc: Matthew Garrett <mjg@redhat.com>
>Cc: Matt Fleming <matt.fleming@intel.com>
>---
> arch/x86/boot/compressed/Makefile | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>--- 3.9-rc5/arch/x86/boot/compressed/Makefile
>+++ 3.9-rc5-x86-EFI-stub-rebuild/arch/x86/boot/compressed/Makefile
>@@ -4,7 +4,7 @@
> # create a compressed vmlinux image from the original vmlinux
> #
>
>-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz
>vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
>head_$(BITS).o misc.o string.o cmdline.o early_serial_console.o piggy.o
>+targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
>vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
>
> KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
> KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
>@@ -29,7 +29,6 @@ VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)
> $(obj)/piggy.o
>
> $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
>-$(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar
>-mno-red-zone
>
> ifeq ($(CONFIG_EFI_STUB), y)
> VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
>@@ -43,7 +42,7 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment
> $(obj)/vmlinux.bin: vmlinux FORCE
> $(call if_changed,objcopy)
>
>-targets += vmlinux.bin.all vmlinux.relocs
>+targets += $(patsubst $(obj)/%,%,$(VMLINUX_OBJS)) vmlinux.bin.all
>vmlinux.relocs
>
> CMD_RELOCS = arch/x86/tools/relocs
> quiet_cmd_relocs = RELOCS $@
--
Sent from my mobile phone. Please excuse brevity and lack of formatting.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: fix rebuild with EFI_STUB enabled
2013-04-03 14:48 ` H. Peter Anvin
@ 2013-04-03 14:58 ` Jan Beulich
2013-04-03 15:26 ` H. Peter Anvin
0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2013-04-03 14:58 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: mingo, Matt Fleming, tglx, mjg, linux-kernel
>>> On 03.04.13 at 16:48, "H. Peter Anvin" <hpa@zytor.com> wrote:
> This looks awesome for 3.10, but getting a minimal fix for 3.9/stable would
> be good, too.
Do you really view this as relevant for stable? Considering that this
had been this way for a while with apparently no-one having noticed,
I wouldn't think so. Nor would I see a strong need for this to go into
3.9.
Jan
> Jan Beulich <JBeulich@suse.com> wrote:
>
>>eboot.o and efi_stub_$(BITS).o didn't get added to "targets", and hence
>>their .cmd files don't get included by the build machinery, leading to
>>the files always getting rebuilt.
>>
>>Rather than adding the two files individually, take the opportunity and
>>add $(VMLINUX_OBJS) to "targets" instead, thus allowing the assignment
>>at the top of the file to be shrunk quite a bit.
>>
>>At the same time, remove a pointless flags override line - the variable
>>assigned to was misspelled anyway, and the options added are
>>meaningless for assembly sources.
>>
>>Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>Cc: Matthew Garrett <mjg@redhat.com>
>>Cc: Matt Fleming <matt.fleming@intel.com>
>>---
>> arch/x86/boot/compressed/Makefile | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>>--- 3.9-rc5/arch/x86/boot/compressed/Makefile
>>+++ 3.9-rc5-x86-EFI-stub-rebuild/arch/x86/boot/compressed/Makefile
>>@@ -4,7 +4,7 @@
>> # create a compressed vmlinux image from the original vmlinux
>> #
>>
>>-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz
>>vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
>>head_$(BITS).o misc.o string.o cmdline.o early_serial_console.o piggy.o
>>+targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
>>vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
>>
>> KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
>> KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
>>@@ -29,7 +29,6 @@ VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)
>> $(obj)/piggy.o
>>
>> $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
>>-$(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar
>>-mno-red-zone
>>
>> ifeq ($(CONFIG_EFI_STUB), y)
>> VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
>>@@ -43,7 +42,7 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment
>> $(obj)/vmlinux.bin: vmlinux FORCE
>> $(call if_changed,objcopy)
>>
>>-targets += vmlinux.bin.all vmlinux.relocs
>>+targets += $(patsubst $(obj)/%,%,$(VMLINUX_OBJS)) vmlinux.bin.all
>>vmlinux.relocs
>>
>> CMD_RELOCS = arch/x86/tools/relocs
>> quiet_cmd_relocs = RELOCS $@
>
> --
> Sent from my mobile phone. Please excuse brevity and lack of formatting.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86: fix rebuild with EFI_STUB enabled
2013-04-03 14:58 ` Jan Beulich
@ 2013-04-03 15:26 ` H. Peter Anvin
0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2013-04-03 15:26 UTC (permalink / raw)
To: Jan Beulich; +Cc: mingo, Matt Fleming, tglx, mjg, linux-kernel
On 04/03/2013 07:58 AM, Jan Beulich wrote:
>>>> On 03.04.13 at 16:48, "H. Peter Anvin" <hpa@zytor.com> wrote:
>> This looks awesome for 3.10, but getting a minimal fix for 3.9/stable would
>> be good, too.
>
> Do you really view this as relevant for stable? Considering that this
> had been this way for a while with apparently no-one having noticed,
> I wouldn't think so. Nor would I see a strong need for this to go into
> 3.9.
>
> Jan
>
Since it is a build fix, I think I do. You never quite know who build
problems is going to bite, and I'd rather just fix them as long as the
fix is suitably small and obvious. It doesn't exactly help that kbuild
is hideously fragile.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:x86/urgent] x86: Fix rebuild with EFI_STUB enabled
2013-04-03 14:47 [PATCH] x86: fix rebuild with EFI_STUB enabled Jan Beulich
2013-04-03 14:48 ` H. Peter Anvin
@ 2013-04-05 22:29 ` tip-bot for Jan Beulich
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Jan Beulich @ 2013-04-05 22:29 UTC (permalink / raw)
To: linux-tip-commits
Cc: mjg, linux-kernel, hpa, mingo, jbeulich, matt.fleming, JBeulich,
tglx, hpa
Commit-ID: 918708245e92941df16a634dc201b407d12bcd91
Gitweb: http://git.kernel.org/tip/918708245e92941df16a634dc201b407d12bcd91
Author: Jan Beulich <JBeulich@suse.com>
AuthorDate: Wed, 3 Apr 2013 15:47:33 +0100
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 5 Apr 2013 13:59:23 -0700
x86: Fix rebuild with EFI_STUB enabled
eboot.o and efi_stub_$(BITS).o didn't get added to "targets", and hence
their .cmd files don't get included by the build machinery, leading to
the files always getting rebuilt.
Rather than adding the two files individually, take the opportunity and
add $(VMLINUX_OBJS) to "targets" instead, thus allowing the assignment
at the top of the file to be shrunk quite a bit.
At the same time, remove a pointless flags override line - the variable
assigned to was misspelled anyway, and the options added are
meaningless for assembly sources.
[ hpa: the patch is not minimal, but I am taking it for -urgent anyway
since the excess impact of the patch seems to be small enough. ]
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/515C5D2502000078000CA6AD@nat28.tlf.novell.com
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/boot/compressed/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 8a84501..5ef205c 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -4,7 +4,7 @@
# create a compressed vmlinux image from the original vmlinux
#
-targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo head_$(BITS).o misc.o string.o cmdline.o early_serial_console.o piggy.o
+targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo
KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
@@ -29,7 +29,6 @@ VMLINUX_OBJS = $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \
$(obj)/piggy.o
$(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
-$(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar -mno-red-zone
ifeq ($(CONFIG_EFI_STUB), y)
VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o
@@ -43,7 +42,7 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment -S
$(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy)
-targets += vmlinux.bin.all vmlinux.relocs
+targets += $(patsubst $(obj)/%,%,$(VMLINUX_OBJS)) vmlinux.bin.all vmlinux.relocs
CMD_RELOCS = arch/x86/tools/relocs
quiet_cmd_relocs = RELOCS $@
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-05 22:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 14:47 [PATCH] x86: fix rebuild with EFI_STUB enabled Jan Beulich
2013-04-03 14:48 ` H. Peter Anvin
2013-04-03 14:58 ` Jan Beulich
2013-04-03 15:26 ` H. Peter Anvin
2013-04-05 22:29 ` [tip:x86/urgent] x86: Fix " tip-bot for Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox