lkml.org 
[lkml]   [2004]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] 2.6.8.1-mm1 - Clean up a Makefile bogosity
Date
From
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:1.030 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site