[uClibc] Re: tool links in bin
Miles Bader
miles at lsi.nec.co.jp
Fri Sep 19 07:24:29 UTC 2003
On a similar note, I want to have the embedded values for GCC_BIN and
LD_BIN not depends on the current environment (since I'm cross compiling
gcc-uClibc.c); my current change (to extra/gcc-uClibc/Makefile) looks
like this:
--- extra/gcc-uClibc/Makefile.~1.57.~ 2003-03-10 14:31:01.000000000 +0900
+++ extra/gcc-uClibc/Makefile 2003-09-18 17:48:43.000000000 +0900
@@ -8,9 +8,10 @@ TOPDIR = ../../
include $(TOPDIR)Rules.mak
UCLIBC_DIR = $(shell (cd ../.. ; /bin/pwd))
-GCC_BIN = $(shell which $(CC))
-LD_BIN = $(shell which $(LD))
-GCCINCDIR:= ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
+GCC_BIN = $(SYSTEM_DEVEL_PREFIX)/bin/$(CROSS)gcc
+# GCC_BIN = $(shell which $(CC))
+LD_BIN = $(SYSTEM_DEVEL_PREFIX)/bin/$(CROSS)gcc
+# LD_BIN = $(shell which $(LD))
all: gcc-uClibc ld-uClibc
I wonder what the correct way to fix this to be portable is -- I could
use a similar test to my previous patch: `See if there's an executable
$(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(CROSS)gcc, and if so, use a value
of $(SYSTEM_DEVEL_PREFIX)/bin/$(CROSS)gcc, otherwise use $(shell which
$(CC))'. The only problem with this is that it depends on $(PREFIX)
during a non-install compilation, and that's generally a no-no. OTOH,
extra/gcc-uClibc/Makefile seems to re-compile during installation
anyway (also a no-no, but ...), so doing it would probably work...
The more proper way is probably to add some configure option meaning
`I'm cross compiling the compiler drivers, don't try to look at the
current environment.'
Thoughts?
-Miles
--
"Though they may have different meanings, the cries of 'Yeeeee-haw!' and
'Allahu akbar!' are, in spirit, not actually all that different."
More information about the uClibc
mailing list