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 \
$(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 \
$(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 \
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 \
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:
$(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) \
$(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 \
$(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 \
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
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;
$(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 \
$(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 \
$(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
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 \
--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 \
-$(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
$(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; \
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
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 \
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 \
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 \
(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 \
$(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) \
$(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 \
$(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 \
$(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 \
$(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 \
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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
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:
$(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) \
#
#############################################################
# 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
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 \
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) \
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
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
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
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
$(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 \
$(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 \
$(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 \
$(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)
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
$(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 \
$(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 \
$(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 \
$(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 \
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 \
$(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) \
$(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 \
# 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...
#############################################################
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....
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
# 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
#############################################################
# 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
$(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) \
$(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;
# 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
# # 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) \
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)
$(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
$(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
# 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++
$(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) \
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++
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)
# 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...
#############################################################
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
# 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
(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
#############################################################
# 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
# 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
# # 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) \
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
$(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
# 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++
$(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) \
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
$(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
# 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 \
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)
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
$(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 \
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 \
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
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
# Installation Options
#
# CONFIG_INSTALL_NO_USR is not set
+PREFIX="./_install"
#
# Archival Utilities
CONFIG_FEATURE_TAR_BZIP2=y
CONFIG_FEATURE_TAR_EXCLUDE=y
CONFIG_FEATURE_TAR_GZIP=y
-# CONFIG_FEATURE_TAR_OLD_FORMAT is not set
-CONFIG_FEATURE_GNUTAR_LONG_FILENAME=y
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
CONFIG_FEATURE_UNARCHIVE_TAPE=y
CONFIG_UNCOMPRESS=y
CONFIG_UNZIP=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_IPX=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
+CONFIG_INETD=y
+# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN is not set
CONFIG_IP=y
CONFIG_FEATURE_IP_ADDRESS=y
+++ /dev/null
-diff -urN gcc-3.2/gcc/config/mips/t-linux gcc-3.2-patched/gcc/config/mips/t-linux
---- gcc-3.2.orig/gcc/config/mips/t-linux Wed Jan 16 17:22:02 2002
-+++ gcc-3.2/gcc/config/mips/t-linux Mon Nov 11 15:23:33 2002
-@@ -1,3 +1,48 @@
-+# Don't run fixproto
-+STMP_FIXPROTO =
-+
-+# Don't install "assert.h" in gcc. We use the one in glibc.
-+INSTALL_ASSERT_H =
-+
-+# nop@nop.com: -fdata-sections messes with crtstuff.c's strategy to get
-+# ctors/dtors/eh in special sections.
-+CRTSTUFF_T_CFLAGS = -fno-data-sections
-+CRTSTUFF_T_CFLAGS_S = -fno-data-sections
-+# Hopefully that's enough.
-+
-+# Do not build libgcc1. Let gcc generate those functions. The GNU/Linux
-+# C library can handle them.
-+LIBGCC1 =
-+CROSS_LIBGCC1 =
-+LIBGCC1_TEST =
-+
-+# Standard softfloat incantation:
-+
-+LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
-+
-+dp-bit.c: $(srcdir)/config/fp-bit.c
-+ echo '#ifdef __MIPSEL__' > dp-bit.c
-+ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
-+ echo '#endif' >> dp-bit.c
-+ echo '#undef US_SOFTWARE_GOFAST' >> dp-bit.c
-+ echo '#undef FLOAT' >> dp-bit.c
-+ cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-+
-+fp-bit.c: $(srcdir)/config/fp-bit.c
-+ echo '#ifdef __MIPSEL__' > fp-bit.c
-+ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
-+ echo '#endif' >> fp-bit.c
-+ echo '#undef US_SOFTWARE_GOFAST' >> fp-bit.c
-+ echo '#define FLOAT' >> fp-bit.c
-+ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-+
-+MULTILIB_OPTIONS = msoft-float
-+MULTILIB_DIRNAMES = soft-float
-+MULTILIB_MATCHES =
-+MULTILIB_EXTRA_OPTS =
-+
-+LIBGCC = stmp-multilib
-+INSTALL_LIBGCC = install-multilib
- # We want fine grained libraries, so use the new code to build the
- # floating point emulation libraries.
- FPBIT = fp-bit.c