diff options
Diffstat (limited to 'make')
-rw-r--r-- | make/binutils-uclibc.mk | 132 | ||||
-rw-r--r-- | make/busybox.mk | 59 | ||||
-rw-r--r-- | make/bzip2.mk | 2 | ||||
-rw-r--r-- | make/ccache.mk | 152 | ||||
-rw-r--r-- | make/gcc-uclibc-2.95.mk | 277 | ||||
-rw-r--r-- | make/gcc-uclibc-3.x.mk | 321 | ||||
-rw-r--r-- | make/gdb.mk | 189 | ||||
-rw-r--r-- | make/gzip.mk | 2 | ||||
-rw-r--r-- | make/kernel-headers.mk | 124 | ||||
-rw-r--r-- | make/mkdosfs.mk | 2 | ||||
-rw-r--r-- | make/newt.mk | 2 | ||||
-rw-r--r-- | make/sed.mk | 137 | ||||
-rw-r--r-- | make/slang.mk | 2 | ||||
-rw-r--r-- | make/uclibc.mk | 163 | ||||
-rw-r--r-- | make/zlib.mk | 2 |
15 files changed, 6 insertions, 1560 deletions
diff --git a/make/binutils-uclibc.mk b/make/binutils-uclibc.mk deleted file mode 100644 index 6199990d5..000000000 --- a/make/binutils-uclibc.mk +++ /dev/null @@ -1,132 +0,0 @@ -############################################################# -# -# build binutils for use on the host system -# -############################################################# -BINUTILS_VERSION:=$(strip $(BINUTILS_VERSION)) - -BINUTILS_SITE:=http://ftp.kernel.org/pub/linux/devel/binutils -ifeq ($(BINUTILS_VERSION),2.15) -BINUTILS_SITE:=http://ftp.gnu.org/gnu/binutils/ -endif -ifeq ($(BINUTILS_VERSION),2.14) -BINUTILS_SITE:=http://ftp.gnu.org/gnu/binutils/ -endif -ifeq ($(BINUTILS_VERSION),2.13) -BINUTILS_SITE:=http://ftp.gnu.org/gnu/binutils/ -endif - -BINUTILS_SOURCE:=binutils-$(BINUTILS_VERSION).tar.bz2 -BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION) -BINUTILS_CAT:=bzcat - -BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION)-build - -$(DL_DIR)/$(BINUTILS_SOURCE): - mkdir -p $(DL_DIR) - $(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE) - -$(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - $(BINUTILS_CAT) $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - - touch $(BINUTILS_DIR)/.unpacked - -$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked - # Apply appropriate binutils patches. - $(SOURCE_DIR)/patch-kernel.sh $(BINUTILS_DIR) $(SOURCE_DIR)/binutils/$(BINUTILS_VERSION) \*.patch - touch $(BINUTILS_DIR)/.patched - -$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched - mkdir -p $(BINUTILS_DIR1) - (cd $(BINUTILS_DIR1); \ - $(BINUTILS_DIR)/configure \ - --prefix=$(STAGING_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) ); - touch $(BINUTILS_DIR1)/.configured - -$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured - $(MAKE) $(JLEVEL) -C $(BINUTILS_DIR1) all - -# Make install will put gettext data in staging_dir/share/locale. -# Unfortunatey, it isn't configureable. -$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump - $(MAKE) $(JLEVEL) -C $(BINUTILS_DIR1) install - -binutils-dependancies: - @if [ ! -x /usr/bin/bison ] ; then \ - echo -e "\n\nYou must install 'bison' on your build machine\n"; \ - exit 1; \ - fi; - @if [ ! -x /usr/bin/flex ] ; then \ - echo -e "\n\nYou must install 'flex' on your build machine\n"; \ - exit 1; \ - fi; - @if [ ! -x /usr/bin/msgfmt ] ; then \ - echo -e "\n\nYou must install 'gettext' on your build machine\n"; \ - exit 1; \ - fi; - -binutils: binutils-dependancies $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld - -binutils-source: $(DL_DIR)/$(BINUTILS_SOURCE) - -binutils-clean: - rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -$(MAKE) -C $(BINUTILS_DIR1) clean - -binutils-dirclean: - rm -rf $(BINUTILS_DIR1) - - - -############################################################# -# -# build binutils for use on the target system -# -############################################################# -BINUTILS_DIR2:=$(BUILD_DIR)/binutils-$(BINUTILS_VERSION)-target -$(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched - mkdir -p $(BINUTILS_DIR2) - (cd $(BINUTILS_DIR2); \ - PATH=$(TARGET_PATH) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CFLAGS_FOR_BUILD="-O2 -g" \ - $(BINUTILS_DIR)/configure \ - --prefix=/usr \ - --exec-prefix=/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) ); - touch $(BINUTILS_DIR2)/.configured - -$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured - PATH=$(TARGET_PATH) \ - $(MAKE) $(JLEVEL) -C $(BINUTILS_DIR2) all - -$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump - PATH=$(TARGET_PATH) \ - $(MAKE) $(JLEVEL) DESTDIR=$(TARGET_DIR) \ - tooldir=/usr build_tooldir=/usr \ - -C $(BINUTILS_DIR2) install - #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc - -$(STRIP) $(TARGET_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/* > /dev/null 2>&1 - -$(STRIP) $(TARGET_DIR)/usr/bin/* > /dev/null 2>&1 - -binutils_target: $(GCC_DEPENDANCY) $(TARGET_DIR)/usr/bin/ld - -binutils_target-clean: - rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -$(MAKE) -C $(BINUTILS_DIR2) clean - -binutils_target-dirclean: - rm -rf $(BINUTILS_DIR2) - diff --git a/make/busybox.mk b/make/busybox.mk deleted file mode 100644 index ecafc7da1..000000000 --- a/make/busybox.mk +++ /dev/null @@ -1,59 +0,0 @@ -############################################################# -# -# busybox -# -############################################################# - -ifneq ($(strip $(USE_BUSYBOX_SNAPSHOT)),) -# Be aware that this changes daily.... -BUSYBOX_DIR:=$(BUILD_DIR)/busybox -BUSYBOX_SOURCE:=busybox-$(strip $(USE_BUSYBOX_SNAPSHOT)).tar.bz2 -BUSYBOX_SITE:=http://www.busybox.net/downloads/snapshots -else -BUSYBOX_DIR:=$(BUILD_DIR)/busybox-1.00-rc2 -BUSYBOX_SOURCE:=busybox-1.00-rc2.tar.bz2 -BUSYBOX_SITE:=http://www.busybox.net/downloads -endif -BUSYBOX_UNZIP=bzcat -BUSYBOX_CONFIG:=$(SOURCE_DIR)/busybox.config - -$(DL_DIR)/$(BUSYBOX_SOURCE): - $(WGET) -P $(DL_DIR) $(BUSYBOX_SITE)/$(BUSYBOX_SOURCE) - -busybox-source: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG) - -$(BUSYBOX_DIR)/.configured: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG) - $(BUSYBOX_UNZIP) $(DL_DIR)/$(BUSYBOX_SOURCE) | tar -C $(BUILD_DIR) -xvf - - # Allow busybox patches. - $(SOURCE_DIR)/patch-kernel.sh $(BUSYBOX_DIR) $(SOURCE_DIR) busybox-\*.patch - cp $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/.config - $(SED) "s,^CROSS.*,CROSS=$(TARGET_CROSS)\n\ - PREFIX=$(TARGET_DIR),;" $(BUSYBOX_DIR)/Rules.mak -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) - $(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=y/;" $(BUSYBOX_DIR)/.config -else - $(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=n/;" $(BUSYBOX_DIR)/.config -endif - $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(BUSYBOX_DIR) oldconfig - touch $(BUSYBOX_DIR)/.configured - -busybox-unpack: $(BUSYBOX_DIR)/.configured - -$(BUSYBOX_DIR)/busybox: $(BUSYBOX_DIR)/.configured - $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(BUSYBOX_DIR) - -$(TARGET_DIR)/bin/busybox: $(BUSYBOX_DIR)/busybox - $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(BUSYBOX_DIR) install - # Just in case - -chmod a+x $(TARGET_DIR)/usr/share/udhcpc/default.script - -busybox: uclibc $(TARGET_DIR)/bin/busybox - -busybox-clean: - rm -f $(TARGET_DIR)/bin/busybox - -$(MAKE) -C $(BUSYBOX_DIR) clean - -busybox-dirclean: - rm -rf $(BUSYBOX_DIR) diff --git a/make/bzip2.mk b/make/bzip2.mk index 299105a91..4152102dc 100644 --- a/make/bzip2.mk +++ b/make/bzip2.mk @@ -20,7 +20,7 @@ $(BZIP2_DIR)/.unpacked: $(DL_DIR)/$(BZIP2_SOURCE) $(SED) "s,ln \$$(,ln -sf \$$(,g" $(BZIP2_DIR)/Makefile $(SED) "s,ln -s (lib.*),ln -sf \$$1 ; ln -sf libbz2.so.1.0.2 libbz2.so,g" \ $(BZIP2_DIR)/Makefile-libbz2_so -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),false) +ifeq ($(BR2_LARGEFILE),y) $(SED) "s,^BIGFILES,#BIGFILES,g" $(BZIP2_DIR)/Makefile $(SED) "s,^BIGFILES,#BIGFILES,g" $(BZIP2_DIR)/Makefile-libbz2_so endif diff --git a/make/ccache.mk b/make/ccache.mk deleted file mode 100644 index 529dd8c14..000000000 --- a/make/ccache.mk +++ /dev/null @@ -1,152 +0,0 @@ -############################################################# -# -# build ccache to make recompiles faster on the build system -# -############################################################# -CCACHE_VER:=2.3 -CCACHE_SITE:=http://ccache.samba.org/ftp/ccache -CCACHE_SOURCE:=ccache-$(CCACHE_VER).tar.gz -CCACHE_DIR1:=$(TOOL_BUILD_DIR)/ccache-$(CCACHE_VER) -CCACHE_DIR2:=$(BUILD_DIR)/ccache-$(CCACHE_VER) -CCACHE_CAT:=zcat -CCACHE_BINARY:=ccache -CCACHE_TARGET_BINARY:=usr/bin/ccache - -$(DL_DIR)/$(CCACHE_SOURCE): - $(WGET) -P $(DL_DIR) $(CCACHE_SITE)/$(CCACHE_SOURCE) - -$(CCACHE_DIR1)/.unpacked: $(DL_DIR)/$(CCACHE_SOURCE) - $(CCACHE_CAT) $(DL_DIR)/$(CCACHE_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - - touch $(CCACHE_DIR1)/.unpacked - -$(CCACHE_DIR1)/.patched: $(CCACHE_DIR1)/.unpacked - # WARNING - this will break if the toolchain is moved. - # Should probably patch things to use a relative path. - $(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/bin-ccache\",g" \ - $(CCACHE_DIR1)/execute.c - # WARNING - this will break if the toolchain build dir is deleted. - $(SED) "s,getenv(\"CCACHE_DIR\"),\"$(CCACHE_DIR1)/cache\",g" \ - $(CCACHE_DIR1)/ccache.c - mkdir -p $(CCACHE_DIR1)/cache - touch $(CCACHE_DIR1)/.patched - -$(CCACHE_DIR1)/.configured: $(CCACHE_DIR1)/.patched - mkdir -p $(CCACHE_DIR1) - (cd $(CCACHE_DIR1); rm -rf config.cache; \ - CC=$(HOSTCC) \ - $(CCACHE_DIR1)/configure \ - --target=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - ); - touch $(CCACHE_DIR1)/.configured - -$(CCACHE_DIR1)/$(CCACHE_BINARY): $(CCACHE_DIR1)/.configured - $(MAKE) CC=$(HOSTCC) -C $(CCACHE_DIR1) - -$(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY) - mkdir -p $(STAGING_DIR)/usr/bin; - cp $(CCACHE_DIR1)/ccache $(STAGING_DIR)/usr/bin - # Keep the actual toolchain binaries in a directory at the same level. - # Otherwise, relative paths for include dirs break. - mkdir -p $(STAGING_DIR)/bin-ccache; - (cd $(STAGING_DIR)/bin-ccache; \ - ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc; \ - ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-cc; \ - ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(REAL_GNU_TARGET_NAME)-cc); - [ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc ] && \ - mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin-ccache/ - (cd $(STAGING_DIR)/bin; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-cc; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-gcc; \ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-cc; \ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-gcc); -ifeq ($(INSTALL_LIBSTDCPP),true) - [ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c++ ] && \ - mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin-ccache/ - [ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-g++ ] && \ - mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-g++ $(STAGING_DIR)/bin-ccache/ - (cd $(STAGING_DIR)/bin; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-c++; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-g++;\ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-c++; \ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-g++); - (cd $(STAGING_DIR)/bin-ccache; \ - ln -fs $(REAL_GNU_TARGET_NAME)-c++ $(GNU_TARGET_NAME)-c++; \ - ln -fs $(REAL_GNU_TARGET_NAME)-g++ $(GNU_TARGET_NAME)-g++); -endif - -ccache: gcc $(STAGING_DIR)/$(CCACHE_TARGET_BINARY) - -ccache-clean: - $(MAKE) -C $(CCACHE_DIR1) uninstall - -$(MAKE) -C $(CCACHE_DIR1) clean - -ccache-dirclean: - rm -rf $(CCACHE_DIR1) - - - - -############################################################# -# -# build ccache for use on the target system -# -############################################################# - -$(CCACHE_DIR2)/.unpacked: $(DL_DIR)/$(CCACHE_SOURCE) - $(CCACHE_CAT) $(DL_DIR)/$(CCACHE_SOURCE) | tar -C $(BUILD_DIR) -xvf - - touch $(CCACHE_DIR2)/.unpacked - -$(CCACHE_DIR2)/.patched: $(CCACHE_DIR2)/.unpacked - touch $(CCACHE_DIR2)/.patched - -$(CCACHE_DIR2)/.configured: $(CCACHE_DIR2)/.patched - mkdir -p $(CCACHE_DIR2) - (cd $(CCACHE_DIR2); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(CCACHE_DIR2)/configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - ); - touch $(CCACHE_DIR2)/.configured - -$(CCACHE_DIR2)/$(CCACHE_BINARY): $(CCACHE_DIR2)/.configured - $(MAKE) -C $(CCACHE_DIR2) - -$(TARGET_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR2)/$(CCACHE_BINARY) - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(CCACHE_DIR2) install - rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc - # put a bunch of symlinks into /bin, since that is earlier - # in the default PATH than /usr/bin where gcc lives - (cd $(TARGET_DIR)/bin; \ - ln -fs /usr/bin/ccache cc; \ - ln -fs /usr/bin/ccache gcc; \ - ln -fs /usr/bin/ccache c++; \ - ln -fs /usr/bin/ccache g++;) - -ccache_target: uclibc $(TARGET_DIR)/$(CCACHE_TARGET_BINARY) - -ccache_target-sources: $(DL_DIR)/$(CCACHE_SOURCE) - -ccache_target-clean: - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(CCACHE_DIR2) uninstall - -$(MAKE) -C $(CCACHE_DIR2) clean - -ccache_target-dirclean: - rm -rf $(CCACHE_DIR2) - diff --git a/make/gcc-uclibc-2.95.mk b/make/gcc-uclibc-2.95.mk deleted file mode 100644 index 90d8fc63f..000000000 --- a/make/gcc-uclibc-2.95.mk +++ /dev/null @@ -1,277 +0,0 @@ -# Makefile for to build a gcc/uClibc toolchain -# -# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org> -# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -ifeq ($(findstring 2.95,$(GCC_VERSION)),2.95) -GCC_VERSION:=$(strip $(GCC_VERSION)) - -GCC_SITE:=http://www.uclibc.org/downloads/toolchain -GCC_SOURCE:=gcc-20011006.tar.bz2 -GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-20011006 -GCC_CAT:=bzcat - -STLPORT_SITE=http://www.stlport.org/archive -STLPORT_SOURCE=STLport-4.5.3.tar.gz -STLPORT_DIR=$(TOOL_BUILD_DIR)/STLport-4.5.3 -GCC_STRIP_HOST_BINARIES:=true - -############################################################# -# -# Setup some initial stuff -# -############################################################# - -ifeq ($(INSTALL_LIBSTDCPP),true) -TARGET_LANGUAGES:=c,c++ -STLPORT_TARGET=stlport -else -TARGET_LANGUAGES:=c -STLPORT_TARGET= -endif - -############################################################# -# -# build the first pass gcc compiler -# -############################################################# -GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-initial - -$(DL_DIR)/$(GCC_SOURCE): - mkdir -p $(DL_DIR) - $(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE) - -$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - $(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - - touch $(GCC_DIR)/.unpacked - -$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked - # Apply any files named gcc-*.patch from the source directory to gcc - $(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR)/gcc/$(GCC_VERSION) \*.patch - # - # We do not wish to build the libstdc++ library provided with gcc, - # since it doesn't seem to work at all with uClibc plus gcc 2.95... - # - mv $(GCC_DIR)/libstdc++ $(GCC_DIR)/libstdc++.orig - mv $(GCC_DIR)/libio $(GCC_DIR)/libio.orig - # - touch $(GCC_DIR)/.patched - -# The --without-headers option stopped working with gcc 3.0 and has never been -# # fixed, so we need to actually have working C library header files prior to -# # the step or libgcc will not build... -$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched - mkdir -p $(GCC_BUILD_DIR1) - -mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include - # Important! Required for limits.h to be fixed. - ln -sf include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include - (cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ - --prefix=$(STAGING_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=c \ - --disable-shared \ - --includedir=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include \ - --with-headers=$(TOOL_BUILD_DIR)/uClibc_dev/usr/include \ - --disable-__cxa_atexit \ - --enable-target-optspace \ - --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); - touch $(GCC_BUILD_DIR1)/.configured - -$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) all-gcc - touch $(GCC_BUILD_DIR1)/.compiled - -$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) install-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 - -gcc_initial: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc - -gcc_initial-clean: - rm -rf $(GCC_BUILD_DIR1) - rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -gcc_initial-dirclean: - rm -rf $(GCC_BUILD_DIR1) - -############################################################# -# -# STLport -- an alternative C++ library -# -############################################################# -STLPORT_PATCH=$(SOURCE_DIR)/STLport-4.5.3.patch - -$(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 $(TOOL_BUILD_DIR) -xvf - - cat $(STLPORT_PATCH) | patch -d $(STLPORT_DIR) -p1 - -$(STLPORT_DIR)/lib/libstdc++.a: $(STLPORT_DIR)/Makefile - $(MAKE) ARCH=$(OPTIMIZE_FOR_CPU) PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) -C $(STLPORT_DIR) - -$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++.a: $(STLPORT_DIR)/lib/libstdc++.a - $(MAKE) ARCH=$(OPTIMIZE_FOR_CPU) PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) -C $(STLPORT_DIR) install - -stlport: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++.a - -stlport-source: $(DL_DIR)/$(STLPORT_SOURCE) - -stlport-clean: - rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++* - rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++* - -$(MAKE) -C $(STLPORT_DIR) clean - -stlport-dirclean: - rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++* - rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/g++-v3* - rm -rf $(STLPORT_DIR) - -############################################################# -# -# second pass compiler build. Build the compiler targeting -# the newly built shared uClibc library. -# -############################################################# -GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-final - -$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a - mkdir -p $(GCC_BUILD_DIR2) - (cd $(GCC_BUILD_DIR2); PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ - --prefix=$(STAGING_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(TARGET_LANGUAGES) \ - --enable-shared \ - --with-gxx-include-dir=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++ \ - --disable-__cxa_atexit \ - --enable-target-optspace \ - --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); - touch $(GCC_BUILD_DIR2)/.configured - -$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) all - touch $(GCC_BUILD_DIR2)/.compiled - -$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) install - # Strip the host binaries -ifeq ($(GCC_STRIP_HOST_BINARIES),true) - -strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/* -endif - # Set up the symlinks to enable lying about target name. - set -e; \ - (cd $(STAGING_DIR); \ - ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ - cd bin; \ - for app in $(REAL_GNU_TARGET_NAME)-* ; do \ - ln -sf $${app} \ - $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ - done; \ - ); - touch $(GCC_BUILD_DIR2)/.installed - -gcc: uclibc-configured binutils gcc_initial $(LIBFLOAT_TARGET) uclibc \ - $(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS) $(STLPORT_TARGET) - -gcc-source: $(DL_DIR)/$(GCC_SOURCE) - -gcc-clean: - rm -rf $(GCC_BUILD_DIR2) - rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -gcc-dirclean: - rm -rf $(GCC_BUILD_DIR2) - -############################################################# -# -# Next build target gcc compiler -# -############################################################# -GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target - -$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR2)/.installed - mkdir -p $(GCC_BUILD_DIR3) - (cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ - --prefix=/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(TARGET_LANGUAGES) \ - --enable-shared \ - --with-gxx-include-dir=/usr/include/c++ \ - --disable-__cxa_atexit \ - --enable-target-optspace \ - --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); - touch $(GCC_BUILD_DIR3)/.configured - -$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured - PATH=$(TARGET_PATH) \ - $(MAKE) $(JLEVEL) $(TARGET_GCC_ARGS) -C $(GCC_BUILD_DIR3) all - touch $(GCC_BUILD_DIR3)/.compiled - -$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled - PATH=$(TARGET_PATH) \ - $(MAKE) $(JLEVEL) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install - # Remove broken specs file (cross compile flag is set). - rm -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs - -(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1) - -(cd $(TARGET_DIR)/lib; $(STRIP) libgcc_s.so.*.*.* > /dev/null 2>&1) - # - rm -f $(TARGET_DIR)/usr/lib/*.la* - #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc - # Work around problem of missing syslimits.h - cp -f $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/include/syslimits.h $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/include/ - # These are in /lib, so... - #rm -rf $(TARGET_DIR)/usr/lib/libgcc_s.so* - #touch -c $(TARGET_DIR)/usr/bin/gcc - -gcc_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc - -gcc_target-clean: - rm -rf $(GCC_BUILD_DIR3) - rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -gcc_target-dirclean: - rm -rf $(GCC_BUILD_DIR3) - -endif diff --git a/make/gcc-uclibc-3.x.mk b/make/gcc-uclibc-3.x.mk deleted file mode 100644 index 919f5be9c..000000000 --- a/make/gcc-uclibc-3.x.mk +++ /dev/null @@ -1,321 +0,0 @@ -# Makefile for to build a gcc/uClibc toolchain -# -# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org> -# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -ifneq ($(findstring 2.95,$(GCC_VERSION)),2.95) -GCC_VERSION:=$(strip $(GCC_VERSION)) - -#GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(GCC_VERSION) -GCC_SITE:=http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(GCC_VERSION) - -# -# snapshots.... -#GCC_VERSION:=3.3-20031013 -#GCC_SITE:=http://gcc.get-software.com/snapshots/$(GCC_VERSION) -# -GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2 -GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION) -GCC_CAT:=bzcat -GCC_STRIP_HOST_BINARIES:=true - -############################################################# -# -# Setup some initial stuff -# -############################################################# - -ifeq ($(INSTALL_LIBGCJ),true) -TARGET_LANGUAGES:=c,c++,java -else -ifeq ($(INSTALL_LIBSTDCPP),true) -TARGET_LANGUAGES:=c,c++ -else -TARGET_LANGUAGES:=c -endif -endif - -############################################################# -# -# build the first pass gcc compiler -# -############################################################# -GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-initial - -$(DL_DIR)/$(GCC_SOURCE): - mkdir -p $(DL_DIR) - $(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE) - -$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - $(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - - touch $(GCC_DIR)/.unpacked - -$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked - # Apply any files named gcc-*.patch from the source directory to gcc - $(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR)/gcc/$(GCC_VERSION) \*.patch - # Note: The soft float situation has improved considerably with gcc 3.4.x. - # We can dispense with the custom spec files, as well as libfloat for the arm case. - # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x - # which needs to be integrated so we can kill of libfloat for good, except for - # anyone (?) who might still be using gcc 2.95. mjn3 -ifeq ($(SOFT_FLOAT),true) -ifeq ("$(strip $(ARCH))","arm") - $(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR)/gcc/$(GCC_VERSION) arm-softfloat.patch.conditional -endif -ifeq ("$(strip $(ARCH))","armeb") - $(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR)/gcc/$(GCC_VERSION) arm-softfloat.patch.conditional -endif - # Not yet updated to 3.4.1. - #ifeq ("$(strip $(ARCH))","i386") - #$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR)/gcc i386-gcc-soft-float.patch - #endif -endif - touch $(GCC_DIR)/.patched - -# The --without-headers option stopped working with gcc 3.0 and has never been -# # fixed, so we need to actually have working C library header files prior to -# # the step or libgcc will not build... - -$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched - mkdir -p $(GCC_BUILD_DIR1) - (cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ - --prefix=$(STAGING_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=c \ - --disable-shared \ - --with-sysroot=$(TOOL_BUILD_DIR)/uClibc_dev/ \ - --disable-__cxa_atexit \ - --enable-target-optspace \ - --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); - touch $(GCC_BUILD_DIR1)/.configured - -$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) all-gcc - touch $(GCC_BUILD_DIR1)/.compiled - -$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) install-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 - -gcc_initial: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc - -gcc_initial-clean: - rm -rf $(GCC_BUILD_DIR1) - rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -gcc_initial-dirclean: - rm -rf $(GCC_BUILD_DIR1) - -############################################################# -# -# second pass compiler build. Build the compiler targeting -# the newly built shared uClibc library. -# -############################################################# -# -# Sigh... I had to rework things because using --with-gxx-include-dir -# causes issues with include dir search order for g++. This seems to -# have something to do with "path translations" and possibly doesn't -# affect gcc-target. However, I haven't tested gcc-target yet so no -# guarantees. mjn3 - -GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-final -$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/lib/libc.a - mkdir -p $(GCC_BUILD_DIR2) - # Important! Required for limits.h to be fixed. - ln -sf ../include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include - (cd $(GCC_BUILD_DIR2); PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ - --prefix=$(STAGING_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(TARGET_LANGUAGES) \ - --enable-shared \ - --disable-__cxa_atexit \ - --enable-target-optspace \ - --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \ - $(GCC_USE_SJLJ_EXCEPTIONS) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); - touch $(GCC_BUILD_DIR2)/.configured - -$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) all - touch $(GCC_BUILD_DIR2)/.compiled - -$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled - PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) install - # Strip the host binaries -ifeq ($(GCC_STRIP_HOST_BINARIES),true) - -strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/* -endif - # Set up the symlinks to enable lying about target name. - set -e; \ - (cd $(STAGING_DIR); \ - ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ - cd bin; \ - for app in $(REAL_GNU_TARGET_NAME)-* ; do \ - ln -sf $${app} \ - $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ - done; \ - ); - # - # Now for the ugly 3.3.x soft float hack... - # -ifeq ($(SOFT_FLOAT),true) -ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) - # Make sure we have a soft float specs file for this arch - if [ ! -f $(SOURCE_DIR)/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float ] ; then \ - echo soft float configured but no specs file for this arch ; \ - /bin/false ; \ - fi; - # Replace specs file with one that defaults to soft float mode. - if [ ! -f $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \ - echo staging dir specs file is missing ; \ - /bin/false ; \ - fi; - cp $(SOURCE_DIR)/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs -endif -endif - # - # Ok... that's enough of that. - # - touch $(GCC_BUILD_DIR2)/.installed - -$(TARGET_DIR)/lib/libgcc_s.so.1: $(GCC_BUILD_DIR2)/.installed - # These are in /lib, so... - rm -rf $(TARGET_DIR)/usr/lib/libgcc_s.so* - -$(STRIP) $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libgcc_s.so.1 - -cp -a $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libgcc_s* $(TARGET_DIR)/lib/ - -gcc: uclibc-configured binutils gcc_initial $(LIBFLOAT_TARGET) uclibc \ - $(TARGET_DIR)/lib/libgcc_s.so.1 $(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS) - -gcc-source: $(DL_DIR)/$(GCC_SOURCE) - -gcc-clean: - rm -rf $(GCC_BUILD_DIR2) - rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -gcc-dirclean: - rm -rf $(GCC_BUILD_DIR2) - -############################################################# -# -# Next build target gcc compiler -# -############################################################# -GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target - -$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR2)/.installed - mkdir -p $(GCC_BUILD_DIR3) - (cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \ - $(GCC_DIR)/configure \ - --prefix=/usr \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(TARGET_LANGUAGES) \ - --enable-shared \ - --with-gxx-include-dir=/usr/include/c++ \ - --disable-__cxa_atexit \ - --enable-target-optspace \ - --with-gnu-ld \ - $(DISABLE_NLS) \ - $(MULTILIB) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \ - $(GCC_USE_SJLJ_EXCEPTIONS) \ - $(EXTRA_GCC_CONFIG_OPTIONS)); - touch $(GCC_BUILD_DIR3)/.configured - -$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured - PATH=$(TARGET_PATH) \ - $(MAKE) $(JLEVEL) $(TARGET_GCC_ARGS) -C $(GCC_BUILD_DIR3) all - touch $(GCC_BUILD_DIR3)/.compiled - -# -# gcc-lib dir changes names to gcc with 3.4.mumble -# -ifeq ($(findstring 3.4.,$(GCC_VERSION)),3.4.) -GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) -else -GCC_LIB_SUBDIR=lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION) -endif - -$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled - PATH=$(TARGET_PATH) \ - $(MAKE) $(JLEVEL) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install - # Remove broken specs file (cross compile flag is set). - rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs - # - # Now for the ugly 3.3.x soft float hack... - # -ifeq ($(SOFT_FLOAT),true) -ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) - # Add a specs file that defaults to soft float mode. - cp $(SOURCE_DIR)/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs - # Make sure gcc does not think we are cross compiling - $(SED) "s/^1/0/;" $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs -endif -endif - # - # Ok... that's enough of that. - # - -(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1) - -(cd $(TARGET_DIR)/usr/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1) - -(cd $(TARGET_DIR)/lib; $(STRIP) libgcc_s.so.*.*.* > /dev/null 2>&1) - # - rm -f $(TARGET_DIR)/usr/lib/*.la* - #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc - # Work around problem of missing syslimits.h - @if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/include/syslimits.h ] ; then \ - echo "warning: working around missing syslimits.h" ; \ - cp -f $(STAGING_DIR)/$(GCC_LIB_SUBDIR)/include/syslimits.h \ - $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/include/ ; \ - fi - # These are in /lib, so... - #rm -rf $(TARGET_DIR)/usr/lib/libgcc_s.so* - #touch -c $(TARGET_DIR)/usr/bin/gcc - -gcc_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc - -gcc_target-clean: - rm -rf $(GCC_BUILD_DIR3) - rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)* - -gcc_target-dirclean: - rm -rf $(GCC_BUILD_DIR3) - -endif diff --git a/make/gdb.mk b/make/gdb.mk deleted file mode 100644 index 5340ab10e..000000000 --- a/make/gdb.mk +++ /dev/null @@ -1,189 +0,0 @@ -###################################################################### -# -# gdb -# -###################################################################### -GDB_VERSION:=$(strip $(GDB_VERSION)) - -GDB_SITE:=http://ftp.gnu.org/gnu/gdb - -ifeq ($(GDB_VERSION),5.3) -GDB_SOURCE:=gdb-$(GDB_VERSION).tar.gz -GDB_CAT:=zcat -else -GDB_SOURCE:=gdb-$(GDB_VERSION).tar.bz2 -GDB_CAT:=bzcat -endif - -GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_VERSION) - -$(DL_DIR)/$(GDB_SOURCE): - $(WGET) -P $(DL_DIR) $(GDB_SITE)/$(GDB_SOURCE) - -$(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) - $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - - $(SOURCE_DIR)/patch-kernel.sh $(GDB_DIR) $(SOURCE_DIR)/gdb/$(GDB_VERSION) \*.patch - # Copy a config.sub from gcc. This is only necessary until - # gdb's config.sub supports <arch>-linux-uclibc tuples. - # Should probably integrate this into the patch. -ifeq ($(GDB_VERSION),5.3) - chmod u+x $(GDB_DIR)/gdb/gdbserver/configure - cp $(GCC_DIR)/config.sub $(GDB_DIR) - cp $(GCC_DIR)/config.sub $(GDB_DIR)/readline/support/ -endif - touch $(GDB_DIR)/.unpacked - -###################################################################### -# -# gdb target -# -###################################################################### - -GDB_TARGET_DIR:=$(BUILD_DIR)/gdb-$(GDB_VERSION)-target - -GDB_TARGET_CONFIGURE_VARS:= \ - ac_cv_type_uintptr_t=yes \ - gt_cv_func_gettext_libintl=yes \ - ac_cv_func_dcgettext=yes \ - gdb_cv_func_sigsetjmp=yes \ - bash_cv_func_strcoll_broken=no \ - bash_cv_must_reinstall_sighandlers=no \ - bash_cv_func_sigsetjmp=present \ - bash_cv_have_mbstate_t=yes - -$(GDB_TARGET_DIR)/.configured: $(GDB_DIR)/.unpacked - mkdir -p $(GDB_TARGET_DIR) - (cd $(GDB_TARGET_DIR); \ - gdb_cv_func_sigsetjmp=yes \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \ - $(GDB_TARGET_CONFIGURE_VARS) \ - $(GDB_DIR)/configure \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --prefix=/usr \ - $(DISABLE_NLS) \ - --without-uiout --disable-gdbmi \ - --disable-tui --disable-gdbtk --without-x \ - --disable-sim --enable-gdbserver \ - --without-included-gettext \ - ); -ifeq ($(ENABLE_LOCALE),true) - -$(SED) "s,^INTL *=.*,INTL = -lintl,g;" $(GDB_DIR)/gdb/Makefile -endif - touch $(GDB_TARGET_DIR)/.configured - -$(GDB_TARGET_DIR)/gdb/gdb: $(GDB_TARGET_DIR)/.configured - $(MAKE) CC=$(TARGET_CC) MT_CFLAGS="$(TARGET_CFLAGS)" \ - -C $(GDB_TARGET_DIR) - $(STRIP) $(GDB_TARGET_DIR)/gdb/gdb - -$(TARGET_DIR)/usr/bin/gdb: $(GDB_TARGET_DIR)/gdb/gdb - install -c $(GDB_TARGET_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb - -gdb_target: $(TARGET_DIR)/usr/bin/gdb - -gdb_target-source: $(DL_DIR)/$(GDB_SOURCE) - -gdb_target-clean: - $(MAKE) -C $(GDB_DIR) clean - -gdb_target-dirclean: - rm -rf $(GDB_DIR) - -###################################################################### -# -# gdbserver -# -###################################################################### - -GDB_SERVER_DIR:=$(BUILD_DIR)/gdbserver-$(GDB_VERSION) - -$(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.unpacked - mkdir -p $(GDB_SERVER_DIR) - (cd $(GDB_SERVER_DIR); \ - $(TARGET_CONFIGURE_OPTS) \ - gdb_cv_func_sigsetjmp=yes \ - $(GDB_DIR)/gdb/gdbserver/configure \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --includedir=$(STAGING_DIR)/include \ - $(DISABLE_NLS) \ - --without-uiout --disable-gdbmi \ - --disable-tui --disable-gdbtk --without-x \ - --without-included-gettext \ - ); - touch $(GDB_SERVER_DIR)/.configured - -$(GDB_SERVER_DIR)/gdbserver: $(GDB_SERVER_DIR)/.configured - $(MAKE) CC=$(TARGET_CC) MT_CFLAGS="$(TARGET_CFLAGS)" \ - -C $(GDB_SERVER_DIR) - $(STRIP) $(GDB_SERVER_DIR)/gdbserver - -$(TARGET_DIR)/usr/bin/gdbserver: $(GDB_SERVER_DIR)/gdbserver - install -c $(GDB_SERVER_DIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver - -gdbserver: $(TARGET_DIR)/usr/bin/gdbserver - -gdbserver-clean: - $(MAKE) -C $(GDB_SERVER_DIR) clean - -gdbserver-dirclean: - rm -rf $(GDB_SERVER_DIR) - -###################################################################### -# -# gdb client -# -###################################################################### - -GDB_CLIENT_DIR:=$(TOOL_BUILD_DIR)/gdbclient-$(GDB_VERSION) - -$(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.unpacked - mkdir -p $(GDB_CLIENT_DIR) - (cd $(GDB_CLIENT_DIR); \ - gdb_cv_func_sigsetjmp=yes \ - $(GDB_DIR)/configure \ - --prefix=$(STAGING_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - $(DISABLE_NLS) \ - --without-uiout --disable-gdbmi \ - --disable-tui --disable-gdbtk --without-x \ - --without-included-gettext \ - --enable-threads \ - ); - touch $(GDB_CLIENT_DIR)/.configured - -$(GDB_CLIENT_DIR)/gdb/gdb: $(GDB_CLIENT_DIR)/.configured - $(MAKE) -C $(GDB_CLIENT_DIR) - strip $(GDB_CLIENT_DIR)/gdb/gdb - -$(TARGET_CROSS)gdb: $(GDB_CLIENT_DIR)/gdb/gdb - install -c $(GDB_CLIENT_DIR)/gdb/gdb $(TARGET_CROSS)gdb - ln -s ../../bin/$(REAL_GNU_TARGET_NAME)-gdb \ - $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/gdb - -gdbclient: $(TARGET_CROSS)gdb - -gdbclient-clean: - $(MAKE) -C $(GDB_CLIENT_DIR) clean - -gdbclient-dirclean: - rm -rf $(GDB_CLIENT_DIR) - - - diff --git a/make/gzip.mk b/make/gzip.mk index 8098dd933..d5ea8dd8a 100644 --- a/make/gzip.mk +++ b/make/gzip.mk @@ -10,7 +10,7 @@ GZIP_CAT:=zcat GZIP_BINARY:=$(GZIP_DIR)/gzip GZIP_TARGET_BINARY:=$(TARGET_DIR)/bin/zmore -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),false) +ifneq ($(BR2_LARGEFILE),y) GZIP_LARGEFILE="--disable-largefile" endif diff --git a/make/kernel-headers.mk b/make/kernel-headers.mk deleted file mode 100644 index de513f6e5..000000000 --- a/make/kernel-headers.mk +++ /dev/null @@ -1,124 +0,0 @@ -############################################################# -# -# Setup the kernel headers. I include a generic package of -# kernel headers here, so you shouldn't need to include your -# own. Be aware these kernel headers _will_ get blown away -# by a 'make clean' so don't put anything sacred in here... -# -############################################################# -ifneq ($(filter $(TARGETS),kernel-headers),) -DEFAULT_KERNEL_HEADERS:=$(strip $(DEFAULT_KERNEL_HEADERS)) - -LINUX_HEADERS_SITE:=127.0.0.1 -LINUX_HEADERS_SOURCE:=unspecified-kernel-headers - -ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.4.25") -VERSION:=2 -PATCHLEVEL:=4 -SUBLEVEL:=25 -LINUX_HEADERS_SITE:=http://www.uclibc.org/downloads/toolchain -LINUX_HEADERS_SOURCE:=linux-libc-headers-2.4.25.tar.bz2 -LINUX_HEADERS_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.4.25 -endif - -ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.4.27") -VERSION:=2 -PATCHLEVEL:=4 -SUBLEVEL:=25 -LINUX_HEADERS_SITE:=http://www.uclibc.org/downloads/toolchain -LINUX_HEADERS_SOURCE:=linux-libc-headers-2.4.27.tar.bz2 -LINUX_HEADERS_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.4.27 -endif - -ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.6.7") -VERSION:=2 -PATCHLEVEL:=6 -SUBLEVEL:=7 -LINUX_HEADERS_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ -LINUX_HEADERS_SOURCE:=linux-libc-headers-2.6.7.0.tar.bz2 -LINUX_HEADERS_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.7.0 -endif - -ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.6.8") -VERSION:=2 -PATCHLEVEL:=6 -SUBLEVEL:=8 -LINUX_HEADERS_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ -LINUX_HEADERS_SOURCE:=linux-libc-headers-2.6.8.0.tar.bz2 -LINUX_HEADERS_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.8.0 -endif - -LINUX_VERSION:=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL) - -LINUX_HEADERS_DIR:=$(TOOL_BUILD_DIR)/linux - -$(DL_DIR)/$(LINUX_HEADERS_SOURCE): - mkdir -p $(DL_DIR) - $(WGET) -P $(DL_DIR) $(LINUX_HEADERS_SITE)/$(LINUX_HEADERS_SOURCE) - -$(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - bzcat $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - -ifneq ($(LINUX_HEADERS_UNPACK_DIR),$(LINUX_HEADERS_DIR)) - mv $(LINUX_HEADERS_UNPACK_DIR) $(LINUX_HEADERS_DIR) -endif - touch $(LINUX_HEADERS_DIR)/.unpacked - -$(LINUX_HEADERS_DIR)/.patched: $(LINUX_HEADERS_DIR)/.unpacked - $(SOURCE_DIR)/patch-kernel.sh $(LINUX_HEADERS_DIR) $(SOURCE_DIR) linux-libc-headers-$(LINUX_VERSION)-\*.patch - touch $(LINUX_HEADERS_DIR)/.patched - -$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.patched - rm -f $(LINUX_HEADERS_DIR)/include/asm - @if [ ! -f $(LINUX_HEADERS_DIR)/Makefile ] ; then \ - echo -e "VERSION = $(VERSION)\nPATCHLEVEL = $(PATCHLEVEL)\n" > \ - $(LINUX_HEADERS_DIR)/Makefile; \ - echo -e "SUBLEVEL = $(SUBLEVEL)\nEXTRAVERSION =\n" >> \ - $(LINUX_HEADERS_DIR)/Makefile; \ - echo -e "KERNELRELEASE=\$$(VERSION).\$$(PATCHLEVEL).\$$(SUBLEVEL)\$$(EXTRAVERSION)" >> \ - $(LINUX_HEADERS_DIR)/Makefile; \ - fi; - @if [ "$(ARCH)" = "powerpc" ];then \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-ppc$(NOMMU) asm;) \ - elif [ "$(ARCH)" = "mips" ];then \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \ - elif [ "$(ARCH)" = "mipsel" ];then \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \ - elif [ "$(ARCH)" = "arm" ];then \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \ - cd asm; \ - if [ ! -L proc ] ; then \ - ln -fs proc-armv proc; \ - ln -fs arch-ebsa285 arch; fi); \ - elif [ "$(ARCH)" = "armeb" ];then \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \ - cd asm; \ - if [ ! -L proc ] ; then \ - ln -fs proc-armv proc; \ - ln -fs arch-ebsa285 arch; fi); \ - elif [ "$(ARCH)" = "cris" ];then \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-cris asm;) \ - elif [ "$(ARCH)" = "sh4" ];then \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-sh asm; \ - cd asm; \ - ln -s cpu-sh4 cpu) \ - else \ - (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-$(ARCH)$(NOMMU) asm;) \ - fi - touch $(LINUX_HEADERS_DIR)/include/linux/autoconf.h; - touch $(LINUX_HEADERS_DIR)/.configured - -$(LINUX_KERNEL): $(LINUX_HEADERS_DIR)/.configured - -kernel-headers: $(LINUX_HEADERS_DIR)/.configured - -kernel-headers-source: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) - -kernel-headers-clean: clean - rm -f $(LINUX_KERNEL) - rm -rf $(LINUX_HEADERS_DIR) - -kernel-headers-dirclean: - rm -rf $(LINUX_HEADERS_DIR) - -endif diff --git a/make/mkdosfs.mk b/make/mkdosfs.mk index 98288afed..71d768bae 100644 --- a/make/mkdosfs.mk +++ b/make/mkdosfs.mk @@ -9,7 +9,7 @@ MKDOSFS_DIR=$(BUILD_DIR)/dosfstools-2.8 MKDOSFS_CAT:=zcat MKDOSFS_BINARY:=mkdosfs/mkdosfs MKDOSFS_TARGET_BINARY:=sbin/mkdosfs -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) +ifeq ($(BR2_LARGEFILE),y) MKDOSFS_CFLAGS="-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" else MKDOSFS_CFLAGS="-Os -g" diff --git a/make/newt.mk b/make/newt.mk index cc2359e70..0f804f1cd 100644 --- a/make/newt.mk +++ b/make/newt.mk @@ -7,7 +7,7 @@ NEWT_SOURCE=newt-0.51.0.tar.bz2 NEWT_SITE=http://www.uclibc.org/ NEWT_DIR=$(BUILD_DIR)/newt-0.51.0 NEWT_VERSION=0.51.0 -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) +ifeq ($(BR2_LARGEFILE),y) NEWT_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 else NEWT_CFLAGS=-Os -g diff --git a/make/sed.mk b/make/sed.mk deleted file mode 100644 index 31506650d..000000000 --- a/make/sed.mk +++ /dev/null @@ -1,137 +0,0 @@ -############################################################# -# -# sed -# -############################################################# -SED_VER:=4.1.2 -SED_SOURCE:=sed-$(SED_VER).tar.gz -SED_SITE:=ftp://ftp.gnu.org/gnu/sed -SED_CAT:=zcat -SED_DIR1:=$(TOOL_BUILD_DIR)/sed-$(SED_VER) -SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VER) -SED_BINARY:=sed/sed -SED_TARGET_BINARY:=bin/sed -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) -SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64 -endif -SED:=$(STAGING_DIR)/bin/sed -i -e - -HOST_SED_TARGET=$(shell ./sources/sedcheck.sh) - -$(DL_DIR)/$(SED_SOURCE): - mkdir -p $(DL_DIR) - $(WGET) -P $(DL_DIR) $(SED_SITE)/$(SED_SOURCE) - -sed-source: $(DL_DIR)/$(SED_SOURCE) - - -############################################################# -# -# build sed for use on the host system -# -############################################################# -$(SED_DIR1)/.unpacked: $(DL_DIR)/$(SED_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - mkdir -p $(STAGING_DIR)/bin; - $(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - - touch $(SED_DIR1)/.unpacked - -$(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked - (cd $(SED_DIR1); rm -rf config.cache; \ - ./configure \ - --prefix=$(STAGING_DIR) \ - --prefix=/usr \ - ); - touch $(SED_DIR1)/.configured - -$(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured - $(MAKE) -C $(SED_DIR1) - -# This stuff is needed to work around GNU make deficiencies -build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) - @if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \ - rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi; - @if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \ - -ot $(SED_DIR1)/$(SED_BINARY) ] ; then \ - set -x; \ - mkdir -p $(STAGING_DIR)/bin; \ - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(SED_DIR1) install; \ - mv $(STAGING_DIR)/usr/bin/sed $(STAGING_DIR)/bin/; \ - rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \ - $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi - -use-sed-host-binary: - @if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \ - if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \ - mkdir -p $(STAGING_DIR)/bin; \ - rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); \ - ln -s $$SED $(STAGING_DIR)/$(SED_TARGET_BINARY) - -host-sed: $(HOST_SED_TARGET) - -host-sed-clean: - $(MAKE) DESTDIR=$(STAGING_DIR) -C $(SED_DIR1) uninstall - -$(MAKE) -C $(SED_DIR1) clean - -host-sed-dirclean: - rm -rf $(SED_DIR1) - - -############################################################# -# -# build sed for use on the target system -# -############################################################# -$(SED_DIR2)/.unpacked: $(DL_DIR)/$(SED_SOURCE) - $(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(BUILD_DIR) -xvf - - touch $(SED_DIR2)/.unpacked - -$(SED_DIR2)/.configured: $(SED_DIR2)/.unpacked - (cd $(SED_DIR2); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="$(SED_CFLAGS)" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - ); - touch $(SED_DIR2)/.configured - -$(SED_DIR2)/$(SED_BINARY): $(SED_DIR2)/.configured - $(MAKE) CC=$(TARGET_CC) -C $(SED_DIR2) - -# This stuff is needed to work around GNU make deficiencies -sed-target_binary: $(SED_DIR2)/$(SED_BINARY) - @if [ -L $(TARGET_DIR)/$(SED_TARGET_BINARY) ] ; then \ - rm -f $(TARGET_DIR)/$(SED_TARGET_BINARY); fi; - - @if [ ! -f $(SED_DIR2)/$(SED_BINARY) -o $(TARGET_DIR)/$(SED_TARGET_BINARY) \ - -ot $(SED_DIR2)/$(SED_BINARY) ] ; then \ - set -x; \ - $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SED_DIR2) install; \ - mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/; \ - rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ - $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc; fi - -sed: uclibc sed-target_binary - -sed-clean: - $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SED_DIR2) uninstall - -$(MAKE) -C $(SED_DIR2) clean - -sed-dirclean: - rm -rf $(SED_DIR2) - - diff --git a/make/slang.mk b/make/slang.mk index 17dcaddd5..6a1cb0632 100644 --- a/make/slang.mk +++ b/make/slang.mk @@ -6,7 +6,7 @@ SLANG_SOURCE=slang-1.4.5-mini.tar.bz2 SLANG_SITE:=http://www.uclibc.org/ SLANG_DIR=$(BUILD_DIR)/slang-1.4.5-mini -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) +ifeq ($(BR2_LARGEFILE),y) SLANG_CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 endif SLANG_CFLAGS+=-fPIC diff --git a/make/uclibc.mk b/make/uclibc.mk deleted file mode 100644 index 8feb5c0a1..000000000 --- a/make/uclibc.mk +++ /dev/null @@ -1,163 +0,0 @@ -############################################################# -# -# uClibc (the C library) -# -############################################################# - -ifneq ($(strip $(USE_UCLIBC_SNAPSHOT)),) -# Be aware that this changes daily.... -UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc -UCLIBC_SOURCE:=uClibc-$(strip $(USE_UCLIBC_SNAPSHOT)).tar.bz2 -UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots -else -# Note: 0.9.26 has known problems. So best use a snapshot until .27 is out. -# Anticipate the change. -UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-0.9.27 -UCLIBC_SOURCE:=uClibc-0.9.27.tar.bz2 -UCLIBC_SITE:=http://www.uclibc.org/downloads -endif - -UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ - -e 's/i.86/i386/' \ - -e 's/sparc.*/sparc/' \ - -e 's/arm.*/arm/g' \ - -e 's/m68k.*/m68k/' \ - -e 's/ppc/powerpc/g' \ - -e 's/v850.*/v850/g' \ - -e 's/sh64/sh/' \ - -e 's/sh[234]/sh/' \ - -e 's/mips.*/mips/' \ - -e 's/mipsel.*/mips/' \ - -e 's/cris.*/cris/' \ -) - - -$(DL_DIR)/$(UCLIBC_SOURCE): - mkdir -p $(DL_DIR) - $(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE) - -$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) - mkdir -p $(TOOL_BUILD_DIR) - bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf - - touch $(UCLIBC_DIR)/.unpacked - -$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(LINUX_HEADERS_DIR)/.configured - $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(UCLIBC_DIR)/Rules.mak -ifeq ($(ENABLE_LOCALE),true) - cp $(SOURCE_DIR)/uClibc.config-locale $(UCLIBC_DIR)/.config -else - cp $(SOURCE_DIR)/uClibc.config $(UCLIBC_DIR)/.config -endif - $(SED) 's,^.*TARGET_$(UCLIBC_TARGET_ARCH).*,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \ - $(UCLIBC_DIR)/.config - $(SED) 's,^TARGET_ARCH.*,TARGET_ARCH=\"$(UCLIBC_TARGET_ARCH)\",g' $(UCLIBC_DIR)/.config - $(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ - $(UCLIBC_DIR)/.config - $(SED) 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \ - $(UCLIBC_DIR)/.config - $(SED) 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \ - $(UCLIBC_DIR)/.config - $(SED) 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \ - $(UCLIBC_DIR)/.config -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) - $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.config -else - $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(UCLIBC_DIR)/.config -endif - $(SED) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(UCLIBC_DIR)/.config -ifeq ($(strip $(SOFT_FLOAT)),true) - $(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(UCLIBC_DIR)/.config -endif - mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include - mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib - mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib - $(MAKE) -C $(UCLIBC_DIR) \ - PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \ - HOSTCC="$(HOSTCC)" \ - pregen install_dev; - touch $(UCLIBC_DIR)/.configured - -$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET) - $(MAKE) -C $(UCLIBC_DIR) \ - PREFIX= \ - DEVEL_PREFIX=/ \ - RUNTIME_PREFIX=/ \ - HOSTCC="$(HOSTCC)" \ - all - -$(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a - $(MAKE) -C $(UCLIBC_DIR) \ - PREFIX=$(STAGING_DIR)/ \ - DEVEL_PREFIX=/ \ - RUNTIME_PREFIX=/ \ - install_runtime - $(MAKE) -C $(UCLIBC_DIR) \ - PREFIX=$(STAGING_DIR)/ \ - DEVEL_PREFIX=/ \ - RUNTIME_PREFIX=/ \ - install_dev - $(MAKE) -C $(UCLIBC_DIR) \ - PREFIX=$(STAGING_DIR) \ - HOSTCC="$(HOSTCC)" \ - utils install_utils - # Clean up the host compiled utils... - $(MAKE) -C $(UCLIBC_DIR)/utils clean - -ifneq ($(TARGET_DIR),) -$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/lib/libc.a - $(MAKE) -C $(UCLIBC_DIR) \ - PREFIX=$(TARGET_DIR) \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=/ \ - install_runtime - -$(TARGET_DIR)/usr/bin/ldd: $(TARGET_DIR)/lib/libc.so.0 - $(MAKE) -C $(UCLIBC_DIR) $(TARGET_CONFIGURE_OPTS) \ - PREFIX=$(TARGET_DIR) utils install_utils - -UCLIBC_TARGETS=$(TARGET_DIR)/lib/libc.so.0 $(TARGET_DIR)/usr/bin/ldd -endif - -uclibc-configured: $(UCLIBC_DIR)/.configured - -uclibc: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/lib/libc.a \ - $(UCLIBC_TARGETS) - -uclibc-source: $(DL_DIR)/$(UCLIBC_SOURCE) - -uclibc-configured-source: uclibc-source - -uclibc-clean: - -$(MAKE) -C $(UCLIBC_DIR) clean - rm -f $(UCLIBC_DIR)/.config - -uclibc-dirclean: - rm -rf $(UCLIBC_DIR) - - - - -############################################################# -# -# uClibc for the target just needs its header files -# and whatnot installed. -# -############################################################# - -$(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a - $(MAKE) -C $(UCLIBC_DIR) \ - PREFIX=$(TARGET_DIR) \ - DEVEL_PREFIX=/usr/ \ - RUNTIME_PREFIX=/ \ - install_dev - -uclibc_target: gcc uclibc $(TARGET_DIR)/usr/lib/libc.a - -uclibc_target-clean: - rm -f $(TARGET_DIR)/include - -uclibc_target-dirclean: - rm -f $(TARGET_DIR)/include - diff --git a/make/zlib.mk b/make/zlib.mk index 298c35abe..27fe43d5c 100644 --- a/make/zlib.mk +++ b/make/zlib.mk @@ -8,7 +8,7 @@ ZLIB_SOURCE=zlib-$(ZLIB_VER).tar.bz2 ZLIB_SITE=http://aleron.dl.sourceforge.net/sourceforge/libpng ZLIB_DIR=$(BUILD_DIR)/zlib-$(ZLIB_VER) ZLIB_CFLAGS= $(TARGET_CFLAGS) -fPIC -ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true) +ifeq ($(BR2_LARGEFILE),y) ZLIB_CFLAGS+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 endif |