summaryrefslogtreecommitdiff
path: root/extra/gcc-uClibc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-12 21:41:31 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-12 21:41:31 +0000
commitffc7bb39cce77ae6243aa903f0cc1a96ab42bce8 (patch)
treeed630021880996199ec74be056c409c5ced9d66d /extra/gcc-uClibc
parentd6e6ee0202f8705a30b10b53eb259a2d62ece466 (diff)
This commit merges David Schleef's updates to the build system, which a
few tiny fixups here and there from me. Seems to work just fine and will hopefully be a bit better behaved. -Erik
Diffstat (limited to 'extra/gcc-uClibc')
-rw-r--r--extra/gcc-uClibc/Makefile33
-rw-r--r--extra/gcc-uClibc/gcc-uClibc.c12
2 files changed, 19 insertions, 26 deletions
diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile
index 0eb6cbc8a..0e3829a3e 100644
--- a/extra/gcc-uClibc/Makefile
+++ b/extra/gcc-uClibc/Makefile
@@ -11,7 +11,6 @@ all: gcc-uClibc ld-uClibc
gcc-uClibc.h: $(TOPDIR)/Config
@echo "/* this file was autogenerated by make */" > gcc-uClibc.h
- @echo "#define UCLIBC_ROOT_DIR " \"$(ROOT_DIR)\" >> gcc-uClibc.h
@echo "#define UCLIBC_DEVEL_PREFIX " \"$(DEVEL_PREFIX)\" >> gcc-uClibc.h
@echo "#define UCLIBC_BUILD_DIR " \"$(UCLIBC_DIR)/\" >> gcc-uClibc.h
@echo "#define GCC_BIN " \"$(GCC_BIN)\" >> gcc-uClibc.h
@@ -27,30 +26,24 @@ gcc-uClibc: gcc-uClibc.h gcc-uClibc.c
ld-uClibc:
@echo "#!/bin/sh" > $(TARGET_ARCH)-uclibc-ld
@echo "# This file was autogenerated by make" >> $(TARGET_ARCH)-uclibc-ld
- @echo "$(LD_BIN) -L- -L$(DEVEL_PREFIX)$(ROOT_DIR)/lib -L$(DEVEL_PREFIX)$(ROOT_DIR)/usr/lib "\
+ @echo "$(LD_BIN) -L- -L$(DEVEL_PREFIX)/lib -L$(DEVEL_PREFIX)/usr/lib "\
"-L$(UCLIBC_DIR) \$$@" >> $(TARGET_ARCH)-uclibc-ld
chmod a+x $(TARGET_ARCH)-uclibc-ld
install: all
- install -d $(DEVEL_PREFIX)$(ROOT_DIR)/bin;
- install -d $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin;
- if [ -x ./$(TARGET_ARCH)-uclibc-gcc ] ; then \
- install -m 755 $(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/ ; \
- install -m 755 $(TARGET_ARCH)-uclibc-ld $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/ ; \
- ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/bin/cc; \
- ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/bin/gcc; \
- ln -fs ../usr/bin/$(TARGET_ARCH)-uclibc-ld $(DEVEL_PREFIX)$(ROOT_DIR)/bin/ld; \
- ln -fs $(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-cc; \
- fi;
+ install -d $(DEVEL_PREFIX)/bin;
+ install -d $(PREFIX)/bin;
+ install -m 755 $(TARGET_ARCH)-uclibc-gcc $(PREFIX)/bin/
+ install -m 755 $(TARGET_ARCH)-uclibc-ld $(PREFIX)/bin/
+ ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-cc
+ ln -fs $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)/bin/gcc
+ ln -fs $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(DEVEL_PREFIX)/bin/cc
+ ln -fs $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-ld $(DEVEL_PREFIX)/bin/ld
for app in addr2line ar as cpp gasp nm objcopy \
- objdump ranlib size strings strip; do \
- ln -fs `which $(CROSS)$${app}` $(DEVEL_PREFIX)$(ROOT_DIR)/bin/$${app}; \
- done;
- for app in addr2line ar as cpp gasp nm objcopy \
- objdump ranlib size strings strip; do \
- ln -fs `which $(CROSS)$${app}` $(DEVEL_PREFIX)$(ROOT_DIR)/usr/bin/$(TARGET_ARCH)-uclibc-$${app}; \
- done;
-
+ objdump ranlib size strings strip; do \
+ ln -fs `which $(CROSS)$${app}` $(DEVEL_PREFIX)/bin/$${app}; \
+ ln -fs `which $(CROSS)$${app}` $(PREFIX)/bin/$(TARGET_ARCH)-uclibc-$${app}; \
+ done
clean:
rm -f gcc-uClibc.h *-uclibc-gcc *-uclibc-ld core
diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c
index 719cf621c..fc3a58dd7 100644
--- a/extra/gcc-uClibc/gcc-uClibc.c
+++ b/extra/gcc-uClibc/gcc-uClibc.c
@@ -78,31 +78,31 @@
#include "gcc-uClibc.h"
static char *rpath_link[] = {
- "-Wl,-rpath-link,"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/lib",
+ "-Wl,-rpath-link,"UCLIBC_DEVEL_PREFIX"/lib",
"-Wl,-rpath-link,"UCLIBC_BUILD_DIR"/lib"
};
static char *rpath[] = {
- "-Wl,-rpath,"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/lib",
+ "-Wl,-rpath,"UCLIBC_DEVEL_PREFIX"/lib",
"-Wl,-rpath,"UCLIBC_BUILD_DIR"/lib"
};
static char *uClibc_inc[] = {
- "-I"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/usr/include/",
+ "-I"UCLIBC_DEVEL_PREFIX"/include/",
"-I"UCLIBC_BUILD_DIR"/include/"
};
static char *crt0_path[] = {
- UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/usr/lib/crt0.o",
+ UCLIBC_DEVEL_PREFIX"/lib/crt0.o",
UCLIBC_BUILD_DIR"/lib/crt0.o"
};
static char *lib_path[] = {
- "-L"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/lib",
+ "-L"UCLIBC_DEVEL_PREFIX"/lib",
"-L"UCLIBC_BUILD_DIR"/lib"
};
-static char *usr_lib_path = "-L"UCLIBC_DEVEL_PREFIX UCLIBC_ROOT_DIR"/usr/lib";
+static char *usr_lib_path = "-L"UCLIBC_DEVEL_PREFIX"/lib";
static char static_linking[] = "-static";
static char nostdinc[] = "-nostdinc";