From: Andi Kleen <andi@firstfloor.org>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
sam@ravnborg.org
Subject: [PATCH] [1/5] kbuild: Fix ld-option Makefile macro to really work
Date: Mon, 14 Sep 2009 22:18:06 +0200 (CEST) [thread overview]
Message-ID: <20090914201806.EE6A0B1757@basil.firstfloor.org> (raw)
In-Reply-To: <200909141018.915641783@firstfloor.org>
Needed for the next patch
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
scripts/Kbuild.include | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6.31-rc1-ak/scripts/Kbuild.include
===================================================================
--- linux-2.6.31-rc1-ak.orig/scripts/Kbuild.include
+++ linux-2.6.31-rc1-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,)
@@ -133,7 +134,7 @@ cc-ifversion = $(shell [ $(call cc-versi
# ld-option
# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
ld-option = $(call try-run,\
- $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
+ $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
######
next prev parent reply other threads:[~2009-09-14 20:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 20:18 [PATCH] [0/5] kbuild: A couple of Kbuild fixes/improvements Andi Kleen
2009-09-14 20:18 ` Andi Kleen [this message]
2009-09-14 21:47 ` [PATCH] [1/5] kbuild: Fix ld-option Makefile macro to really work Sam Ravnborg
2009-09-15 13:01 ` Andi Kleen
2009-09-15 15:32 ` Sam Ravnborg
2009-09-14 20:18 ` [PATCH] [2/5] kbuild: Check if linker supports the -X option Andi Kleen
2009-09-14 20:18 ` [PATCH] [3/5] kbuild: Echo the record_mcount command Andi Kleen
2009-09-14 20:18 ` [PATCH] [4/5] kbuild: Fail build if recordmcount.pl fails Andi Kleen
2009-09-14 20:18 ` [PATCH] [5/5] kbuild: Set -fconserve-stack option for gcc 4.5 Andi Kleen
2009-09-14 21:36 ` Andrew Morton
2009-09-19 9:20 ` Sam Ravnborg
2009-09-20 12:04 ` Andi Kleen
2009-09-14 21:43 ` [PATCH] [0/5] kbuild: A couple of Kbuild fixes/improvements Sam Ravnborg
2009-09-14 21:47 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2009-08-05 21:51 Andi Kleen
2009-08-05 21:51 ` [PATCH] [1/5] kbuild: Fix ld-option Makefile macro to really work Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090914201806.EE6A0B1757@basil.firstfloor.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox