* [PATCH] [0/2] Updated patches for gold -X probing
@ 2009-09-16 20:36 Andi Kleen
2009-09-16 20:36 ` [PATCH] [1/2] kbuild: Add a really-ld-option macro Andi Kleen
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andi Kleen @ 2009-09-16 20:36 UTC (permalink / raw)
To: sam, linux-kernel
based on Sam's feedback using a new macro.
gold build doesn't work currently for some other reasons,
but I haven't investigated that yet. It seems to be new though,
wasn't there a few rc*s ago.
-Andi
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] [1/2] kbuild: Add a really-ld-option macro 2009-09-16 20:36 [PATCH] [0/2] Updated patches for gold -X probing Andi Kleen @ 2009-09-16 20:36 ` Andi Kleen 2009-09-19 8:07 ` Sam Ravnborg 2009-09-16 20:36 ` [PATCH] [2/2] kbuild: Check if linker supports the -X option Andi Kleen 2009-09-18 2:31 ` [PATCH] [0/2] Updated patches for gold -X probing Américo Wang 2 siblings, 1 reply; 5+ messages in thread From: Andi Kleen @ 2009-09-16 20:36 UTC (permalink / raw) To: sam, linux-kernel Different from the existing ld macro by checking $(LD) Needed for the next patch Signed-off-by: Andi Kleen <ak@linux.intel.com> --- scripts/Kbuild.include | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) Index: linux-2.6.31-ak/scripts/Kbuild.include =================================================================== --- linux-2.6.31-ak.orig/scripts/Kbuild.include +++ linux-2.6.31-ak/scripts/Kbuild.include @@ -83,11 +83,12 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstw # is automatically cleaned up. try-run = $(shell set -e; \ TMP="$(TMPOUT).$$$$.tmp"; \ + TMPO="$(TMPOUT).$$$$.o"; \ if ($(1)) >/dev/null 2>&1; \ then echo "$(2)"; \ else echo "$(3)"; \ fi; \ - rm -f "$$TMP") + rm -f "$$TMP" "$$TMPO") # as-option # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) @@ -135,6 +136,12 @@ cc-ifversion = $(shell [ $(call cc-versi ld-option = $(call try-run,\ $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) +# really-ld-option +# checks $(LD) unlike ld-option +# Usage: LDFLAGS += $(call really-ld-option, -X) +really-ld-option = $(call try-run,\ + $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) + ###### ### ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [1/2] kbuild: Add a really-ld-option macro 2009-09-16 20:36 ` [PATCH] [1/2] kbuild: Add a really-ld-option macro Andi Kleen @ 2009-09-19 8:07 ` Sam Ravnborg 0 siblings, 0 replies; 5+ messages in thread From: Sam Ravnborg @ 2009-09-19 8:07 UTC (permalink / raw) To: Andi Kleen; +Cc: linux-kernel On Wed, Sep 16, 2009 at 10:36:54PM +0200, Andi Kleen wrote: > > Different from the existing ld macro by checking $(LD) > > Needed for the next patch > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > > --- > scripts/Kbuild.include | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > Index: linux-2.6.31-ak/scripts/Kbuild.include > =================================================================== > --- linux-2.6.31-ak.orig/scripts/Kbuild.include > +++ linux-2.6.31-ak/scripts/Kbuild.include > @@ -83,11 +83,12 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstw > # is automatically cleaned up. > try-run = $(shell set -e; \ > TMP="$(TMPOUT).$$$$.tmp"; \ > + TMPO="$(TMPOUT).$$$$.o"; \ > if ($(1)) >/dev/null 2>&1; \ > then echo "$(2)"; \ > else echo "$(3)"; \ > fi; \ > - rm -f "$$TMP") > + rm -f "$$TMP" "$$TMPO") > > # as-option > # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) > @@ -135,6 +136,12 @@ cc-ifversion = $(shell [ $(call cc-versi > ld-option = $(call try-run,\ > $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) > > +# really-ld-option > +# checks $(LD) unlike ld-option > +# Usage: LDFLAGS += $(call really-ld-option, -X) > +really-ld-option = $(call try-run,\ > + $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) > + kbuild has some strange marcro names - but adding more is no good. I will: 1) rename ld-option to cc-ldoption 2) add ld-option, and _document_ it in makefiles.txt 3) use ld-option for the -X option I had preferred your patchset did so. Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] [2/2] kbuild: Check if linker supports the -X option 2009-09-16 20:36 [PATCH] [0/2] Updated patches for gold -X probing Andi Kleen 2009-09-16 20:36 ` [PATCH] [1/2] kbuild: Add a really-ld-option macro Andi Kleen @ 2009-09-16 20:36 ` Andi Kleen 2009-09-18 2:31 ` [PATCH] [0/2] Updated patches for gold -X probing Américo Wang 2 siblings, 0 replies; 5+ messages in thread From: Andi Kleen @ 2009-09-16 20:36 UTC (permalink / raw) To: sam, linux-kernel The new alternative `gold' linker in recent binutils doesn't support the -X option. This breaks allyesconfig builds that have CONFIG_STRIP_ASM_SYMS enabled. Check if the linker really supports the option using ld-option. This requires fixes in earlier patches. Signed-off-by: Andi Kleen <ak@linux.intel.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.31-rc3-ak/Makefile =================================================================== --- linux-2.6.31-rc3-ak.orig/Makefile +++ linux-2.6.31-rc3-ak/Makefile @@ -600,7 +600,7 @@ LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) ifeq ($(CONFIG_STRIP_ASM_SYMS),y) -LDFLAGS_vmlinux += -X +LDFLAGS_vmlinux += $(call really-ld-option, -X,) endif # Default kernel image to build when no specific target is given. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [0/2] Updated patches for gold -X probing 2009-09-16 20:36 [PATCH] [0/2] Updated patches for gold -X probing Andi Kleen 2009-09-16 20:36 ` [PATCH] [1/2] kbuild: Add a really-ld-option macro Andi Kleen 2009-09-16 20:36 ` [PATCH] [2/2] kbuild: Check if linker supports the -X option Andi Kleen @ 2009-09-18 2:31 ` Américo Wang 2 siblings, 0 replies; 5+ messages in thread From: Américo Wang @ 2009-09-18 2:31 UTC (permalink / raw) To: Andi Kleen; +Cc: sam, linux-kernel On Thu, Sep 17, 2009 at 4:36 AM, Andi Kleen <andi@firstfloor.org> wrote: > > based on Sam's feedback using a new macro. > > gold build doesn't work currently for some other reasons, > but I haven't investigated that yet. It seems to be new though, > wasn't there a few rc*s ago. Ack for these 2 patches. Thanks! ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-19 8:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-09-16 20:36 [PATCH] [0/2] Updated patches for gold -X probing Andi Kleen 2009-09-16 20:36 ` [PATCH] [1/2] kbuild: Add a really-ld-option macro Andi Kleen 2009-09-19 8:07 ` Sam Ravnborg 2009-09-16 20:36 ` [PATCH] [2/2] kbuild: Check if linker supports the -X option Andi Kleen 2009-09-18 2:31 ` [PATCH] [0/2] Updated patches for gold -X probing Américo Wang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox