summaryrefslogtreecommitdiffstats
path: root/make/uclibc_toolchain.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-07-23 23:52:53 +0000
committerEric Andersen <andersen@codepoet.org>2002-07-23 23:52:53 +0000
commitd30b9abaeb3ca378fb4d62c096522327e2e5dde5 (patch)
treed6fc548a92a583d1806f5b7f3a98708af43b801c /make/uclibc_toolchain.mk
parent80014e7fac9e756e8d4f162a6e4ab2aa2bdf2850 (diff)
downloadbuildroot-novena-d30b9abaeb3ca378fb4d62c096522327e2e5dde5.tar.gz
buildroot-novena-d30b9abaeb3ca378fb4d62c096522327e2e5dde5.zip
Fix the native toolchain build
Diffstat (limited to 'make/uclibc_toolchain.mk')
-rw-r--r--make/uclibc_toolchain.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/make/uclibc_toolchain.mk b/make/uclibc_toolchain.mk
index 0d2c35da7..86382f050 100644
--- a/make/uclibc_toolchain.mk
+++ b/make/uclibc_toolchain.mk
@@ -59,7 +59,7 @@ NATIVE_ARCH:= ${shell uname -m | sed \
ifeq ($(strip $(ARCH)),$(strip $(NATIVE_ARCH)))
CROSSARG=
else
-CROSSARG=--cross=$(ARCH)-uclibc-
+CROSSARG=--cross=$(STAGING_DIR)/bin/$(ARCH)-uclibc-
endif
ifneq ($(HAS_MMU),true)
NOMMU:=nommu
@@ -140,9 +140,11 @@ ifeq ($(LINUX_DIR),)
LINUX_DIR:=$(BUILD_DIR)/linux
endif
$(LINUX_DIR)/.cross_compiler_set: $(BUILD_DIR)/.setup $(LINUX_DIR)/.configured
- perl -i -p -e "s,^CROSS_COMPILE.*,\
- CROSS_COMPILE=$(STAGING_DIR)/bin/$(ARCH)-uclibc-,g;" \
- $(LINUX_DIR)/Makefile
+ #If we were cross compiling the kernel, we would need to do this,
+ # but for UserMode Linux, we can skip this step....
+ #perl -i -p -e "s,^CROSS_COMPILE.*,\
+ # CROSS_COMPILE=$(STAGING_DIR)/bin/$(ARCH)-uclibc-,g;" \
+ # $(LINUX_DIR)/Makefile
touch $(LINUX_DIR)/.cross_compiler_set
linux_headers: $(LINUX_DIR)/.cross_compiler_set
@@ -172,6 +174,10 @@ $(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
touch $(BINUTILS_DIR)/.patched
$(BINUTILS_DIR)/.configured: $(BINUTILS_DIR)/.patched
+ @if `echo "true" | grep -r true`; then true; else \
+ echo "ERROR! Your grep doesn't support the -r argument."; \
+ exit 1; \
+ fi
(cd $(BINUTILS_DIR); perl -i -p -e "s,#.*define.*ELF_DYNAMIC_INTERPRETER.*\".*\"\
,#define ELF_DYNAMIC_INTERPRETER \"/lib/ld-uClibc.so.0\",;" \
`grep -lr "#.*define.*ELF_DYNAMIC_INTERPRETER.*\".*\"" $(BINUTILS_DIR)`);