From: Jeff Dike <jdike@addtoit.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Andreas Schwab <schwab@suse.de>, linux-kernel@vger.kernel.org
Subject: [PATCH] 2.6.8.1-mm1 - Clean up a Makefile bogosity
Date: Tue, 17 Aug 2004 15:26:06 -0400 [thread overview]
Message-ID: <200408171926.i7HJQ6KF003372@ccure.user-mode-linux.org> (raw)
Following a suggestion from Andreas Schwab, this switches the UML build to
a somewhat official way of getting a library search path from gcc.
Jeff
Index: 2.6.8.1-mm1/arch/um/Makefile
===================================================================
--- 2.6.8.1-mm1.orig/arch/um/Makefile 2004-08-17 00:37:04.000000000 -0400
+++ 2.6.8.1-mm1/arch/um/Makefile 2004-08-17 13:18:13.000000000 -0400
@@ -88,10 +88,11 @@
prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS)
-# This stupidity extracts the directory in which gcc lives so that it can
-# be fed to ld when it's linking .tmp_vmlinux during the ldchk stage.
-LD_DIR = $(shell dirname `gcc -v 2>&1 | head -1 | awk '{print $$NF}'`)
-LDFLAGS_vmlinux = -L/usr/lib -L$(LD_DIR) -r
+# This extracts the library path from gcc with -print-search-dirs and munges
+# the output into a bunch of -L switches.
+LD_DIRS = $(shell gcc -print-search-dirs | grep libraries | \
+ sed -e 's/^.*=/-L/' -e 's/:/ -L/g')
+LDFLAGS_vmlinux = $(LD_DIRS) -r
vmlinux: $(ARCH_DIR)/main.o
reply other threads:[~2004-08-17 18:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200408171926.i7HJQ6KF003372@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
/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
all inboxes | Powered by JetHome®