* [PATCH] 2.6.8.1-mm1 - Clean up a Makefile bogosity
@ 2004-08-17 19:26 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2004-08-17 19:26 UTC (permalink / raw)
To: Andrew Morton; +Cc: Andreas Schwab, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-17 18:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-17 19:26 [PATCH] 2.6.8.1-mm1 - Clean up a Makefile bogosity Jeff Dike
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®