summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/autoconf.mk5
-rw-r--r--make/automake.mk7
-rw-r--r--make/bash.mk3
-rw-r--r--make/berkeleydb.mk2
-rw-r--r--make/coreutils.mk2
-rw-r--r--make/dhcp_relay.mk5
-rw-r--r--make/ext2root.mk2
-rw-r--r--make/findutils.mk2
-rw-r--r--make/gawk.mk5
-rw-r--r--make/gcc_target.mk37
-rw-r--r--make/gdb.mk4
-rw-r--r--make/gdbserver.mk4
-rw-r--r--make/jpeg.mk2
-rw-r--r--make/libglib12.mk2
-rw-r--r--make/libtool.mk3
-rw-r--r--make/links.mk2
-rw-r--r--make/lrzsz.mk2
-rw-r--r--make/m4.mk3
-rw-r--r--make/make.mk8
-rw-r--r--make/mke2fs.mk2
-rw-r--r--make/ncurses.mk14
-rw-r--r--make/netkitbase.mk2
-rw-r--r--make/netkittelnet.mk2
-rw-r--r--make/newt.mk2
-rw-r--r--make/ntp.mk2
-rw-r--r--make/openssh.mk2
-rw-r--r--make/openssl.mk8
-rw-r--r--make/pciutils.mk2
-rw-r--r--make/pppd.mk2
-rw-r--r--make/rxvt.mk2
-rw-r--r--make/sed.mk2
-rw-r--r--make/socat.mk2
-rw-r--r--make/strace.mk2
-rw-r--r--make/tn5250.mk2
-rw-r--r--make/uclibc_toolchain.mk121
-rw-r--r--make/uclibc_toolchain_2_95.mk70
-rw-r--r--make/udhcp.mk1
-rw-r--r--make/valgrind.mk5
-rw-r--r--make/zlib.mk3
39 files changed, 195 insertions, 153 deletions
diff --git a/make/autoconf.mk b/make/autoconf.mk
index 006770267..92b4df36d 100644
--- a/make/autoconf.mk
+++ b/make/autoconf.mk
@@ -20,8 +20,8 @@ $(AUTOCONF_DIR)/.unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE)
touch $(AUTOCONF_DIR)/.unpacked
$(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked
- (cd $(AUTOCONF_DIR); rm -rf config.cache; PATH=$(STAGING_DIR)/bin:$$PATH \
- CC=$(TARGET_CC) EMACS="no" \
+ (cd $(AUTOCONF_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) EMACS="no" \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -41,7 +41,6 @@ $(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY): $(AUTOCONF_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(AUTOCONF_DIR)
$(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY): $(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY)
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
diff --git a/make/automake.mk b/make/automake.mk
index 02e0d968b..bc226c10f 100644
--- a/make/automake.mk
+++ b/make/automake.mk
@@ -21,7 +21,7 @@ $(AUTOMAKE_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE)
$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
(cd $(AUTOMAKE_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -38,11 +38,10 @@ $(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
touch $(AUTOMAKE_DIR)/.configured
$(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY): $(AUTOMAKE_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(AUTOMAKE_DIR)
+ $(MAKE) -C $(AUTOMAKE_DIR)
touch -c $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
$(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY): $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
@@ -63,7 +62,7 @@ $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY): $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
automake: uclibc $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY)
automake-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(AUTOMAKE_DIR) uninstall
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(AUTOMAKE_DIR) uninstall
-$(MAKE) -C $(AUTOMAKE_DIR) clean
automake-dirclean:
diff --git a/make/bash.mk b/make/bash.mk
index 302244c65..da4c733ec 100644
--- a/make/bash.mk
+++ b/make/bash.mk
@@ -21,8 +21,7 @@ $(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE)
$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
(cd $(BASH_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH \
- CC=$(TARGET_CC) CC_FOR_BUILD=$(HOSTCC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) CC_FOR_BUILD=$(HOSTCC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/berkeleydb.mk b/make/berkeleydb.mk
index a907cec6e..e6bcfb29c 100644
--- a/make/berkeleydb.mk
+++ b/make/berkeleydb.mk
@@ -19,7 +19,7 @@ $(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE)
$(DB_DIR)/.configured: $(DB_DIR)/.dist
(cd $(DB_DIR)/build_unix; rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
../dist/configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/coreutils.mk b/make/coreutils.mk
index 96869e096..ebfd11b9a 100644
--- a/make/coreutils.mk
+++ b/make/coreutils.mk
@@ -23,7 +23,7 @@ $(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE)
$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
(cd $(COREUTILS_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/dhcp_relay.mk b/make/dhcp_relay.mk
index a5e24d1ef..31651ef8c 100644
--- a/make/dhcp_relay.mk
+++ b/make/dhcp_relay.mk
@@ -23,10 +23,7 @@ $(DHCP_RELAY_DIR)/.unpacked: $(DL_DIR)/$(DHCP_RELAY_SOURCE)
touch $(DHCP_RELAY_DIR)/.unpacked
$(DHCP_RELAY_DIR)/.configured: $(DHCP_RELAY_DIR)/.unpacked
- (cd $(DHCP_RELAY_DIR); PATH=$(STAGING_DIR)/bin:$$PATH \
- CC=$(TARGET_CC) \
- ./configure \
- );
+ (cd $(DHCP_RELAY_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) ./configure );
touch $(DHCP_RELAY_DIR)/.configured
$(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_RELAY_DIR)/.configured
diff --git a/make/ext2root.mk b/make/ext2root.mk
index f9c79b000..e5ad68968 100644
--- a/make/ext2root.mk
+++ b/make/ext2root.mk
@@ -37,7 +37,7 @@ GENEXT2_REALSIZE=$(subst total,, $(shell du $(TARGET_DIR) -s -c -k | grep total
GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE))
# We currently add about 400 device nodes, so add that into the total
GENEXT2_INODES=$(shell expr $(shell find $(TARGET_DIR) | wc -l) + 400)
-#GENEXT2_SIZE=100000
+GENEXT2_SIZE=100000
ext2root: genext2fs
-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true;
diff --git a/make/findutils.mk b/make/findutils.mk
index 0a521cfa2..540965e5e 100644
--- a/make/findutils.mk
+++ b/make/findutils.mk
@@ -24,7 +24,7 @@ $(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
(cd $(FINDUTILS_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/gawk.mk b/make/gawk.mk
index 84e85c27e..691dff4a7 100644
--- a/make/gawk.mk
+++ b/make/gawk.mk
@@ -21,7 +21,7 @@ $(GAWK_DIR)/.unpacked: $(DL_DIR)/$(GAWK_SOURCE)
$(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked
(cd $(GAWK_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -42,7 +42,10 @@ $(GAWK_DIR)/$(GAWK_BINARY): $(GAWK_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GAWK_DIR)
$(TARGET_DIR)/$(GAWK_TARGET_BINARY): $(GAWK_DIR)/$(GAWK_BINARY)
+ rm -f $(TARGET_DIR)/usr/bin/awk
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GAWK_DIR) install
+ rm -f $(TARGET_DIR)/usr/bin/gawk-*
+ (cd $(TARGET_DIR)/usr/bin; ln -sf gawk awk)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
diff --git a/make/gcc_target.mk b/make/gcc_target.mk
index 7bef9ff61..6c1236b58 100644
--- a/make/gcc_target.mk
+++ b/make/gcc_target.mk
@@ -48,10 +48,8 @@ $(BINUTILS_DIR2)/.configured:
mkdir -p $(BINUTILS_DIR2)
mkdir -p $(TARGET_DIR)/usr/include
mkdir -p $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/
- #(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../lib)
- #(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include)
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
- (cd $(BINUTILS_DIR2); PATH=$(STAGING_DIR)/bin:$$PATH AR=$(TARGET_CROSS)ar \
+ (cd $(BINUTILS_DIR2); PATH=$(TARGET_PATH) AR=$(TARGET_CROSS)ar \
RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld NM=$(TARGET_CROSS)nm \
CC=$(TARGET_CROSS)gcc \
$(BINUTILS_DIR)/configure \
@@ -70,23 +68,24 @@ $(BINUTILS_DIR2)/.configured:
--infodir=/usr/info \
--includedir=$(STAGING_DIR)/include \
--with-gxx-include-dir=$(STAGING_DIR)/include/c++ \
- --disable-shared $(MULTILIB) \
+ --enable-shared $(MULTILIB) \
--program-prefix="" \
);
touch $(BINUTILS_DIR2)/.configured
$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
- PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) AR=$(TARGET_CROSS)ar \
+ $(MAKE) AR=$(TARGET_CROSS)ar \
RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld \
CC=$(TARGET_CROSS)gcc GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc -C $(BINUTILS_DIR2)
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc tooldir=/usr -C $(BINUTILS_DIR2)
$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(HOSTCC) GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ CC=$(HOSTCC) GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
AR_FOR_TARGET=$(TARGET_CROSS)ar RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
LD_FOR_TARGET=$(TARGET_CROSS)ld NM_FOR_TARGET=$(TARGET_CROSS)nm \
CC_FOR_TARGET=$(TARGET_CROSS)gcc \
$(MAKE) \
+ tooldor=/usr \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
@@ -109,7 +108,16 @@ $(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
-$(STRIP) $(TARGET_DIR)/usr/bin/*
$(TARGET_DIR)/usr/lib/libg.a:
- $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ar rv $(TARGET_DIR)/usr/lib/libg.a;
+ $(TARGET_CROSS)ar rv $(TARGET_DIR)/usr/lib/libg.a;
+ cp $(BINUTILS_DIR)/include/ansidecl.h $(TARGET_DIR)/usr/include/
+ cp $(BINUTILS_DIR)/include/bfdlink.h $(TARGET_DIR)/usr/include/
+ cp $(BINUTILS_DIR)/include/dis-asm.h $(TARGET_DIR)/usr/include/
+ cp $(BINUTILS_DIR)/include/libiberty.h $(TARGET_DIR)/usr/include/
+ cp $(BINUTILS_DIR)/include/symcat.h $(TARGET_DIR)/usr/include/
+ cp $(BINUTILS_DIR2)/bfd/bfd.h $(TARGET_DIR)/usr/include/
+ cp -a $(BINUTILS_DIR2)/bfd/.libs/* $(TARGET_DIR)/usr/lib/
+ cp -a $(BINUTILS_DIR2)/opcodes/.libs/* $(TARGET_DIR)/usr/lib/
+ cp -a $(BINUTILS_DIR2)/libiberty/libiberty.a $(TARGET_DIR)/usr/lib/
binutils_target: gcc_final $(TARGET_DIR)/usr/bin/ld $(TARGET_DIR)/usr/lib/libg.a
@@ -133,6 +141,8 @@ $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/lib/libc.a
$(MAKE) DEVEL_PREFIX=$(TARGET_DIR)/usr SYSTEM_DEVEL_PREFIX=$(TARGET_DIR) \
DEVEL_TOOL_PREFIX=$(TARGET_DIR) -C $(UCLIBC_DIR) \
install_dev
+ #remove the extra copy of the shared libs
+ rm -f $(TARGET_DIR)/usr/lib/*-*.so
(cd $(TARGET_DIR)/usr/lib; \
ln -fs /lib/libc.so.0 libc.so; \
ln -fs /lib/libdl.so.0 libdl.so; \
@@ -141,6 +151,7 @@ $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/lib/libc.a
ln -fs /lib/libutil.so.0 libutil.so; \
ln -fs /lib/libm.so.0 libm.so; \
ln -fs /lib/libpthread.so.0 libpthread.so; \
+ ln -fs /lib/libnsl.so.0 libnsl.so; \
)
uclibc_target: gcc_final $(TARGET_DIR)/usr/lib/libc.a
@@ -183,7 +194,7 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc_build_hacks
mkdir -p $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include)
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
- (cd $(GCC_BUILD_DIR3); PATH=$(STAGING_DIR)/bin:$$PATH \
+ (cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \
AS=$(TARGET_CROSS)as \
LD=$(TARGET_CROSS)ld \
AR=$(TARGET_CROSS)ar \
@@ -218,7 +229,6 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc_build_hacks
touch $(GCC_BUILD_DIR3)/.configured
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
- PATH=$(STAGING_DIR)/bin:$$PATH \
AS=$(TARGET_CROSS)as \
LD=$(TARGET_CROSS)ld \
AR=$(TARGET_CROSS)ar \
@@ -231,7 +241,6 @@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
touch $(GCC_BUILD_DIR3)/.compiled
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
- PATH=$(STAGING_DIR)/bin:$$PATH \
$(MAKE) \
CC=$(TARGET_CROSS)gcc \
AS=$(TARGET_CROSS)as \
@@ -263,14 +272,20 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
(cd $(TARGET_DIR)/usr/bin; ln -fs gcc cc)
rm -rf $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/include
rm -rf $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/sys-include
+ rm -rf $(TARGET_DIR)/usr/include/include $(TARGET_DIR)/usr/usr
-mv $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-cpp $(TARGET_DIR)/usr/bin/cpp
-mv $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc $(TARGET_DIR)/usr/bin/gcc
-mv $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-c++ $(TARGET_DIR)/usr/bin/c++
-mv $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-g++ $(TARGET_DIR)/usr/bin/g++
-mv $(TARGET_DIR)/usr/bin/$(GNU_TARGET_NAME)-c++filt $(TARGET_DIR)/usr/bin/c++filt
-cp -dpf $(STAGING_DIR)/lib/libgcc* $(TARGET_DIR)/lib/
+ chmod a-x $(STAGING_DIR)/lib/*++*
cp -a $(STAGING_DIR)/lib/*++* $(TARGET_DIR)/lib/
cp -a $(STAGING_DIR)/include/c++ $(TARGET_DIR)/usr/include/
+ -mv $(TARGET_DIR)/lib/*.a $(TARGET_DIR)/usr/lib/
+ -mv $(TARGET_DIR)/lib/*.la $(TARGET_DIR)/usr/lib/
+ rm -f $(TARGET_DIR)/lib/libstdc++.so
+ (cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libstdc++.a libstdc++.so)
-$(STRIP) $(TARGET_DIR)/bin/*
-$(STRIP) $(TARGET_DIR)/usr/bin/*
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
diff --git a/make/gdb.mk b/make/gdb.mk
index 851c3ddbb..5b6650af7 100644
--- a/make/gdb.mk
+++ b/make/gdb.mk
@@ -17,10 +17,10 @@ $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE)
$(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
(cd $(GDB_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH AR=$(TARGET_CROSS)ar \
+ AR=$(TARGET_CROSS)ar \
AS=$(TARGET_CROSS)as LD=$(TARGET_CROSS)ld \
RANLIB=$(TARGET_CROSS)ranlib NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/gdbserver.mk b/make/gdbserver.mk
index e9e04da5d..c1ef1f1aa 100644
--- a/make/gdbserver.mk
+++ b/make/gdbserver.mk
@@ -12,10 +12,10 @@ GDB_WDIR:=$(BUILD_DIR)/gdbserver
$(GDB_WDIR)/.configured: $(GDB_DIR)/.unpacked
mkdir -p $(GDB_WDIR)
(cd $(GDB_WDIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH AR=$(TARGET_CROSS)ar \
+ AR=$(TARGET_CROSS)ar \
AS=$(TARGET_CROSS)as LD=$(TARGET_CROSS)ld \
RANLIB=$(TARGET_CROSS)ranlib NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
$(GDB_DIR)/gdb/gdbserver/configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/jpeg.mk b/make/jpeg.mk
index 6cb8ec423..34e985e5d 100644
--- a/make/jpeg.mk
+++ b/make/jpeg.mk
@@ -37,7 +37,7 @@ $(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
$(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
zcat $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) -xvf -
(cd $(JPEG_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/libglib12.mk b/make/libglib12.mk
index 6519239d5..07218e4c3 100644
--- a/make/libglib12.mk
+++ b/make/libglib12.mk
@@ -20,7 +20,7 @@ $(LIBGLIB12_DIR)/.unpacked: $(DL_DIR)/$(LIBGLIB12_SOURCE)
$(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked
(cd $(LIBGLIB12_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/libtool.mk b/make/libtool.mk
index b1871eaa9..6043f5285 100644
--- a/make/libtool.mk
+++ b/make/libtool.mk
@@ -21,7 +21,7 @@ $(LIBTOOL_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
$(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked
(cd $(LIBTOOL_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -43,7 +43,6 @@ $(LIBTOOL_DIR)/$(LIBTOOL_BINARY): $(LIBTOOL_DIR)/.configured
touch -c $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
$(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY): $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
diff --git a/make/links.mk b/make/links.mk
index 6aab1f314..d664cc8f3 100644
--- a/make/links.mk
+++ b/make/links.mk
@@ -18,7 +18,7 @@ $(LINKS_DIR)/.unpacked: $(DL_DIR)/$(LINKS_SOURCE)
$(LINKS_DIR)/.configured: $(LINKS_DIR)/.unpacked
(cd $(LINKS_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/lrzsz.mk b/make/lrzsz.mk
index 0ed34f597..a212052ba 100644
--- a/make/lrzsz.mk
+++ b/make/lrzsz.mk
@@ -36,7 +36,7 @@ $(LRZSZ_DIR)/.unpacked: $(DL_DIR)/$(LRZSZ_SOURCE)
$(LRZSZ_DIR)/.configured: $(LRZSZ_DIR)/.unpacked
(cd $(LRZSZ_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/m4.mk b/make/m4.mk
index 4c96eda75..8be5ddedb 100644
--- a/make/m4.mk
+++ b/make/m4.mk
@@ -21,7 +21,7 @@ $(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE)
$(M4_DIR)/.configured: $(M4_DIR)/.unpacked
(cd $(M4_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -33,7 +33,6 @@ $(M4_DIR)/src/$(M4_BINARY): $(M4_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(M4_DIR)
$(TARGET_DIR)/$(M4_TARGET_BINARY): $(M4_DIR)/src/$(M4_BINARY)
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
diff --git a/make/make.mk b/make/make.mk
index b0a82a83e..08240d937 100644
--- a/make/make.mk
+++ b/make/make.mk
@@ -21,7 +21,7 @@ $(GNUMAKE_DIR)/.unpacked: $(DL_DIR)/$(GNUMAKE_SOURCE)
$(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked
(cd $(GNUMAKE_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -39,17 +39,17 @@ $(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked
touch $(GNUMAKE_DIR)/.configured
$(GNUMAKE_DIR)/$(GNUMAKE_BINARY): $(GNUMAKE_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(GNUMAKE_DIR)
+ $(MAKE) -C $(GNUMAKE_DIR)
$(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY): $(GNUMAKE_DIR)/$(GNUMAKE_BINARY)
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GNUMAKE_DIR) install
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
make: uclibc $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY)
make-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GNUMAKE_DIR) uninstall
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) uninstall
-$(MAKE) -C $(GNUMAKE_DIR) clean
make-dirclean:
diff --git a/make/mke2fs.mk b/make/mke2fs.mk
index 2d340cb84..589da672b 100644
--- a/make/mke2fs.mk
+++ b/make/mke2fs.mk
@@ -21,7 +21,7 @@ $(MKE2FS_DIR)/.unpacked: $(DL_DIR)/$(MKE2FS_SOURCE)
$(MKE2FS_DIR)/.configured: $(MKE2FS_DIR)/.unpacked
(cd $(MKE2FS_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--with-cc=$(TARGET_CC) \
diff --git a/make/ncurses.mk b/make/ncurses.mk
index 692a5ba84..7ff8f73c7 100644
--- a/make/ncurses.mk
+++ b/make/ncurses.mk
@@ -5,7 +5,7 @@
#
#############################################################
# Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
-# $Id: ncurses.mk,v 1.20 2003/01/23 01:18:58 andersen Exp $
+# $Id: ncurses.mk,v 1.21 2003/02/12 08:10:38 andersen Exp $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as
@@ -38,8 +38,9 @@ $(NCURSES_DIR)/.dist: $(DL_DIR)/$(NCURSES_SOURCE)
touch $(NCURSES_DIR)/.dist
$(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist
- (cd $(NCURSES_DIR); rm -rf config.cache; PATH=$(STAGING_DIR)/bin:$$PATH \
- BUILD_CC=$(HOSTCC) HOSTCC=$(HOSTCC) CC=$(TARGET_CC) \
+ (cd $(NCURSES_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) BUILD_CC=$(HOSTCC) \
+ HOSTCC=$(HOSTCC) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -65,7 +66,7 @@ $(NCURSES_DIR)/lib/libncurses.so: $(NCURSES_DIR)/.configured
DESTDIR=$(STAGING_DIR) -C $(NCURSES_DIR)
$(STAGING_DIR)/lib/libncurses.a: $(NCURSES_DIR)/lib/libncurses.so
- PATH=$(STAGING_DIR)/bin:$$PATH BUILD_CC=$(HOSTCC) \
+ BUILD_CC=$(HOSTCC) \
HOSTCC=$(HOSTCC) CC=$(TARGET_CC) $(MAKE) \
prefix=$(STAGING_DIR) \
exec_prefix=$(STAGING_DIR) \
@@ -82,6 +83,7 @@ $(STAGING_DIR)/lib/libncurses.a: $(NCURSES_DIR)/lib/libncurses.so
gxx_include_dir=$(STAGING_DIR)/include/c++ \
ticdir=$(STAGING_DIR)/usr/share/terminfo \
-C $(NCURSES_DIR) install;
+ chmod a-x $(NCURSES_DIR)/lib/libncurses.so*
touch -c $(STAGING_DIR)/lib/libncurses.a
$(TARGET_DIR)/lib/libncurses.so: $(STAGING_DIR)/lib/libncurses.a
@@ -98,9 +100,13 @@ $(TARGET_DIR)/usr/lib/libncurses.a: $(TARGET_DIR)/lib/libncurses.so
cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/
cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/
cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/
+ rm -f $(TARGET_DIR)/usr/lib/terminfo
+ (cd $(TARGET_DIR)/usr/lib; ln -fs /usr/share/terminfo)
(cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libcurses.a)
(cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libtermcap.a)
(cd $(TARGET_DIR)/usr/include; ln -fs ncurses.h curses.h)
+ rm -f $(TARGET_DIR)/lib/libncurses.so
+ (cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libncurses.so.5.2 libncurses.so)
touch -c $(TARGET_DIR)/usr/lib/libncurses.a
ncurses-headers: $(TARGET_DIR)/usr/lib/libncurses.a
diff --git a/make/netkitbase.mk b/make/netkitbase.mk
index e0d92c4f6..262b459e0 100644
--- a/make/netkitbase.mk
+++ b/make/netkitbase.mk
@@ -24,7 +24,7 @@ $(NETKITBASE_DIR)/.unpacked: $(DL_DIR)/$(NETKITBASE_SOURCE)
touch $(NETKITBASE_DIR)/.unpacked
$(NETKITBASE_DIR)/.configured: $(NETKITBASE_DIR)/.unpacked
- (cd $(NETKITBASE_DIR); PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ (cd $(NETKITBASE_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \
)
touch $(NETKITBASE_DIR)/.configured
diff --git a/make/netkittelnet.mk b/make/netkittelnet.mk
index a082764af..ab4a2cb26 100644
--- a/make/netkittelnet.mk
+++ b/make/netkittelnet.mk
@@ -27,7 +27,7 @@ $(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE)
touch $(NETKITTELNET_DIR)/.unpacked
$(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked
- (cd $(NETKITTELNET_DIR); PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ (cd $(NETKITTELNET_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \
)
touch $(NETKITTELNET_DIR)/.configured
diff --git a/make/newt.mk b/make/newt.mk
index 4cdb70532..5fc322eb6 100644
--- a/make/newt.mk
+++ b/make/newt.mk
@@ -23,7 +23,7 @@ $(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE)
$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source
(cd $(NEWT_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/ntp.mk b/make/ntp.mk
index 6e29565ea..e7c820aeb 100644
--- a/make/ntp.mk
+++ b/make/ntp.mk
@@ -24,7 +24,7 @@ $(NTP_DIR)/.unpacked: $(DL_DIR)/$(NTP_SOURCE)
$(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked
(cd $(NTP_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/openssh.mk b/make/openssh.mk
index 7a00934ae..21a04c2a7 100644
--- a/make/openssh.mk
+++ b/make/openssh.mk
@@ -17,7 +17,7 @@ $(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE)
$(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked
(cd $(OPENSSH_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/openssl.mk b/make/openssl.mk
index 89490a391..9dc5e34dc 100644
--- a/make/openssl.mk
+++ b/make/openssl.mk
@@ -32,9 +32,11 @@ $(OPENSSL_DIR)/apps/openssl: $(OPENSSL_DIR)/Makefile
$(STAGING_DIR)/lib/libcrypto.so.0: $(OPENSSL_DIR)/apps/openssl
$(MAKE) CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(OPENSSL_DIR) install
cp -fa $(OPENSSL_DIR)/libcrypto.so* $(STAGING_DIR)/lib/
+ chmod a-x $(STAGING_DIR)/lib/libcrypto.so.0.9.7
(cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so)
(cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so.0)
cp -fa $(OPENSSL_DIR)/libssl.so* $(STAGING_DIR)/lib/
+ chmod a-x $(STAGING_DIR)/lib/libssl.so.0.9.7
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so)
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so.0)
@@ -48,6 +50,12 @@ $(TARGET_DIR)/usr/lib/libssl.a: $(TARGET_DIR)/lib/libcrypto.so.0
cp -a $(STAGING_DIR)/include/openssl $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/lib/libssl.a $(TARGET_DIR)/usr/lib/
cp -dpf $(STAGING_DIR)/lib/libcrypto.a $(TARGET_DIR)/usr/lib/
+ rm -f $(TARGET_DIR)/lib/libcrypto.so
+ rm -f $(TARGET_DIR)/lib/libssl.so
+ (cd $(TARGET_DIR)/usr/lib; \
+ ln -fs /lib/libssl.so.0.9.7 libssl.so; \
+ ln -fs /lib/libcrypto.so.0.9.7 libcrypto.so; \
+ )
touch -c $(TARGET_DIR)/usr/lib/libssl.a
openssl-headers: $(TARGET_DIR)/usr/lib/libssl.a
diff --git a/make/pciutils.mk b/make/pciutils.mk
index 893b472b0..8daf033f7 100644
--- a/make/pciutils.mk
+++ b/make/pciutils.mk
@@ -28,7 +28,7 @@ $(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURC
$(PCIUTILS_DIR)/.configured: $(PCIUTILS_DIR)/.unpacked
(cd $(PCIUTILS_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/pppd.mk b/make/pppd.mk
index 2daf27a66..81fa87b51 100644
--- a/make/pppd.mk
+++ b/make/pppd.mk
@@ -26,7 +26,7 @@ $(PPPD_DIR)/.unpacked: $(DL_DIR)/$(PPPD_SOURCE)
$(PPPD_DIR)/.configured: $(PPPD_DIR)/.unpacked
(cd $(PPPD_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/rxvt.mk b/make/rxvt.mk
index fd85643cd..0d6e9732b 100644
--- a/make/rxvt.mk
+++ b/make/rxvt.mk
@@ -38,7 +38,7 @@ $(RXVT_DIR)/.unpacked: $(DL_DIR)/$(RXVT_SOURCE)
$(RXVT_DIR)/.configured: $(RXVT_DIR)/.unpacked
(cd $(RXVT_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr/X11R6 \
diff --git a/make/sed.mk b/make/sed.mk
index 383ba6477..1b0b66577 100644
--- a/make/sed.mk
+++ b/make/sed.mk
@@ -21,7 +21,7 @@ $(SED_DIR)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
$(SED_DIR)/.configured: $(SED_DIR)/.unpacked
(cd $(SED_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/socat.mk b/make/socat.mk
index d64612970..92344d07c 100644
--- a/make/socat.mk
+++ b/make/socat.mk
@@ -27,7 +27,7 @@ $(SOCAT_WORKDIR)/Makefile: $(SOCAT_DIR)/.unpacked
rm -f $(SOCAT_WORKDIR)/Makefile
mkdir -p $(SOCAT_WORKDIR)
(cd $(SOCAT_WORKDIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
$(SOCAT_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/strace.mk b/make/strace.mk
index d4b2b41f9..fdca1ee0d 100644
--- a/make/strace.mk
+++ b/make/strace.mk
@@ -20,7 +20,7 @@ $(STRACE_DIR)/.unpacked: $(DL_DIR)/$(STRACE_SOURCE)
$(STRACE_DIR)/.configured: $(STRACE_DIR)/.unpacked
(cd $(STRACE_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/tn5250.mk b/make/tn5250.mk
index 3ac95e895..d37d4f474 100644
--- a/make/tn5250.mk
+++ b/make/tn5250.mk
@@ -11,7 +11,7 @@ $(TN5250_DIR)/.dist: $(DL_DIR)/$(TN5250_SOURCE)
$(TN5250_DIR)/.configured: $(TN5250_DIR)/.dist
(cd $(TN5250_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
diff --git a/make/uclibc_toolchain.mk b/make/uclibc_toolchain.mk
index d8ccea34a..a262666f6 100644
--- a/make/uclibc_toolchain.mk
+++ b/make/uclibc_toolchain.mk
@@ -25,6 +25,9 @@ ifeq ($(GCC_2_95_TOOLCHAIN),false)
# hacking on the toolchain...
#
#############################################################
+#Directory in which to build the toolchain
+TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build
+
TARGET_LANGUAGES:=c,c++
# If you want multilib enabled, enable this...
@@ -40,12 +43,12 @@ MULTILIB:=--enable-multilib
#############################################################
BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
BINUTILS_SOURCE:=binutils-2.13.2.1.tar.bz2
-BINUTILS_DIR:=$(BUILD_DIR)/binutils-2.13.2.1
+BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.13.2.1
#
# Perhaps you would perfer to use the older 2.12.1 version?
#BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
#BINUTILS_SOURCE:=binutils-2.12.1.tar.bz2
-#BINUTILS_DIR:=$(BUILD_DIR)/binutils-2.12.1
+#BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.12.1
ifeq ($(USE_UCLIBC_SNAPSHOT),true)
# Be aware that this changes daily....
@@ -60,7 +63,7 @@ endif
GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/
GCC_SOURCE:=gcc-3.2.2.tar.gz
-GCC_DIR:=$(BUILD_DIR)/gcc-3.2.2
+GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-3.2.2
@@ -69,19 +72,20 @@ GCC_DIR:=$(BUILD_DIR)/gcc-3.2.2
# Setup some initial paths
#
#############################################################
-$(BUILD_DIR)/.setup:
- mkdir -p $(BUILD_DIR)
+$(TOOL_BUILD_DIR)/.setup:
+ mkdir -p $(TOOL_BUILD_DIR)
mkdir -p $(DL_DIR)
mkdir -p $(STAGING_DIR)
mkdir -p $(STAGING_DIR)/include
mkdir -p $(STAGING_DIR)/lib/gcc-lib
+ mkdir -p $(STAGING_DIR)/usr/lib
+ mkdir -p $(STAGING_DIR)/usr/bin;
mkdir -p $(STAGING_DIR)/$(GNU_TARGET_NAME)/
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME); ln -fs ../lib)
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME); ln -fs ../include)
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
- mkdir -p $(STAGING_DIR)/usr/lib
(cd $(STAGING_DIR)/usr/lib; ln -fs ../../lib/gcc-lib)
- touch $(BUILD_DIR)/.setup
+ touch $(TOOL_BUILD_DIR)/.setup
#############################################################
@@ -102,12 +106,12 @@ uclibc_toolchain-dirclean: gcc_final-dirclean uclibc-dirclean gcc_initial-dircle
# build binutils
#
#############################################################
-BINUTILS_DIR1:=$(BUILD_DIR)/binutils-build
+BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-build
$(DL_DIR)/$(BINUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE)
-$(BINUTILS_DIR)/.unpacked: $(BUILD_DIR)/.setup $(DL_DIR)/$(BINUTILS_SOURCE)
- bzcat $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+$(BINUTILS_DIR)/.unpacked: $(TOOL_BUILD_DIR)/.setup $(DL_DIR)/$(BINUTILS_SOURCE)
+ bzcat $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(BINUTILS_DIR)/.unpacked
$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
@@ -128,7 +132,8 @@ $(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(BINUTILS_DIR1)
- (cd $(BINUTILS_DIR1); CC=$(HOSTCC) $(BINUTILS_DIR)/configure \
+ (cd $(BINUTILS_DIR1); CC=$(HOSTCC) \
+ $(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
@@ -153,6 +158,20 @@ $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump
$(MAKE) -C $(BINUTILS_DIR1) install
rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
$(STAGING_DIR)/share/locale
+ mkdir -p $(STAGING_DIR)/usr/bin;
+ set -e; \
+ for app in addr2line ar as c++filt gprof ld nm objcopy \
+ objdump ranlib readelf size strings strip ; \
+ do \
+ if [ -x $(STAGING_DIR)/bin/$(ARCH)-uclibc-$${app} ] ; then \
+ (cd $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin; \
+ ln -fs ../../bin/$(ARCH)-uclibc-$${app} $${app}; \
+ ); \
+ (cd $(STAGING_DIR)/usr/bin; \
+ ln -fs ../../bin/$(ARCH)-uclibc-$${app} $${app}; \
+ ); \
+ fi; \
+ done;
$(STAGING_DIR)/lib/libg.a:
$(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ar rv $(STAGING_DIR)/lib/libg.a;
@@ -174,12 +193,12 @@ binutils-dirclean:
# Next build first pass gcc compiler
#
#############################################################
-GCC_BUILD_DIR1:=$(BUILD_DIR)/gcc-initial
+GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-initial
$(DL_DIR)/$(GCC_SOURCE):
$(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
-$(GCC_DIR)/.unpacked: $(BUILD_DIR)/.setup $(DL_DIR)/$(GCC_SOURCE)
- zcat $(DL_DIR)/$(GCC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+$(GCC_DIR)/.unpacked: $(TOOL_BUILD_DIR)/.setup $(DL_DIR)/$(GCC_SOURCE)
+ zcat $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(GCC_DIR)/.unpacked
$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
@@ -223,8 +242,9 @@ $(GCC_DIR)/.gcc_build_hacks: $(GCC_DIR)/.patched
# # the step or libgcc will not build...
$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc_build_hacks
mkdir -p $(GCC_BUILD_DIR1)
- (cd $(GCC_BUILD_DIR1); PATH=$(STAGING_DIR)/bin:$$PATH AR=$(ARCH)-uclibc-ar \
- RANLIB=$(ARCH)-uclibc-ranlib CC=$(HOSTCC) $(GCC_DIR)/configure \
+ (cd $(GCC_BUILD_DIR1); AR=$(ARCH)-uclibc-ar \
+ RANLIB=$(ARCH)-uclibc-ranlib CC=$(HOSTCC) \
+ $(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
@@ -245,22 +265,21 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc_build_hacks
touch $(GCC_BUILD_DIR1)/.configured
$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
- PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) -C $(GCC_BUILD_DIR1) \
+ $(MAKE) -C $(GCC_BUILD_DIR1) \
AR_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ar \
RANLIB_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ranlib
touch $(GCC_BUILD_DIR1)/.compiled
-$(GCC_BUILD_DIR1)/.installed: $(GCC_BUILD_DIR1)/.compiled
- PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) -C $(GCC_BUILD_DIR1) install;
+$(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc: $(GCC_BUILD_DIR1)/.compiled
+ $(MAKE) -C $(GCC_BUILD_DIR1) install;
#Cleanup then mess when --program-prefix mysteriously fails
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-uclibc-cpp
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
rm -f $(STAGING_DIR)/bin/gccbug $(STAGING_DIR)/bin/gcov
rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
$(STAGING_DIR)/share/locale
- touch $(GCC_BUILD_DIR1)/.installed
-gcc_initial: binutils $(UCLIBC_DIR)/.configured $(GCC_BUILD_DIR1)/.installed
+gcc_initial: binutils $(UCLIBC_DIR)/.configured $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
gcc_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
@@ -282,7 +301,7 @@ gcc_initial-dirclean:
$(DL_DIR)/$(UCLIBC_SOURCE):
$(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE)
-$(UCLIBC_DIR)/.unpacked: $(BUILD_DIR)/.setup $(DL_DIR)/$(UCLIBC_SOURCE)
+$(UCLIBC_DIR)/.unpacked: $(TOOL_BUILD_DIR)/.setup $(DL_DIR)/$(UCLIBC_SOURCE)
bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(UCLIBC_DIR)/.unpacked
@@ -324,11 +343,13 @@ $(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/lib/libc.a
$(TARGET_DIR)/usr/bin/ldd: $(TARGET_DIR)/lib/libc.so.0
$(MAKE) -C $(UCLIBC_DIR) PREFIX=$(TARGET_DIR) install_target_utils
+ (cd $(TARGET_DIR)/sbin; ln -s /bin/true ldconfig)
UCLIBC_TARGETS=$(TARGET_DIR)/lib/libc.so.0 $(TARGET_DIR)/usr/bin/ldd
endif
-uclibc: gcc_initial $(STAGING_DIR)/lib/libc.a $(UCLIBC_TARGETS)
+uclibc: $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc $(STAGING_DIR)/lib/libc.a \
+ $(UCLIBC_TARGETS)
uclibc-clean:
-$(MAKE) -C $(UCLIBC_DIR) clean
@@ -347,7 +368,7 @@ uclibc-dirclean:
# the newly built shared uClibc library.
#
#############################################################
-GCC_BUILD_DIR2:=$(BUILD_DIR)/gcc-final
+GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-final
$(GCC_DIR)/.g++_build_hacks: $(GCC_DIR)/.patched
#
# Hack up the soname for libstdc++
@@ -373,9 +394,10 @@ $(GCC_DIR)/.g++_build_hacks: $(GCC_DIR)/.patched
$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
mkdir -p $(GCC_BUILD_DIR2)
- (cd $(GCC_BUILD_DIR2); PATH=$(STAGING_DIR)/bin:$$PATH AR=$(TARGET_CROSS)ar \
- RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld NM=$(TARGET_CROSS)nm \
- CC=$(HOSTCC) $(GCC_DIR)/configure \
+ (cd $(GCC_BUILD_DIR2); AR=$(TARGET_CROSS)ar \
+ RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld \
+ NM=$(TARGET_CROSS)nm CC=$(HOSTCC) \
+ $(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
@@ -401,21 +423,20 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
touch $(GCC_BUILD_DIR2)/.configured
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(HOSTCC) \
+ CC=$(HOSTCC) \
AR_FOR_TARGET=$(TARGET_CROSS)ar RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
LD_FOR_TARGET=$(TARGET_CROSS)ld NM_FOR_TARGET=$(TARGET_CROSS)nm \
CC_FOR_TARGET=$(TARGET_CROSS)gcc $(MAKE) -C $(GCC_BUILD_DIR2)
touch $(GCC_BUILD_DIR2)/.compiled
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
- PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) -C $(GCC_BUILD_DIR2) install;
touch $(GCC_BUILD_DIR2)/.installed
-#Cleanup then mess when --program-prefix mysteriously fails
-$(GCC_BUILD_DIR2)/.fixedup: $(GCC_BUILD_DIR2)/.installed
- -mv $(STAGING_DIR)/bin/gcc $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin;
- -mv $(STAGING_DIR)/bin/protoize $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin;
- -mv $(STAGING_DIR)/bin/unprotoize $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin;
+$(STAGING_DIR)/bin/$(ARCH)-uclibc-g++: $(GCC_BUILD_DIR2)/.compiled
+ $(MAKE) -C $(GCC_BUILD_DIR2) install;
+ -mv $(STAGING_DIR)/bin/gcc $(STAGING_DIR)/usr/bin;
+ -mv $(STAGING_DIR)/bin/protoize $(STAGING_DIR)/usr/bin;
+ -mv $(STAGING_DIR)/bin/unprotoize $(STAGING_DIR)/usr/bin;
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-uclibc-cpp
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin/$(ARCH)-uclibc-c++
@@ -424,32 +445,20 @@ $(GCC_BUILD_DIR2)/.fixedup: $(GCC_BUILD_DIR2)/.installed
rm -f $(STAGING_DIR)/bin/cpp $(STAGING_DIR)/bin/gcov $(STAGING_DIR)/bin/*gccbug
rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
$(STAGING_DIR)/share/locale
- touch $(GCC_BUILD_DIR2)/.fixedup
-
-$(BUILD_DIR)/.shuffled: $(GCC_BUILD_DIR2)/.fixedup
- mkdir -p $(STAGING_DIR)/usr/bin;
- (set -e; cd $(STAGING_DIR)/usr/bin; \
- for i in $(STAGING_DIR)/bin/* ; do \
- j=`basename $$i`; \
- k=`basename $$i| sed -e "s,$(ARCH)-uclibc-,,g"`; \
- ln -fs ../../bin/$$j $$k; \
- done)
- (set -e; cd $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin; \
- for i in $(STAGING_DIR)/bin/* ; do \
- j=`basename $$i`; \
- k=`basename $$i| sed -e "s,$(ARCH)-uclibc-,,g"`; \
- ln -fs ../../bin/$$j $$k; \
- done)
- touch $(BUILD_DIR)/.shuffled
-
-$(BUILD_DIR)/.stripped: $(BUILD_DIR)/.shuffled
# Strip the host binaries
-strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/*
# Strip the target shared libs
-$(STRIP) --strip-unneeded -R .note -R .comment $(STAGING_DIR)/lib/*.so*;
- touch $(BUILD_DIR)/.stripped
-
-gcc_final: uclibc $(BUILD_DIR)/.stripped
+ set -e;
+ for app in cc gcc c89 cpp c++ g++ ; do \
+ if [ -x $(STAGING_DIR)/bin/$(ARCH)-uclibc-$${app} ] ; then \
+ (cd $(STAGING_DIR)/usr/bin; \
+ ln -fs ../../bin/$(ARCH)-uclibc-$${app} $${app}; \
+ ); \
+ fi; \
+ done;
+
+gcc_final: binutils gcc_initial uclibc $(STAGING_DIR)/bin/$(ARCH)-uclibc-g++
gcc_final-clean:
rm -rf $(GCC_BUILD_DIR2)
diff --git a/make/uclibc_toolchain_2_95.mk b/make/uclibc_toolchain_2_95.mk
index 4778d7e63..ff4efb83f 100644
--- a/make/uclibc_toolchain_2_95.mk
+++ b/make/uclibc_toolchain_2_95.mk
@@ -25,6 +25,9 @@ ifeq ($(GCC_2_95_TOOLCHAIN),true)
# hacking on the toolchain...
#
#############################################################
+#Directory in which to build the toolchain
+TOOL_BUILD_DIR:=$(BASE_DIR)/toolchain_build
+
TARGET_LANGUAGES:=c,c++
# If you want multilib enabled, enable this...
@@ -40,35 +43,35 @@ MULTILIB:=--enable-multilib
#############################################################
BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
BINUTILS_SOURCE:=binutils-2.13.2.1.tar.bz2
-BINUTILS_DIR:=$(BUILD_DIR)/binutils-2.13.2.1
+BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.13.2.1
#
# Perhaps you would perfer to use the older 2.12.1 version?
#BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
#BINUTILS_SOURCE:=binutils-2.12.1.tar.bz2
-#BINUTILS_DIR:=$(BUILD_DIR)/binutils-2.12.1
+#BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.12.1
ifeq ($(USE_UCLIBC_SNAPSHOT),true)
# Be aware that this changes daily....
-UCLIBC_DIR=$(BUILD_DIR)/uClibc
+UCLIBC_DIR=$(TOOL_BUILD_DIR)/uClibc
UCLIBC_SOURCE=uClibc-snapshot.tar.bz2
UCLIBC_SITE:=ftp://www.uclibc.org/uClibc
else
-UCLIBC_DIR:=$(BUILD_DIR)/uClibc-0.9.17
+UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-0.9.17
UCLIBC_SOURCE:=uClibc-0.9.17.tar.bz2
UCLIBC_SITE:=http://www.kernel.org/pub/linux/libs/uclibc
endif
GCC_SITE:=http://www.kernel.org/pub/linux/libs/uclibc/toolchain
GCC_SOURCE:=gcc-20011006.tar.bz2
-GCC_DIR:=$(BUILD_DIR)/gcc-20011006
+GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-20011006
ELF2FLT_SITE:=http://www.kernel.org/pub/linux/libs/uclibc/toolchain
ELF2FLT_SOURCE:=elf2flt-20020731.tar.bz2
-ELF2FLT_DIR:=$(BUILD_DIR)/elf2flt
+ELF2FLT_DIR:=$(TOOL_BUILD_DIR)/elf2flt
STLPORT_SITE=http://www.stlport.org/archive
STLPORT_SOURCE=STLport-4.5.3.tar.gz
-STLPORT_DIR=$(BUILD_DIR)/STLport-4.5.3
+STLPORT_DIR=$(TOOL_BUILD_DIR)/STLport-4.5.3
@@ -77,8 +80,8 @@ STLPORT_DIR=$(BUILD_DIR)/STLport-4.5.3
# Setup some initial paths
#
#############################################################
-$(BUILD_DIR)/.setup:
- mkdir -p $(BUILD_DIR)
+$(TOOL_BUILD_DIR)/.setup:
+ mkdir -p $(TOOL_BUILD_DIR)
mkdir -p $(DL_DIR)
mkdir -p $(STAGING_DIR)
mkdir -p $(STAGING_DIR)/include
@@ -89,7 +92,7 @@ $(BUILD_DIR)/.setup:
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
mkdir -p $(STAGING_DIR)/usr/lib
(cd $(STAGING_DIR)/usr/lib; ln -fs ../../lib/gcc-lib)
- touch $(BUILD_DIR)/.setup
+ touch $(TOOL_BUILD_DIR)/.setup
#############################################################
@@ -113,12 +116,12 @@ uclibc_toolchain-dirclean: gcc_final-dirclean uclibc-dirclean gcc_initial-dircle
# build binutils
#
#############################################################
-BINUTILS_DIR1:=$(BUILD_DIR)/binutils-build
+BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-build
$(DL_DIR)/$(BINUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE)
-$(BINUTILS_DIR)/.unpacked: $(BUILD_DIR)/.setup $(DL_DIR)/$(BINUTILS_SOURCE)
- bzcat $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+$(BINUTILS_DIR)/.unpacked: $(TOOL_BUILD_DIR)/.setup $(DL_DIR)/$(BINUTILS_SOURCE)
+ bzcat $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(BINUTILS_DIR)/.unpacked
$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
@@ -185,12 +188,12 @@ binutils-dirclean:
# Next build first pass gcc compiler
#
#############################################################
-GCC_BUILD_DIR1:=$(BUILD_DIR)/gcc-initial
+GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-initial
$(DL_DIR)/$(GCC_SOURCE):
$(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
-$(GCC_DIR)/.unpacked: $(BUILD_DIR)/.setup $(DL_DIR)/$(GCC_SOURCE)
- bzcat $(DL_DIR)/$(GCC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+$(GCC_DIR)/.unpacked: $(TOOL_BUILD_DIR)/.setup $(DL_DIR)/$(GCC_SOURCE)
+ bzcat $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(GCC_DIR)/.unpacked
$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
@@ -245,7 +248,7 @@ $(GCC_DIR)/.gcc_build_hacks: $(GCC_DIR)/.patched
# # the step or libgcc will not build...
$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc_build_hacks
mkdir -p $(GCC_BUILD_DIR1)
- (cd $(GCC_BUILD_DIR1); PATH=$(STAGING_DIR)/bin:$$PATH AR=$(ARCH)-uclibc-ar \
+ (cd $(GCC_BUILD_DIR1); AR=$(ARCH)-uclibc-ar \
RANLIB=$(ARCH)-uclibc-ranlib CC=$(HOSTCC) $(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--prefix=$(STAGING_DIR) \
@@ -267,13 +270,13 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc_build_hacks
touch $(GCC_BUILD_DIR1)/.configured
$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
- PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) -C $(GCC_BUILD_DIR1) \
+ $(MAKE) -C $(GCC_BUILD_DIR1) \
AR_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ar \
RANLIB_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ranlib
touch $(GCC_BUILD_DIR1)/.compiled
$(GCC_BUILD_DIR1)/.installed: $(GCC_BUILD_DIR1)/.compiled
- PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) -C $(GCC_BUILD_DIR1) install;
+ $(MAKE) -C $(GCC_BUILD_DIR1) install;
#Cleanup then mess when --program-prefix mysteriously fails
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-uclibc-cpp
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
@@ -304,11 +307,11 @@ gcc_initial-dirclean:
$(DL_DIR)/$(UCLIBC_SOURCE):
$(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE)
-$(UCLIBC_DIR)/.unpacked: $(BUILD_DIR)/.setup $(DL_DIR)/$(UCLIBC_SOURCE)
- bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+$(UCLIBC_DIR)/.unpacked: $(TOOL_BUILD_DIR)/.setup $(DL_DIR)/$(UCLIBC_SOURCE)
+ bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(UCLIBC_DIR)/.unpacked
-$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(BUILD_DIR)/linux/.configured
+$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(TOOL_BUILD_DIR)/linux/.configured
perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=$(ARCH)\nCROSS=$(TARGET_CROSS),g' \
$(UCLIBC_DIR)/Rules.mak
cp $(SOURCE_DIR)/uClibc.config $(UCLIBC_DIR)/.config
@@ -369,7 +372,7 @@ uclibc-dirclean:
# the newly built shared uClibc library.
#
#############################################################
-GCC_BUILD_DIR2:=$(BUILD_DIR)/gcc-final
+GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-final
$(GCC_DIR)/.g++_build_hacks: $(GCC_DIR)/.patched
#
# Hack up the soname for libstdc++
@@ -395,7 +398,7 @@ $(GCC_DIR)/.g++_build_hacks: $(GCC_DIR)/.patched
$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
mkdir -p $(GCC_BUILD_DIR2)
- (cd $(GCC_BUILD_DIR2); PATH=$(STAGING_DIR)/bin:$$PATH AR=$(TARGET_CROSS)ar \
+ (cd $(GCC_BUILD_DIR2); AR=$(TARGET_CROSS)ar \
RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld NM=$(TARGET_CROSS)nm \
CC=$(HOSTCC) $(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
@@ -423,14 +426,14 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
touch $(GCC_BUILD_DIR2)/.configured
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(HOSTCC) \
+ CC=$(HOSTCC) \
AR_FOR_TARGET=$(TARGET_CROSS)ar RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
LD_FOR_TARGET=$(TARGET_CROSS)ld NM_FOR_TARGET=$(TARGET_CROSS)nm \
CC_FOR_TARGET=$(TARGET_CROSS)gcc $(MAKE) -C $(GCC_BUILD_DIR2)
touch $(GCC_BUILD_DIR2)/.compiled
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
- PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) -C $(GCC_BUILD_DIR2) install;
+ $(MAKE) -C $(GCC_BUILD_DIR2) install;
touch $(GCC_BUILD_DIR2)/.installed
#Cleanup then mess when --program-prefix mysteriously fails
@@ -459,7 +462,7 @@ $(DL_DIR)/$(STLPORT_SOURCE):
$(WGET) -P $(DL_DIR) $(STLPORT_SITE)/$(STLPORT_SOURCE)
$(STLPORT_DIR)/Makefile: $(DL_DIR)/$(STLPORT_SOURCE) $(STLPORT_PATCH)
- zcat $(DL_DIR)/$(STLPORT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ zcat $(DL_DIR)/$(STLPORT_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
cat $(STLPORT_PATCH) | patch -d $(STLPORT_DIR) -p1
$(STLPORT_DIR)/lib/libstdc++.a: $(STLPORT_DIR)/Makefile
@@ -490,7 +493,7 @@ stlport-dirclean:
# Final cleanups....
#
#############################################################
-$(BUILD_DIR)/.shuffled: $(GCC_BUILD_DIR2)/.fixedup
+$(TOOL_BUILD_DIR)/.shuffled: $(GCC_BUILD_DIR2)/.fixedup
mkdir -p $(STAGING_DIR)/usr/bin;
(set -e; cd $(STAGING_DIR)/usr/bin; \
for i in $(STAGING_DIR)/bin/* ; do \
@@ -504,16 +507,19 @@ $(BUILD_DIR)/.shuffled: $(GCC_BUILD_DIR2)/.fixedup
k=`basename $$i| sed -e "s,$(ARCH)-uclibc-,,g"`; \
ln -fs ../../bin/$$j $$k; \
done)
- touch $(BUILD_DIR)/.shuffled
+ touch $(TOOL_BUILD_DIR)/.shuffled
-$(BUILD_DIR)/.stripped: $(BUILD_DIR)/.shuffled
+$(TOOL_BUILD_DIR)/.stripped: $(TOOL_BUILD_DIR)/.shuffled
# Strip the host binaries
-strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/*
# Strip the target shared libs
-$(STRIP) --strip-unneeded -R .note -R .comment $(STAGING_DIR)/lib/*.so*;
- touch $(BUILD_DIR)/.stripped
+ touch $(TOOL_BUILD_DIR)/.stripped
+
+$(STAGING_DIR)/bin/$(TARGET_CC): $(GCC_BUILD_DIR2)/.fixedup $(TOOL_BUILD_DIR)/.stripped $(STLPORT_TARGET)
+ cp --remove-destination -a $(STAGING_DIR) $(STAGING_DIR)
-gcc_final: uclibc $(GCC_BUILD_DIR2)/.fixedup $(BUILD_DIR)/.stripped $(STLPORT_TARGET)
+gcc_final: uclibc $(STAGING_DIR)/bin/$(TARGET_CC)
gcc_final-clean:
rm -rf $(GCC_BUILD_DIR2)
diff --git a/make/udhcp.mk b/make/udhcp.mk
index 6c7acbd55..8bd5c9067 100644
--- a/make/udhcp.mk
+++ b/make/udhcp.mk
@@ -48,6 +48,7 @@ $(TARGET_DIR)/sbin/udhcpc: $(UDHCP_DIR)/udhcpc
perl -i -p -e 's/PUMP/UDHCPC/' $(TARGET_DIR)/etc/pcmcia/network*
perl -i -p -e 's/DHCP="n"/DHCP="y"/' $(TARGET_DIR)/etc/pcmcia/network*
mkdir -p $(TARGET_DIR)/sbin
+ rm -f $(TARGET_DIR)/sbin/udhcpc
cp $(UDHCP_DIR)/udhcpc $(TARGET_DIR)/sbin/
mkdir -p $(TARGET_DIR)/usr/share/udhcpc
cp $(UDHCP_DIR)/samples/simple.script $(TARGET_DIR)/usr/share/udhcpc/default.script
diff --git a/make/valgrind.mk b/make/valgrind.mk
index 221415339..54c09ac28 100644
--- a/make/valgrind.mk
+++ b/make/valgrind.mk
@@ -22,7 +22,7 @@ $(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked
$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
(cd $(VALGRIND_DIR); rm -rf config.cache; \
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
@@ -43,12 +43,11 @@ $(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
touch $(VALGRIND_DIR)/.configured
$(VALGRIND_DIR)/valgrind.so: $(VALGRIND_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(VALGRIND_DIR)
+ $(MAKE) -C $(VALGRIND_DIR)
-$(STRIP) --strip-unneeded $(VALGRIND_DIR)/*.so*
touch -c $(VALGRIND_DIR)/valgrind.so
$(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/valgrind.so
- PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC) \
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
diff --git a/make/zlib.mk b/make/zlib.mk
index 1139faf0a..ce48f4b52 100644
--- a/make/zlib.mk
+++ b/make/zlib.mk
@@ -42,6 +42,7 @@ $(STAGING_DIR)/lib/libz.so.1.1.4: $(ZLIB_DIR)/libz.so.1.1.4
cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/include;
cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/lib;
(cd $(STAGING_DIR)/lib; ln -fs libz.so.1.1.4 libz.so.1);
+ chmod a-x $(STAGING_DIR)/lib/libz.so.1.1.4
touch -c $(STAGING_DIR)/lib/libz.so.1.1.4
$(TARGET_DIR)/lib/libz.so.1.1.4: $(STAGING_DIR)/lib/libz.so.1.1.4
@@ -54,6 +55,8 @@ $(TARGET_DIR)/usr/lib/libz.a: $(TARGET_DIR)/lib/libz.so.1.1.4
cp -dpf $(STAGING_DIR)/include/zlib.h $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/include/zconf.h $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/lib/libz.a $(TARGET_DIR)/usr/lib/
+ rm -f $(TARGET_DIR)/lib/libz.so
+ (cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libz.so.1.1.4 libz.so)
touch -c $(TARGET_DIR)/usr/lib/libz.a
zlib-headers: $(TARGET_DIR)/usr/lib/libz.a