summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-05 05:56:27 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-05 05:56:27 +0000
commitee1c13e232bc2a2a2758eec133be9c168d3fff7d (patch)
tree864075928aa21282515465fb5a3a88874a137176
parent9721bee58d9cbd447ed941bd24b0ee5a176410b5 (diff)
Standardize LIBGCC_DIR
-rw-r--r--Rules.mak1
-rw-r--r--extra/gcc-uClibc/Makefile5
-rw-r--r--extra/gcc-uClibc/gcc-uClibc.c8
-rw-r--r--libpthread/Makefile9
4 files changed, 10 insertions, 13 deletions
diff --git a/Rules.mak b/Rules.mak
index 0225d19ad..7051d839c 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -52,6 +52,7 @@ UCLIBC_LDSO:=ld-uClibc.so.$(MAJOR_VERSION)
LIBNAME:=libc.a
LIBC:=$(TOPDIR)libc/$(LIBNAME)
LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)
+LIBGCC_DIR:=$(dir $(LIBGCC))
# Pull in the user's uClibc configuration
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile
index 73d59bebb..e3991dcbf 100644
--- a/extra/gcc-uClibc/Makefile
+++ b/extra/gcc-uClibc/Makefile
@@ -10,8 +10,6 @@ include $(TOPDIR)Rules.mak
UCLIBC_DIR = $(shell (cd ../.. ; /bin/pwd))
GCC_BIN = $(shell which $(CC))
LD_BIN = $(shell which $(LD))
-GCC_LIB = $(shell $(CC) -print-libgcc-file-name )
-GCC_LIB_DIR = $(dir $(shell $(CC) -print-libgcc-file-name ))
GCCINCDIR:= ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
all: gcc-uClibc ld-uClibc
@@ -22,8 +20,7 @@ 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
- @echo "#define GCC_LIB " \"$(GCC_LIB)\" >> gcc-uClibc.h
- @echo "#define GCC_LIB_DIR " \"$(GCC_LIB_DIR)\" >> gcc-uClibc.h
+ @echo "#define LIBGCC_DIR " \"$(LIBGCC_DIR)\" >> gcc-uClibc.h
@echo "#define TARGET_ARCH " \"$(TARGET_ARCH)\" >> gcc-uClibc.h
@echo "#define DYNAMIC_LINKER " \"$(DYNAMIC_LINKER)\" >> gcc-uClibc.h
@echo "#define BUILD_DYNAMIC_LINKER " \"$(UCLIBC_DIR)/lib/$(UCLIBC_LDSO)\" >> gcc-uClibc.h
diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c
index 1974cc150..3ef156862 100644
--- a/extra/gcc-uClibc/gcc-uClibc.c
+++ b/extra/gcc-uClibc/gcc-uClibc.c
@@ -392,9 +392,9 @@ int main(int argc, char **argv)
if (ctor_dtor) {
gcc_argv[i++] = crti_path[use_build_dir];
if (use_pic) {
- gcc_argv[i++] = GCC_LIB_DIR "crtbeginS.o" ;
+ gcc_argv[i++] = LIBGCC_DIR "crtbeginS.o" ;
} else {
- gcc_argv[i++] = GCC_LIB_DIR "crtbegin.o" ;
+ gcc_argv[i++] = LIBGCC_DIR "crtbegin.o" ;
}
}
gcc_argv[i++] = crt0_path[use_build_dir];
@@ -420,9 +420,9 @@ int main(int argc, char **argv)
}
if (ctor_dtor) {
if (use_pic) {
- gcc_argv[i++] = GCC_LIB_DIR "crtendS.o" ;
+ gcc_argv[i++] = LIBGCC_DIR "crtendS.o" ;
} else {
- gcc_argv[i++] = GCC_LIB_DIR "crtend.o" ;
+ gcc_argv[i++] = LIBGCC_DIR "crtend.o" ;
}
gcc_argv[i++] = crtn_path[use_build_dir];
}
diff --git a/libpthread/Makefile b/libpthread/Makefile
index c76b0a8cd..c98ef8bda 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -36,13 +36,12 @@ ifeq ($(strip $(DODEBUG)),y)
endif
endif
-GCC_LIB_DIR = $(dir $(shell $(CC) -print-libgcc-file-name ))
ifeq ($(strip $(DOPIC)),y)
- START_FILES = $(TOPDIR)lib/crti.o $(GCC_LIB_DIR)crtbeginS.o
- END_FILES = $(GCC_LIB_DIR)crtendS.o $(TOPDIR)lib/crtn.o
+ START_FILES = $(TOPDIR)lib/crti.o $(LIBGCC_DIR)crtbeginS.o
+ END_FILES = $(LIBGCC_DIR)crtendS.o $(TOPDIR)lib/crtn.o
else
- START_FILES = $(TOPDIR)lib/crti.o $(GCC_LIB_DIR)crtbegin.o
- END_FILES = $(GCC_LIB_DIR)crtend.o $(TOPDIR)lib/crtn.o
+ START_FILES = $(TOPDIR)lib/crti.o $(LIBGCC_DIR)crtbegin.o
+ END_FILES = $(LIBGCC_DIR)crtend.o $(TOPDIR)lib/crtn.o
endif
ALL_SUBDIRS = linuxthreads linuxthreads_db