summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile51
-rw-r--r--make/autoconf.mk1
-rw-r--r--make/automake.mk1
-rw-r--r--make/bash.mk1
-rw-r--r--make/binutils.mk29
-rw-r--r--make/bison.mk1
-rw-r--r--make/bridge.mk1
-rw-r--r--make/busybox.mk8
-rw-r--r--make/coreutils.mk2
-rw-r--r--make/diffutils.mk1
-rw-r--r--make/dropbear_sshd.mk10
-rw-r--r--make/ed.mk1
-rw-r--r--make/file.mk2
-rw-r--r--make/findutils.mk2
-rw-r--r--make/flex.mk1
-rw-r--r--make/gawk.mk2
-rw-r--r--make/gcc-3.3.mk147
-rw-r--r--make/gdb.mk1
-rw-r--r--make/grep.mk1
-rw-r--r--make/libfloat.mk56
-rw-r--r--make/libtool.mk2
-rw-r--r--make/m4.mk2
-rw-r--r--make/make.mk1
-rw-r--r--make/ncurses.mk3
-rw-r--r--make/openssh.mk1
-rw-r--r--make/openssl.mk24
-rw-r--r--make/patch.mk1
-rw-r--r--make/sed.mk1
-rw-r--r--make/strace.mk2
-rw-r--r--make/tar.mk1
-rw-r--r--make/tinylogin.mk5
-rw-r--r--make/uclibc.mk26
-rw-r--r--make/zlib.mk6
-rw-r--r--sources/dropbear-010-ranlib.patch24
-rw-r--r--sources/gcc-830-nonhidden.patch14
-rw-r--r--sources/gcc-840-abi_check.patch14
-rw-r--r--sources/i386-gcc-soft-float.patch61
-rw-r--r--sources/libfloat.patch44
38 files changed, 440 insertions, 111 deletions
diff --git a/Makefile b/Makefile
index 7e8bc3191..aa209ea5a 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,8 @@
# What sortof target system shall we compile this for?
ARCH:=i386
#ARCH:=arm
+#ARCH:=mipsel
+#ARCH:=mips
#ARCH:=powerpc
#ARCH:=whatever
@@ -64,9 +66,27 @@ OPTIMIZE_FOR_CPU=$(ARCH)
#OPTIMIZE_FOR_CPU=strongarm
#OPTIMIZE_FOR_CPU=whatever
+# Soft floating point options.
+# Notes:
+# Currently builds with gcc 3.3 for i386, arm, mips, mipsel.
+# Only tested with multilib enabled.
+# For i386, long double is the same as double (64 bits). While this
+# is unusual for x86, it seemed the best approach considering the
+# limitations in the gcc floating point emulation library.
+# For arm, soft float uses the usual libfloat routines.
+# The uClibc built will support _only_ applications compiled with the
+# -msoft-float flag. To avoid CFLAGS problems, you may want to use
+# scripts similar to those in the build*/staging_dir/bin directory.
+# Uncomment the next 2 lines to build a soft-float toolchain and rootfs.
+# SOFT_FLOAT_CONFIG_OPTION=--without-float
+# TARGET_SOFT_FLOAT=-msoft-float
+
+TARGET_OPTIMIZATION=-Os
+TARGET_DEBUGGING= #-g
+TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) $(TARGET_SOFT_FLOAT)
+
# Any additional gcc options you may want to include....
EXTRA_GCC_CONFIG_OPTIONS=
-#EXTRA_GCC_CONFIG_OPTIONS=--without-float
# Enable the following if you want locale/gettext/i18n support.
#ENABLE_LOCALE:=true
@@ -172,23 +192,32 @@ TARGETS+=ext2root
# what you are doing.
#
#############################################################
+ifeq ("$(strip $(TARGET_SOFT_FLOAT))","")
+ARCH_FPU_SUFFIX:=
+else
+ARCH_FPU_SUFFIX:=_nofpu
+endif
+
+
HOSTCC:=gcc
BASE_DIR:=${shell pwd}
SOURCE_DIR:=$(BASE_DIR)/sources
DL_DIR:=$(SOURCE_DIR)/dl
PATCH_DIR=$(SOURCE_DIR)/patches
-BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)
+BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
TARGET_DIR:=$(BUILD_DIR)/root
STAGING_DIR=$(BUILD_DIR)/staging_dir
-TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)
+TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)
TARGET_PATH=$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin
-TARGET_CROSS=$(STAGING_DIR)/bin/$(ARCH)-uclibc-
-TARGET_CC=$(TARGET_CROSS)gcc
+#TARGET_CROSS=$(STAGING_DIR)/bin/$(ARCH)-uclibc-
+TARGET_CROSS=$(STAGING_DIR)/bin/$(ARCH)-linux-
+TARGET_CC=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT)
STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
#STRIP:=/bin/true
-IMAGE:=$(BASE_DIR)/root_fs_$(ARCH)
+IMAGE:=$(BASE_DIR)/root_fs_$(ARCH)$(ARCH_FPU_SUFFIX)
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
-KERNEL_CROSS=$(STAGING_DIR)/bin/$(ARCH)-uclibc-
+#KERNEL_CROSS=$(STAGING_DIR)/bin/$(ARCH)-uclibc-
+KERNEL_CROSS=$(STAGING_DIR)/bin/$(ARCH)-linux-
HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
-e 's/sparc.*/sparc/' \
-e 's/arm.*/arm/g' \
@@ -207,12 +236,10 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
AS=$(TARGET_CROSS)as \
LD=$(TARGET_CROSS)ld \
NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
- GCC=$(TARGET_CROSS)gcc \
- CXX=$(TARGET_CROSS)g++ \
+ CC=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ GCC=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ CXX=$(TARGET_CROSS)g++$(TARGET_SOFT_FLOAT) \
RANLIB=$(TARGET_CROSS)ranlib
-#Directory in which to build the toolchain
-TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)
ifeq ($(ENABLE_LOCALE),true)
DISABLE_NLS:=
else
diff --git a/make/autoconf.mk b/make/autoconf.mk
index 2332f546a..8343160ae 100644
--- a/make/autoconf.mk
+++ b/make/autoconf.mk
@@ -22,6 +22,7 @@ $(AUTOCONF_DIR)/.unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE)
$(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked
(cd $(AUTOCONF_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) EMACS="no" \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/automake.mk b/make/automake.mk
index 4231a9d8d..6ac66003a 100644
--- a/make/automake.mk
+++ b/make/automake.mk
@@ -22,6 +22,7 @@ $(AUTOMAKE_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE)
$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
(cd $(AUTOMAKE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/bash.mk b/make/bash.mk
index 21a31d060..c919a066f 100644
--- a/make/bash.mk
+++ b/make/bash.mk
@@ -25,6 +25,7 @@ $(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE)
$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
(cd $(BASH_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
+ CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_setvbuf_reversed=no \
bash_cv_have_mbstate_t=yes \
./configure \
diff --git a/make/binutils.mk b/make/binutils.mk
index ac2116a0a..c9de5593d 100644
--- a/make/binutils.mk
+++ b/make/binutils.mk
@@ -57,7 +57,8 @@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
--with-sysroot=$(STAGING_DIR) \
--with-lib-path="$(STAGING_DIR)/usr/lib:$(STAGING_DIR)/lib" \
$(MULTILIB) \
- --program-prefix=$(ARCH)-uclibc-);
+ $(SOFT_FLOAT_CONFIG_OPTION) \
+ --program-prefix=$(ARCH)-linux-);
touch $(BINUTILS_DIR1)/.configured
$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
@@ -74,12 +75,12 @@ $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump
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 \
+ if [ -x $(STAGING_DIR)/bin/$(ARCH)-linux-$${app} ] ; then \
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin; \
- ln -fs ../../bin/$(ARCH)-uclibc-$${app} $${app}; \
+ ln -fs ../../bin/$(ARCH)-linux-$${app} $${app}; \
); \
(cd $(STAGING_DIR)/usr/bin; \
- ln -fs ../../bin/$(ARCH)-uclibc-$${app} $${app}; \
+ ln -fs ../../bin/$(ARCH)-linux-$${app} $${app}; \
); \
fi; \
done;
@@ -122,15 +123,16 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/
(cd $(BINUTILS_DIR2); \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
CC_FOR_BUILD=$(HOSTCC) \
CXX_FOR_BUILD=$(HOSTCC) \
AR_FOR_TARGET=$(TARGET_CROSS)ar \
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
NM_FOR_TARGET=$(TARGET_CROSS)nm \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc \
- GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ GCC_FOR_TARGET=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ CXX_FOR_TARGET=$(TARGET_CROSS)g++$(TARGET_SOFT_FLOAT) \
RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
@@ -140,6 +142,7 @@ $(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
--mandir=/usr/man \
--infodir=/usr/info \
$(MULTILIB) \
+ $(SOFT_FLOAT_CONFIG_OPTION) \
);
touch $(BINUTILS_DIR2)/.configured
@@ -151,9 +154,9 @@ $(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
NM_FOR_TARGET=$(TARGET_CROSS)nm \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc \
- GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ GCC_FOR_TARGET=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ CXX_FOR_TARGET=$(TARGET_CROSS)g++$(TARGET_SOFT_FLOAT) \
RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib
touch -c $(BINUTILS_DIR2)/binutils/objdump
@@ -165,9 +168,9 @@ $(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
NM_FOR_TARGET=$(TARGET_CROSS)nm \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc \
- GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ GCC_FOR_TARGET=$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) \
+ CXX_FOR_TARGET=$(TARGET_CROSS)g++$(TARGET_SOFT_FLOAT) \
RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
prefix=/usr \
infodir=/usr/info \
diff --git a/make/bison.mk b/make/bison.mk
index f1dbf4607..71a6d7788 100644
--- a/make/bison.mk
+++ b/make/bison.mk
@@ -22,6 +22,7 @@ $(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE)
$(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
(cd $(BISON_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
gt_cv_func_gnugettext2_libintl=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
diff --git a/make/bridge.mk b/make/bridge.mk
index 0ecfa9c21..fca571ec1 100644
--- a/make/bridge.mk
+++ b/make/bridge.mk
@@ -19,6 +19,7 @@ $(BRIDGE_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BRIDGE_SOURCE)
$(BRIDGE_BUILD_DIR)/.configured: $(BRIDGE_BUILD_DIR)/.unpacked
(cd $(BRIDGE_BUILD_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/busybox.mk b/make/busybox.mk
index e6465e13c..d7b682b47 100644
--- a/make/busybox.mk
+++ b/make/busybox.mk
@@ -33,7 +33,7 @@ ifeq ($(USE_BUSYBOX_SNAPSHOT),true)
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
perl -i -p -e "s/^.*DOLFS.*/DOLFS=y/;" $(BUSYBOX_DIR)/.config
endif
- $(MAKE) CROSS="$(TARGET_CROSS)" -C $(BUSYBOX_DIR) oldconfig
+ $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(BUSYBOX_DIR) oldconfig
else # Not using snapshot
cp $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/Config.h
perl -i -p -e "s,^CROSS.*,CROSS=$(TARGET_CROSS),;" $(BUSYBOX_DIR)/Makefile
@@ -47,10 +47,12 @@ endif
busybox-unpack: $(BUSYBOX_DIR)/.configured
$(BUSYBOX_DIR)/busybox: $(BUSYBOX_DIR)/.configured
- $(MAKE) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" -C $(BUSYBOX_DIR)
+ $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
+ -C $(BUSYBOX_DIR)
$(TARGET_DIR)/bin/busybox: $(BUSYBOX_DIR)/busybox
- $(MAKE) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" -C $(BUSYBOX_DIR) install
+ $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
+ -C $(BUSYBOX_DIR) install
# Just in case
-chmod a+x $(TARGET_DIR)/usr/share/udhcpc/default.script
diff --git a/make/coreutils.mk b/make/coreutils.mk
index 0d1d723d9..5c4e28a28 100644
--- a/make/coreutils.mk
+++ b/make/coreutils.mk
@@ -24,6 +24,7 @@ $(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE)
$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
(cd $(COREUTILS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
@@ -65,6 +66,7 @@ $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY): $(COREUTILS_DIR)/$(COREUTILS_BINARY)
ln -fs test $(TARGET_DIR)/usr/bin/[
# gnu thinks chroot is in bin, debian thinks it's in sbin
mv $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
+ $(STRIP) $(TARGET_DIR)/usr/sbin/chroot > /dev/null 2>&1
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
diff --git a/make/diffutils.mk b/make/diffutils.mk
index 6ef49da66..823de91b3 100644
--- a/make/diffutils.mk
+++ b/make/diffutils.mk
@@ -22,6 +22,7 @@ $(DIFFUTILS_DIR)/.unpacked: $(DL_DIR)/$(DIFFUTILS_SOURCE)
$(DIFFUTILS_DIR)/.configured: $(DIFFUTILS_DIR)/.unpacked
(cd $(DIFFUTILS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/dropbear_sshd.mk b/make/dropbear_sshd.mk
index 98bad0f6e..9d7b7d791 100644
--- a/make/dropbear_sshd.mk
+++ b/make/dropbear_sshd.mk
@@ -18,12 +18,14 @@ dropbear_sshd-source: $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE)
$(DROPBEAR_SSHD_DIR)/.unpacked: $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE)
$(DROPBEAR_SSHD_CAT) $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ $(SOURCE_DIR)/patch-kernel.sh $(DROPBEAR_SSHD_DIR) $(SOURCE_DIR) dropbear-*.patch
touch $(DROPBEAR_SSHD_DIR)/.unpacked
$(DROPBEAR_SSHD_DIR)/.configured: $(DROPBEAR_SSHD_DIR)/.unpacked
(cd $(DROPBEAR_SSHD_DIR); rm -rf config.cache; \
autoconf; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
@@ -44,17 +46,19 @@ $(DROPBEAR_SSHD_DIR)/.configured: $(DROPBEAR_SSHD_DIR)/.unpacked
touch $(DROPBEAR_SSHD_DIR)/.configured
$(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY): $(DROPBEAR_SSHD_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR)
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) LD=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR)
$(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY): $(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY)
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR) install
+ $(MAKE) DESTDIR=$(TARGET_DIR) $(TARGET_CONFIGURE_OPTS) LD=$(TARGET_CC) \
+ -C $(DROPBEAR_SSHD_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
dropbear_sshd: uclibc zlib $(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY)
dropbear_sshd-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR) uninstall
+ $(MAKE) DESTDIR=$(TARGET_DIR) $(TARGET_CONFIGURE_OPTS) LD=$(TARGET_CC) \
+ -C $(DROPBEAR_SSHD_DIR) uninstall
-$(MAKE) -C $(DROPBEAR_SSHD_DIR) clean
dropbear_sshd-dirclean:
diff --git a/make/ed.mk b/make/ed.mk
index c2754683c..de6c3cb25 100644
--- a/make/ed.mk
+++ b/make/ed.mk
@@ -27,6 +27,7 @@ $(ED_DIR)/.unpacked: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH)
$(ED_DIR)/.configured: $(ED_DIR)/.unpacked
(cd $(ED_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/file.mk b/make/file.mk
index 53de3fbd3..471d92d71 100644
--- a/make/file.mk
+++ b/make/file.mk
@@ -23,6 +23,7 @@ $(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE)
$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked
(cd $(FILE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
@@ -47,6 +48,7 @@ $(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured
$(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY)
$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(FILE_DIR) install
+ -($(STRIP) $(TARGET_DIR)/usr/lib/libmagic.so.*.* > /dev/null 2>&1)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
diff --git a/make/findutils.mk b/make/findutils.mk
index 518b5771f..b7716b2c7 100644
--- a/make/findutils.mk
+++ b/make/findutils.mk
@@ -23,6 +23,7 @@ $(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
(cd $(FINDUTILS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_setvbuf_reversed=no \
./configure \
--target=$(GNU_TARGET_NAME) \
@@ -52,6 +53,7 @@ findutils-target_binary: $(FINDUTILS_DIR)/$(FINDUTILS_BINARY)
@if [ $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) -ot $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) ] ; then \
set -x; \
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) install; \
+ $(STRIP) $(TARGET_DIR)/usr/lib/locate/* > /dev/null 2>&1; \
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc; fi;
diff --git a/make/flex.mk b/make/flex.mk
index 89855d76c..2dc944902 100644
--- a/make/flex.mk
+++ b/make/flex.mk
@@ -27,6 +27,7 @@ $(FLEX_DIR)/.unpacked: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked
(cd $(FLEX_DIR); autoconf; rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/gawk.mk b/make/gawk.mk
index da60945cf..f3a1a1d8e 100644
--- a/make/gawk.mk
+++ b/make/gawk.mk
@@ -22,6 +22,7 @@ $(GAWK_DIR)/.unpacked: $(DL_DIR)/$(GAWK_SOURCE)
$(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked
(cd $(GAWK_DIR); rm -rf config.cache; autoconf; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_getpgrp_void=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
@@ -49,6 +50,7 @@ $(TARGET_DIR)/$(GAWK_TARGET_BINARY): $(GAWK_DIR)/$(GAWK_BINARY)
$(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)
+ $(STRIP) $(TARGET_DIR)/usr/lib/awk/* > /dev/null 2>&1
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
diff --git a/make/gcc-3.3.mk b/make/gcc-3.3.mk
index ab8e6b847..077e02a0a 100644
--- a/make/gcc-3.3.mk
+++ b/make/gcc-3.3.mk
@@ -66,6 +66,11 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
$(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-*.patch
+ifneq ("$(strip $(TARGET_SOFT_FLOAT))","")
+ifeq ("$(strip $(ARCH))","i386")
+ $(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) i386-gcc-soft-float.patch
+endif
+endif
touch $(GCC_DIR)/.patched
$(GCC_DIR)/.gcc3_3_build_hacks: $(GCC_DIR)/.patched
@@ -111,8 +116,11 @@ $(GCC_DIR)/.gcc3_3_build_hacks: $(GCC_DIR)/.patched
# # the step or libgcc will not build...
$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc3_3_build_hacks
mkdir -p $(GCC_BUILD_DIR1)
+ echo -e "#!/bin/sh\nexec $(GCC_BUILD_DIR1)/gcc/xgcc -B$(GCC_BUILD_DIR1)/gcc/ -B$(STAGING_DIR)/arm-linux/bin/ -B$(STAGING_DIR)/arm-linux/lib/ -isystem $(STAGING_DIR)/arm-linux/include $(TARGET_SOFT_FLOAT) \$$@" > $(GCC_BUILD_DIR1)/target_gcc
+ chmod a+x $(GCC_BUILD_DIR1)/target_gcc
(cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) AR=$(TARGET_CROSS)ar \
RANLIB=$(TARGET_CROSS)ranlib CC=$(HOSTCC) \
+ gcc_cv_as_hidden=no \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
@@ -132,25 +140,39 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc3_3_build_hacks
--oldincludedir=$(STAGING_DIR)/include $(MULTILIB) \
--enable-target-optspace $(DISABLE_NLS) --with-gnu-ld \
--disable-shared --enable-languages=c --disable-__cxa_atexit \
- $(EXTRA_GCC_CONFIG_OPTIONS) --program-prefix=$(ARCH)-uclibc-);
+ $(SOFT_FLOAT_CONFIG_OPTION) \
+ $(EXTRA_GCC_CONFIG_OPTIONS) --program-prefix=$(ARCH)-linux-);
touch $(GCC_BUILD_DIR1)/.configured
$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) \
- AR_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ar \
- RANLIB_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ranlib
+ AR_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-linux-ar \
+ RANLIB_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-linux-ranlib \
+ CC_FOR_TARGET=$(GCC_BUILD_DIR1)/target_gcc \
+ GCC_FOR_TARGET=$(GCC_BUILD_DIR1)/target_gcc
touch $(GCC_BUILD_DIR1)/.compiled
-$(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc: $(GCC_BUILD_DIR1)/.compiled
+$(STAGING_DIR)/bin/$(ARCH)-linux-gcc: $(GCC_BUILD_DIR1)/.compiled
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -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
+ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-linux-cpp
+ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/$(ARCH)-linux-gcc
+ if [ -n "$(strip $(TARGET_SOFT_FLOAT))" ] ; then \
+ for app in gcc c++ g++ ; do \
+ if [ -x $(STAGING_DIR)/bin/$(ARCH)-linux-$${app} ] ; then \
+ (cd $(STAGING_DIR)/bin; \
+ rm -f $(ARCH)-linux-$${app}$(TARGET_SOFT_FLOAT); \
+ echo -e "#!/bin/sh\nexec $(STAGING_DIR)/bin/$(ARCH)-linux-$${app} -msoft-float \$$@" > $(ARCH)-linux-$${app}$(TARGET_SOFT_FLOAT); \
+ chmod a+x $(ARCH)-linux-$${app}$(TARGET_SOFT_FLOAT); \
+ ); \
+ fi; \
+ done; \
+ fi; \
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
-gcc3_3_initial: binutils uclibc-configured $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
+gcc3_3_initial: binutils uclibc-configured $(STAGING_DIR)/bin/$(ARCH)-linux-gcc
gcc3_3_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
@@ -159,8 +181,6 @@ gcc3_3_initial-clean:
gcc3_3_initial-dirclean:
rm -rf $(GCC_BUILD_DIR1)
-
-
#############################################################
#
# second pass compiler build. Build the compiler targeting
@@ -181,9 +201,15 @@ $(GCC_DIR)/.g++_build_hacks: $(GCC_DIR)/.patched
$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
mkdir -p $(GCC_BUILD_DIR2)
+ #echo -e "#!/bin/sh\nexec $(GCC_BUILD_DIR2)/gcc/g++ -B$(GCC_BUILD_DIR2)/gcc/ -B$(STAGING_DIR)/arm-linux/bin/ -B$(STAGING_DIR)/arm-linux/lib/ -isystem $(STAGING_DIR)/arm-linux/include $(TARGET_SOFT_FLOAT) \$$@" > $(GCC_BUILD_DIR2)/target_g++
+ echo -e "#!/bin/sh\nexec $(GCC_BUILD_DIR2)/gcc/xgcc -B$(GCC_BUILD_DIR2)/gcc/ -B$(STAGING_DIR)/arm-linux/bin/ -B$(STAGING_DIR)/arm-linux/lib/ -isystem $(STAGING_DIR)/arm-linux/include $(TARGET_SOFT_FLOAT) \$$@" > $(GCC_BUILD_DIR2)/target_g++
+ chmod a+x $(GCC_BUILD_DIR2)/target_g++
+ echo -e "#!/bin/sh\nexec $(GCC_BUILD_DIR2)/gcc/xgcc -B$(GCC_BUILD_DIR2)/gcc/ -B$(STAGING_DIR)/arm-linux/bin/ -B$(STAGING_DIR)/arm-linux/lib/ -isystem $(STAGING_DIR)/arm-linux/include $(TARGET_SOFT_FLOAT) \$$@" > $(GCC_BUILD_DIR2)/target_gcc
+ chmod a+x $(GCC_BUILD_DIR2)/target_gcc
(cd $(GCC_BUILD_DIR2); PATH=$(TARGET_PATH) AR=$(TARGET_CROSS)ar \
RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld \
NM=$(TARGET_CROSS)nm CC=$(HOSTCC) \
+ gcc_cv_as_hidden=no \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
@@ -207,15 +233,18 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
--with-gnu-ld --disable-__cxa_atexit \
--enable-languages=$(TARGET_LANGUAGES) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
- --program-prefix=$(ARCH)-uclibc- \
+ --program-prefix=$(ARCH)-linux- \
);
touch $(GCC_BUILD_DIR2)/.configured
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
- PATH=$(TARGET_PATH) CC=$(HOSTCC) \
+ PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) \
+ 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) $(JLEVEL) -C $(GCC_BUILD_DIR2)
+ CC_FOR_TARGET=$(GCC_BUILD_DIR2)/target_gcc \
+ GCC_FOR_TARGET=$(GCC_BUILD_DIR2)/target_gcc \
+ CXX_FOR_TARGET=$(GCC_BUILD_DIR2)/target_g++
touch $(GCC_BUILD_DIR2)/.compiled
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled $(STAGING_DIR)/lib/libc.a
@@ -223,22 +252,33 @@ $(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled $(STAGING_DIR)/lib/lib
-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++
- -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-g++ $(STAGING_DIR)/bin/$(ARCH)-uclibc-g++
- -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-c++filt $(STAGING_DIR)/bin/$(ARCH)-uclibc-c++filt
+ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-linux-cpp
+ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/$(ARCH)-linux-gcc
+ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin/$(ARCH)-linux-c++
+ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-g++ $(STAGING_DIR)/bin/$(ARCH)-linux-g++
+ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-c++filt $(STAGING_DIR)/bin/$(ARCH)-linux-c++filt
rm -f $(STAGING_DIR)/bin/cpp $(STAGING_DIR)/bin/gcov $(STAGING_DIR)/bin/*gccbug
- rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-$(ARCH)-uclibc-*
+ rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-$(ARCH)-linux-*
rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
$(STAGING_DIR)/share/locale
# Strip the host binaries
-strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/*
+ if [ -n "$(strip $(TARGET_SOFT_FLOAT))" ] ; then \
+ for app in gcc c++ g++ ; do \
+ if [ -x $(STAGING_DIR)/bin/$(ARCH)-linux-$${app} ] ; then \
+ (cd $(STAGING_DIR)/bin; \
+ rm -f $(ARCH)-linux-$${app}$(TARGET_SOFT_FLOAT); \
+ echo -e "#!/bin/sh\nexec $(STAGING_DIR)/bin/$(ARCH)-linux-$${app} -msoft-float \$$@" > $(ARCH)-linux-$${app}$(TARGET_SOFT_FLOAT); \
+ chmod a+x $(ARCH)-linux-$${app}$(TARGET_SOFT_FLOAT); \
+ ); \
+ fi; \
+ done; \
+ fi; \
set -e; \
for app in cc gcc c89 cpp c++ g++ ; do \
- if [ -x $(STAGING_DIR)/bin/$(ARCH)-uclibc-$${app} ] ; then \
+ if [ -x $(STAGING_DIR)/bin/$(ARCH)-linux-$${app} ] ; then \
(cd $(STAGING_DIR)/usr/bin; \
- ln -fs ../../bin/$(ARCH)-uclibc-$${app} $${app}; \
+ ln -fs ../../bin/$(ARCH)-linux-$${app} $${app}; \
); \
fi; \
done;
@@ -250,6 +290,8 @@ $(TARGET_DIR)/lib/libstdc++.so.5.0.5: $(GCC_BUILD_DIR2)/.installed
$(TARGET_DIR)/lib/libgcc_s.so.0.9.9: $(GCC_BUILD_DIR2)/.installed
cp -a $(STAGING_DIR)/lib/libgcc_s.so* $(TARGET_DIR)/lib/
+ # Enable applications to link with the shared ligbcc.
+ ln -sf $(STAGING_DIR)/lib/libgcc_s.so $(STAGING_DIR)/usr/lib/gcc-lib/$(ARCH)-linux/$(GCC_VERSION)/libgcc.so
ifeq ($(INSTALL_LIBSTDCPP),true)
GCC_TARGETS= $(TARGET_DIR)/lib/libgcc_s.so.0.9.9 $(TARGET_DIR)/lib/libstdc++.so.5.0.5
@@ -259,7 +301,7 @@ endif
endif
-gcc3_3: binutils uclibc-configured gcc3_3_initial uclibc \
+gcc3_3: binutils uclibc-configured gcc3_3_initial $(LIBFLOAT_TARGET) uclibc \
$(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS)
gcc3_3-clean:
@@ -269,11 +311,6 @@ gcc3_3-clean:
gcc3_3-dirclean:
rm -rf $(GCC_BUILD_DIR2)
-
-
-
-
-
#############################################################
#
# Next build target gcc compiler
@@ -281,27 +318,7 @@ gcc3_3-dirclean:
#############################################################
GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-3.3-target
-ifeq ($(HOST_ARCH),$(ARCH))
-TARGET_GCC_ARGS=$(TARGET_CONFIGURE_OPTS) \
- AR_FOR_BUILD=ar \
- AS_FOR_BUILD=as \
- LD_FOR_BUILD=ld \
- NM_FOR_BUILD=nm \
- RANLIB_FOR_BUILD=ranlib \
- HOST_CC=$(HOSTCC) \
- CC_FOR_BUILD=$(HOSTCC) \
- GCC_FOR_BUILD=$(HOSTCC) \
- CXX_FOR_BUILD=$(HOSTCC) \
- AR_FOR_TARGET=$(TARGET_CROSS)ar \
- AS_FOR_TARGET=$(TARGET_CROSS)as \
- LD_FOR_TARGET=$(TARGET_CROSS)ld \
- NM_FOR_TARGET=$(TARGET_CROSS)nm \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc \
- GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
- RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib
-else
-TARGET_GCC_ARGS=\
+TARGET_GCC_ARGS= $(TARGET_CONFIGURE_OPTS) \
AR_FOR_BUILD=ar \
AS_FOR_BUILD=as \
LD_FOR_BUILD=ld \
@@ -315,11 +332,13 @@ TARGET_GCC_ARGS=\
AS_FOR_TARGET=$(TARGET_CROSS)as \
LD_FOR_TARGET=$(TARGET_CROSS)ld \
NM_FOR_TARGET=$(TARGET_CROSS)nm \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc \
- GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ CC="$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) -isystem $(STAGING_DIR)/include" \
+ GCC="$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) -isystem $(STAGING_DIR)/include" \
+ CXX="$(TARGET_CROSS)g++$(TARGET_SOFT_FLOAT) -isystem $(STAGING_DIR)/include" \
+ CC_FOR_TARGET="$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) -isystem $(STAGING_DIR)/include" \
+ GCC_FOR_TARGET="$(TARGET_CROSS)gcc$(TARGET_SOFT_FLOAT) -isystem $(STAGING_DIR)/include" \
+ CXX_FOR_TARGET="$(TARGET_CROSS)g++$(TARGET_SOFT_FLOAT) -isystem $(STAGING_DIR)/include" \
RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib
-endif
# We need to unpack a pristine source tree to avoid some of
# the previously applied hacks, which do not apply here...
@@ -331,6 +350,9 @@ $(GCC_BUILD_DIR3)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
$(GCC_BUILD_DIR3)/.patched: $(GCC_BUILD_DIR3)/.unpacked
# Apply any files named gcc-*.patch from the source directory to gcc
$(SOURCE_DIR)/patch-kernel.sh $(GCC_BUILD_DIR3) $(SOURCE_DIR) gcc-*.patch
+ifeq ("$(strip $(ARCH))","i386")
+ $(SOURCE_DIR)/patch-kernel.sh $(GCC_BUILD_DIR3) $(SOURCE_DIR) i386-gcc-*.patch
+endif
touch $(GCC_BUILD_DIR3)/.patched
$(GCC_BUILD_DIR3)/.gcc3_3_build_hacks: $(GCC_BUILD_DIR3)/.patched
@@ -360,20 +382,23 @@ $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks: $(GCC_BUILD_DIR3)/.patched
$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks
mkdir -p $(GCC_BUILD_DIR3)
- (cd $(GCC_BUILD_DIR3); ln -fs $(ARCH)-linux build-$(GNU_TARGET_NAME))
+ #(cd $(GCC_BUILD_DIR3); ln -fs $(ARCH)-linux build-$(GNU_TARGET_NAME))
(cd $(GCC_BUILD_DIR3); \
$(TARGET_GCC_ARGS) \
+ gcc_cv_as_hidden=no \
./configure \
+ --verbose \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
- --build=$(ARCH)-linux \
+ --build=`./config.guess` \
--prefix=/usr \
--mandir=/usr/man \
--infodir=/usr/info \
--with-gxx-include-dir=/usr/include/c++/3.3 \
+ --enable-target-optspace \
--enable-shared \
$(MULTILIB) \
- --enable-target-optspace $(DISABLE_NLS) \
+ $(DISABLE_NLS) \
--with-gnu-ld --disable-__cxa_atexit \
--enable-languages=$(TARGET_LANGUAGES) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
@@ -402,17 +427,27 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
#-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++.so.5.0.5 libstdc++.so)
+ rm -f $(TARGET_DIR)/lib/libstdc++.so*
# A nasty hack to work around g++ adding -lgcc_eh to the link
-(cd $(TARGET_DIR)/usr/lib/gcc-lib/$(ARCH)-linux/$(GCC_VERSION)/ ; ln -s libgcc.a libgcc_eh.a)
# Make sure gcc does not think we are cross compiling
perl -i -p -e "s/^1/0/;" $(TARGET_DIR)/usr/lib/gcc-lib/$(ARCH)-linux/$(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/$(ARCH)-linux/$(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/$(ARCH)-linux/$(GCC_VERSION)/include/syslimits.h $(TARGET_DIR)/usr/lib/gcc-lib/$(ARCH)-linux/$(GCC_VERSION)/include/
+ # Enable applications to find the shared libgcc when linking (on target).
+ ln -sf $(TARGET_DIR)/lib/libgcc_s.so $(TARGET_DIR)/usr/lib/gcc-lib/$(ARCH)-linux/$(GCC_VERSION)/libgcc.so
+ (cd $(TARGET_DIR)/usr/lib/gcc-lib/$(ARCH)-linux/$(GCC_VERSION) ; ln -sf /lib/libgcc_s.so libgcc.so)
+ # These are in /lib, so...
+ rm -rf $(TARGET_DIR)/usr/lib/libgcc_s.so*
touch -c $(TARGET_DIR)/usr/bin/gcc
gcc3_3_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc
diff --git a/make/gdb.mk b/make/gdb.mk
index 7bff3399f..88bd6d693 100644
--- a/make/gdb.mk
+++ b/make/gdb.mk
@@ -21,6 +21,7 @@ $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) $(GDB_PATCH)
$(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
(cd $(GDB_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_type_uintptr_t=yes \
gt_cv_func_gettext_libintl=yes \
ac_cv_func_dcgettext=yes \
diff --git a/make/grep.mk b/make/grep.mk
index 7c205833c..449904382 100644
--- a/make/grep.mk
+++ b/make/grep.mk
@@ -22,6 +22,7 @@ $(GNUGREP_DIR)/.unpacked: $(DL_DIR)/$(GNUGREP_SOURCE)
$(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked
(cd $(GNUGREP_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/libfloat.mk b/make/libfloat.mk
new file mode 100644
index 000000000..97e1be1b5
--- /dev/null
+++ b/make/libfloat.mk
@@ -0,0 +1,56 @@
+#############################################################
+#
+# libfloat
+#
+#############################################################
+LIBFLOAT_SOURCE:=libfloat_990616.orig.tar.gz
+LIBFLOAT_PATCH:=libfloat_990616-3.diff.gz
+LIBFLOAT_SITE:=http://ftp.debian.org/debian/pool/main/libf/libfloat
+LIBFLOAT_CAT:=zcat
+LIBFLOAT_DIR:=$(BUILD_DIR)/libfloat
+
+LIBFLOAT_TARGET=
+ifneq ("$(strip $(TARGET_SOFT_FLOAT))","")
+ifeq ("$(strip $(ARCH))","arm")
+LIBFLOAT_TARGET+=$(STAGING_DIR)/lib/libfloat.so
+endif
+endif
+
+$(DL_DIR)/$(LIBFLOAT_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_SOURCE)
+
+$(DL_DIR)/$(LIBFLOAT_PATCH):
+ $(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_PATCH)
+
+libfloat-source: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
+
+$(LIBFLOAT_DIR)/.unpacked: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
+ $(LIBFLOAT_CAT) $(DL_DIR)/$(LIBFLOAT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ # Remove the binary files distributed with the the package.
+ make -C $(LIBFLOAT_DIR) clean
+ $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(DL_DIR) $(LIBFLOAT_PATCH)
+ $(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(SOURCE_DIR) libfloat.patch
+ touch $(LIBFLOAT_DIR)/.unpacked
+
+$(LIBFLOAT_DIR)/libfloat.so.1: $(LIBFLOAT_DIR)/.unpacked \
+ $(STAGING_DIR)/bin/$(ARCH)-linux-gcc
+ $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld -C $(LIBFLOAT_DIR)
+
+$(STAGING_DIR)/lib/libfloat.so: $(LIBFLOAT_DIR)/libfloat.so.1
+ cp -a $(LIBFLOAT_DIR)/libfloat.a $(STAGING_DIR)/lib/libfloat.a
+ cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(STAGING_DIR)/lib/libfloat.so.1
+ (cd $(STAGING_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
+ cp -a $(LIBFLOAT_DIR)/libfloat.a $(TARGET_DIR)/usr/lib/libfloat.a
+ cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(TARGET_DIR)/lib/libfloat.so.1
+ $(STRIP) $(TARGET_DIR)/lib/libfloat.so.1 > /dev/null 2>&1
+ (cd $(TARGET_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
+ (cd $(TARGET_DIR)/usr/lib ; ln -sf /lib/libfloat.so libfloat.so)
+
+libfloat: $(STAGING_DIR)/lib/libfloat.so
+
+libfloat-clean:
+ -$(MAKE) -C $(LIBFLOAT_DIR) clean
+
+libfloat-dirclean:
+ rm -rf $(LIBFLOAT_DIR)
+
diff --git a/make/libtool.mk b/make/libtool.mk
index 308d4338c..59ba780c6 100644
--- a/make/libtool.mk
+++ b/make/libtool.mk
@@ -22,6 +22,7 @@ $(LIBTOOL_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
$(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked
(cd $(LIBTOOL_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
@@ -59,6 +60,7 @@ $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY): $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(LIBTOOL_DIR) install;
+ $(STRIP) $(TARGET_DIR)//usr/lib/libltdl.so.*.*.* > /dev/null 2>&1
perl -pi -e "s,^CC.*,CC=\"/usr/bin/gcc\"," $(TARGET_DIR)/usr/bin/libtool
perl -pi -e "s,^LD.*,LD=\"/usr/bin/ld\"," $(TARGET_DIR)/usr/bin/libtool
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
diff --git a/make/m4.mk b/make/m4.mk
index 1ee543024..5a0988972 100644
--- a/make/m4.mk
+++ b/make/m4.mk
@@ -22,6 +22,7 @@ $(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE)
$(M4_DIR)/.configured: $(M4_DIR)/.unpacked
(cd $(M4_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
@@ -49,6 +50,7 @@ $(TARGET_DIR)/$(M4_TARGET_BINARY): $(M4_DIR)/src/$(M4_BINARY)
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(M4_DIR) install;
+ $(STRIP) $(TARGET_DIR)/$(M4_TARGET_BINARY) > /dev/null 2>&1
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
diff --git a/make/make.mk b/make/make.mk
index 353d4a09c..07edd1ea9 100644
--- a/make/make.mk
+++ b/make/make.mk
@@ -22,6 +22,7 @@ $(GNUMAKE_DIR)/.unpacked: $(DL_DIR)/$(GNUMAKE_SOURCE)
$(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked
(cd $(GNUMAKE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/ncurses.mk b/make/ncurses.mk
index c6cd23c77..d7b917e1c 100644
--- a/make/ncurses.mk
+++ b/make/ncurses.mk
@@ -5,7 +5,7 @@
#
#############################################################
# Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
-# $Id: ncurses.mk,v 1.27 2003/09/03 07:18:14 mjn3 Exp $
+# $Id: ncurses.mk,v 1.28 2003/11/01 05:34:39 mjn3 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
@@ -41,6 +41,7 @@ $(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist
(cd $(NCURSES_DIR); rm -rf config.cache; \
BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/openssh.mk b/make/openssh.mk
index 73a1b0dd6..8f37abd0c 100644
--- a/make/openssh.mk
+++ b/make/openssh.mk
@@ -21,6 +21,7 @@ $(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked
(cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \
$(TARGET_CONFIGURE_OPTS) \
LD=$(TARGET_CROSS)gcc \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/openssl.mk b/make/openssl.mk
index b35bb3135..b5dc56721 100644
--- a/make/openssl.mk
+++ b/make/openssl.mk
@@ -16,6 +16,9 @@ $(DL_DIR)/$(OPENSSL_SOURCE):
$(OPENSSL_DIR)/.unpacked: $(DL_DIR)/$(OPENSSL_SOURCE) $(OPENSSL_PATCH)
gunzip -c $(DL_DIR)/$(OPENSSL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(OPENSSL_PATCH) | patch -p1 -d $(OPENSSL_DIR)
+ # sigh... we have to resort to this just to set a gcc flag.
+ perl -i -p -e 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' \
+ $(OPENSSL_DIR)/Configure
touch $(OPENSSL_DIR)/.unpacked
$(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked
@@ -28,6 +31,9 @@ $(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked
$(OPENSSL_DIR)/apps/openssl: $(OPENSSL_DIR)/Makefile
$(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) all build-shared
+ # Work around openssl build bug to link libssl.so with libcrypto.so.
+ -rm $(OPENSSL_DIR)/libssl.so.*.*.*
+ $(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) do_linux-shared
$(STAGING_DIR)/lib/libcrypto.a: $(OPENSSL_DIR)/apps/openssl
$(MAKE) CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(OPENSSL_DIR) install
@@ -40,24 +46,18 @@ $(STAGING_DIR)/lib/libcrypto.a: $(OPENSSL_DIR)/apps/openssl
(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)
-$(TARGET_DIR)/lib/libcrypto.so.0.9.7: $(STAGING_DIR)/lib/libcrypto.a
- cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/
- cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/
+$(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7: $(STAGING_DIR)/lib/libcrypto.a
+ cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/usr/lib/
+ cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/usr/lib/
#cp -fa $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libssl.so.0.9.7
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7
$(TARGET_DIR)/usr/lib/libssl.a: $(STAGING_DIR)/lib/libcrypto.a
mkdir -p $(TARGET_DIR)/usr/include
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; \
- )
- -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libssl.so.0.9.7
- -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libcrypto.so.0.9.7
touch -c $(TARGET_DIR)/usr/lib/libssl.a
openssl-headers: $(TARGET_DIR)/usr/lib/libssl.a
@@ -71,5 +71,5 @@ openssl-clean:
openssl-dirclean:
rm -rf $(OPENSSL_DIR)
-openssl: uclibc $(TARGET_DIR)/lib/libcrypto.so.0.9.7
+openssl: uclibc $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7
diff --git a/make/patch.mk b/make/patch.mk
index 17fe5176f..dd5383f30 100644
--- a/make/patch.mk
+++ b/make/patch.mk
@@ -22,6 +22,7 @@ $(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE)
$(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked
(cd $(GNUPATCH_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/sed.mk b/make/sed.mk
index f7b3a137b..58f3221c4 100644
--- a/make/sed.mk
+++ b/make/sed.mk
@@ -22,6 +22,7 @@ $(SED_DIR)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
$(SED_DIR)/.configured: $(SED_DIR)/.unpacked
(cd $(SED_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/strace.mk b/make/strace.mk
index ef026d78c..f4be954c5 100644
--- a/make/strace.mk
+++ b/make/strace.mk
@@ -23,6 +23,7 @@ $(STRACE_DIR)/.unpacked: $(DL_DIR)/$(STRACE_SOURCE)
$(STRACE_DIR)/.configured: $(STRACE_DIR)/.unpacked
(cd $(STRACE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
@@ -46,6 +47,7 @@ $(STRACE_DIR)/strace: $(STRACE_DIR)/.configured
$(TARGET_DIR)/usr/bin/strace: $(STRACE_DIR)/strace
install -c $(STRACE_DIR)/strace $(TARGET_DIR)/usr/bin/strace
+ $(STRIP) $(TARGET_DIR)/usr/bin/strace > /dev/null 2>&1
strace: uclibc $(TARGET_DIR)/usr/bin/strace
diff --git a/make/tar.mk b/make/tar.mk
index 0e1ea04eb..5e61a6b66 100644
--- a/make/tar.mk
+++ b/make/tar.mk
@@ -22,6 +22,7 @@ $(GNUTAR_DIR)/.unpacked: $(DL_DIR)/$(GNUTAR_SOURCE)
$(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
(cd $(GNUTAR_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
diff --git a/make/tinylogin.mk b/make/tinylogin.mk
index 03a560285..d24987712 100644
--- a/make/tinylogin.mk
+++ b/make/tinylogin.mk
@@ -33,10 +33,11 @@ $(TINYLOGIN_DIR)/Config.h: $(DL_DIR)/$(TINYLOGIN_SOURCE)
touch $(TINYLOGIN_DIR)/Config.h
$(TINYLOGIN_DIR)/tinylogin: $(TINYLOGIN_DIR)/Config.h
- $(MAKE) CROSS="$(TARGET_CROSS)" -C $(TINYLOGIN_DIR)
+ $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(TINYLOGIN_DIR)
$(TARGET_DIR)/bin/tinylogin: $(TINYLOGIN_DIR)/tinylogin
- $(MAKE) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" -C $(TINYLOGIN_DIR) install
+ $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" \
+ PREFIX="$(TARGET_DIR)" -C $(TINYLOGIN_DIR) install
tinylogin: uclibc $(TARGET_DIR)/bin/tinylogin
diff --git a/make/uclibc.mk b/make/uclibc.mk
index db111ce75..e6ab1652a 100644
--- a/make/uclibc.mk
+++ b/make/uclibc.mk
@@ -44,10 +44,14 @@ endif
perl -i -p -e 's,^SHARED_LIB_LOADER_PATH=.*,SHARED_LIB_LOADER_PATH=\"/lib\",g' \
$(UCLIBC_DIR)/.config
perl -i -p -e 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y\nUCLIBC_HAS_LOCALE=n,g' \
- $(UCLIBC_DIR)/.config
- perl -i -p -e 's,^GCC_BIN.*,GCC_BIN=$(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc,g' \
+ $(UCLIBC_DIR)/.conf
+ if [ -n "$(strip $(TARGET_SOFT_FLOAT))" ] ; then \
+ perl -i -p -e 's,.*HAS_FPU.*,# HAS_FPU is not set\nUCLIBC_HAS_SOFT_FLOAT=y,g' \
+ $(UCLIBC_DIR)/.config; \
+ fi
+ perl -i -p -e 's,^GCC_BIN.*,GCC_BIN=$(STAGING_DIR)/bin/$(ARCH)-linux-gcc,g' \
$(UCLIBC_DIR)/extra/gcc-uClibc/Makefile
- perl -i -p -e 's,^LD_BIN.*,LD_BIN=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ld,g' \
+ perl -i -p -e 's,^LD_BIN.*,LD_BIN=$(STAGING_DIR)/bin/$(ARCH)-linux-ld,g' \
$(UCLIBC_DIR)/extra/gcc-uClibc/Makefile
$(MAKE) -C $(UCLIBC_DIR) oldconfig
$(MAKE) -C $(UCLIBC_DIR) pregen
@@ -55,7 +59,7 @@ endif
$(MAKE) -C $(UCLIBC_DIR) install_dev;
touch $(UCLIBC_DIR)/.configured
-$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured
+$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET)
$(MAKE) -C $(UCLIBC_DIR)
$(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
@@ -77,7 +81,7 @@ endif
uclibc-configured: $(UCLIBC_DIR)/.configured
-uclibc: $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc $(STAGING_DIR)/lib/libc.a \
+uclibc: $(STAGING_DIR)/bin/$(ARCH)-linux-gcc $(STAGING_DIR)/lib/libc.a \
$(UCLIBC_TARGETS)
uclibc-clean:
@@ -112,6 +116,18 @@ $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/lib/libc.a
ln -fs /lib/libm.so.0 libm.so; \
ln -fs /lib/libpthread.so.0 libpthread.so; \
ln -fs /lib/libnsl.so.0 libnsl.so; \
+ \
+ ln -fs /lib/libthread_db.so.1 libthread_db.so; \
+ rm -f ld-uClibc-0.9.21.so; \
+ rm -f libcrypt-0.9.21.so; \
+ rm -f libdl-0.9.21.so; \
+ rm -f libm-0.9.21.so; \
+ rm -f libnsl-0.9.21.so; \
+ rm -f libpthread-0.9.21.so; \
+ rm -f libresolv-0.9.21.so; \
+ rm -f libuClibc-0.9.21.so; \
+ rm -f libutil-0.9.21.so; \
+ rm -f libthread_db-0.9.21.so; \
)
ifeq ($(USE_UCLIBC_TOOLCHAIN),true)
diff --git a/make/zlib.mk b/make/zlib.mk
index 7a23fb63e..901723e02 100644
--- a/make/zlib.mk
+++ b/make/zlib.mk
@@ -6,12 +6,10 @@
ZLIB_SOURCE=zlib-1.1.4.tar.bz2
ZLIB_SITE=http://aleron.dl.sourceforge.net/sourceforge/libpng
ZLIB_DIR=$(BUILD_DIR)/zlib-1.1.4
+ZLIB_CFLAGS= $(TARGET_CFLAGS) -fPIC
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
-ZLIB_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-else
-ZLIB_CFLAGS=-Os -g
+ZLIB_CFLAGS+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
endif
-ZLIB_CFLAGS+=-fPIC
$(DL_DIR)/$(ZLIB_SOURCE):
$(WGET) -P $(DL_DIR) $(ZLIB_SITE)/$(ZLIB_SOURCE)
diff --git a/sources/dropbear-010-ranlib.patch b/sources/dropbear-010-ranlib.patch
new file mode 100644
index 000000000..7aa8d44bd
--- /dev/null
+++ b/sources/dropbear-010-ranlib.patch
@@ -0,0 +1,24 @@
+diff -urN dropbear-0.38/libtomcrypt/makefile dropbear-0.38-new/libtomcrypt/makefile
+--- dropbear-0.38/libtomcrypt/makefile 2003-09-24 05:22:44.000000000 -0500
++++ dropbear-0.38-new/libtomcrypt/makefile 2003-10-29 23:39:57.000000000 -0600
+@@ -103,7 +103,7 @@
+
+ $(LIBNAME): $(OBJECTS)
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+- ranlib $(LIBNAME)
++ $(RANLIB) $(LIBNAME)
+
+ #This rule makes the test program included with libtomcrypt
+ test: library $(TESTOBJECTS)
+diff -urN dropbear-0.38/libtommath/makefile dropbear-0.38-new/libtommath/makefile
+--- dropbear-0.38/libtommath/makefile 2003-09-24 03:55:34.000000000 -0500
++++ dropbear-0.38-new/libtommath/makefile 2003-10-29 23:40:18.000000000 -0600
+@@ -48,7 +48,7 @@
+
+ libtommath.a: $(OBJECTS)
+ $(AR) $(ARFLAGS) libtommath.a $(OBJECTS)
+- ranlib libtommath.a
++ $(RANLIB) libtommath.a
+
+ install: libtommath.a
+ install -d -g root -o root $(DESTDIR)$(LIBPATH)
diff --git a/sources/gcc-830-nonhidden.patch b/sources/gcc-830-nonhidden.patch
new file mode 100644
index 000000000..649a3dc94
--- /dev/null
+++ b/sources/gcc-830-nonhidden.patch
@@ -0,0 +1,14 @@
+diff -urN gcc-3.3.2-orig/gcc/mklibgcc.in gcc-3.3.2/gcc/mklibgcc.in
+--- gcc-3.3.2-orig/gcc/mklibgcc.in 2003-09-08 19:37:34.000000000 -0500
++++ gcc-3.3.2/gcc/mklibgcc.in 2003-10-22 02:27:34.000000000 -0500
+@@ -296,7 +296,9 @@
+
+ libgcc_a_objs="$libgcc_objs $libgcc_st_objs"
+
+- if [ "@libgcc_visibility@" = yes -a "$SHLIB_LINK" ]; then
++ #if [ "@libgcc_visibility@" = yes -a "$SHLIB_LINK" ]; then
++ if [ "@libgcc_visibility@" = I_AM_DISABLED -a "$SHLIB_LINK" ]; then
++ echo "OUCH!!!!! : @libgcc_visibility@ : $SHLIB_LINK : OUCH!!!!!"
+ libgcc_a_objs=
+ echo ""
+ for o in $libgcc_objs $libgcc_st_objs; do
diff --git a/sources/gcc-840-abi_check.patch b/sources/gcc-840-abi_check.patch
new file mode 100644
index 000000000..e4dfd9aa2
--- /dev/null
+++ b/sources/gcc-840-abi_check.patch
@@ -0,0 +1,14 @@
+--- gcc-3.3.2/libstdc++-v3/testsuite/Makefile.in.dist 2003-10-26 00:07:43.000000000 -0500
++++ gcc-3.3.2/libstdc++-v3/testsuite/Makefile.in 2003-10-26 00:06:35.000000000 -0500
+@@ -204,9 +204,9 @@
+ PROGRAMS = $(noinst_PROGRAMS)
+
+ abi_check_OBJECTS = abi_check.$(OBJEXT)
+-abi_check_LDADD = $(LDADD)
++abi_check_LDADD = -lstdc++ $(LDADD)
+ abi_check_DEPENDENCIES =
+-abi_check_LDFLAGS =
++abi_check_LDFLAGS = -L../src
+ CXXFLAGS = @CXXFLAGS@
+ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+ LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
diff --git a/sources/i386-gcc-soft-float.patch b/sources/i386-gcc-soft-float.patch
new file mode 100644
index 000000000..805d9bf3e
--- /dev/null
+++ b/sources/i386-gcc-soft-float.patch
@@ -0,0 +1,61 @@
+diff -urN gcc-3.3.2-orig/gcc/config/i386/i386.h gcc-3.3.2/gcc/config/i386/i386.h
+--- gcc-3.3.2-orig/gcc/config/i386/i386.h 2003-06-25 16:18:31.000000000 -0500
++++ gcc-3.3.2/gcc/config/i386/i386.h 2003-10-22 01:46:57.000000000 -0500
+@@ -653,6 +653,7 @@
+ /* Define for XFmode or TFmode extended real floating point support.
+ The XFmode is specified by i386 ABI, while TFmode may be faster
+ due to alignment and simplifications in the address calculations. */
++#if 0
+ #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96)
+ #define MAX_LONG_DOUBLE_TYPE_SIZE 128
+ #ifdef __x86_64__
+@@ -660,6 +661,17 @@
+ #else
+ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96
+ #endif
++#else
++ /* Set up for x86 soft float with 64-bit long doubles, since that's
++ * all the soft float emulation supports. */
++#define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : (TARGET_80387 ? 96 : 64))
++#define MAX_LONG_DOUBLE_TYPE_SIZE 128
++#ifdef __x86_64__
++#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
++#else
++#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 96 : 64)
++#endif
++#endif
+
+ /* Set the value of FLT_EVAL_METHOD in float.h. When using only the
+ FPU, assume that the fpcw is set to extended precision; when using
+diff -urN gcc-3.3.2-orig/gcc/config/t-linux gcc-3.3.2/gcc/config/t-linux
+--- gcc-3.3.2-orig/gcc/config/t-linux 2003-06-04 11:56:11.000000000 -0500
++++ gcc-3.3.2/gcc/config/t-linux 2003-10-22 01:46:39.000000000 -0500
+@@ -14,3 +14,28 @@
+ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
++
++##############################################
++# We want fine grained libraries, so use the new code to build the
++# floating point emulation libraries.
++FPBIT = fp-bit.c
++DPBIT = dp-bit.c
++
++#LIB2FUNCS_EXTRA = xp-bit.c
++
++dp-bit.c: $(srcdir)/config/fp-bit.c
++ echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
++ echo '#endif' >> dp-bit.c
++ cat $(srcdir)/config/fp-bit.c >> dp-bit.c
++
++fp-bit.c: $(srcdir)/config/fp-bit.c
++ echo '#define FLOAT' > fp-bit.c
++ echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
++ echo '#endif' >> fp-bit.c
++ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
++
++#MULTILIB_OPTIONS = msoft-float
++#MULTILIB_DIRNAMES = soft-float
++
diff --git a/sources/libfloat.patch b/sources/libfloat.patch
new file mode 100644
index 000000000..dc9e4ea52
--- /dev/null
+++ b/sources/libfloat.patch
@@ -0,0 +1,44 @@
+diff -urN libfloat-dist/Makefile libfloat/Makefile
+--- libfloat-dist/Makefile 2003-10-26 00:33:45.000000000 -0500
++++ libfloat/Makefile 2003-10-26 01:07:26.000000000 -0500
+@@ -1,7 +1,6 @@
+ # Makefile for the Linux soft-float library
+
+-CC=gcc -O2 -freg-struct-return -fomit-frame-pointer -D__LIBFLOAT__
+-#CC=gcc -g -O2 -freg-struct-return -D__LIBFLOAT__
++CFLAGS= -O2 -freg-struct-return -fomit-frame-pointer -D__LIBFLOAT__
+ AR=ar
+
+ all: libfloat.a libfloat.so.1
+@@ -12,24 +11,24 @@
+
+ libfloat.so.1: softfloat.os fplib_glue.os
+ rm -f libfloat.so.1
+- gcc -shared -Wl,-soname,libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1
++ $(LD) -shared -soname=libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1
+
+ softfloat.o: softfloat/bits64/softfloat.c
+- $(CC) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
++ $(CC) $(CFLAGS) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
+
+ fplib_glue.o: fplib_glue.S
+- $(CC) -c -o fplib_glue.o fplib_glue.S
++ $(CC) $(CFLAGS) -c -o fplib_glue.o fplib_glue.S
+
+ softfloat.os: softfloat/bits64/softfloat.c
+- $(CC) -fpic -c -o softfloat.os -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
++ $(CC) $(CFLAGS) -fpic -c -o softfloat.os -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
+
+ fplib_glue.os: fplib_glue.S
+- $(CC) -fpic -c -o fplib_glue.os fplib_glue.S
++ $(CC) $(CFLAGS) -fpic -c -o fplib_glue.os fplib_glue.S
+
+ install: libfloat.a libfloat.so.1
+ cp -a libfloat.a $(DESTDIR)/usr/lib
+- cp -a libfloat.so.1 $(DESTDIR)/usr/lib
+- cd $(DESTDIR)/usr/lib; ln -s libfloat.so.1 libfloat.so
++ cp -a libfloat.so.1 $(DESTDIR)/lib
++ cd $(DESTDIR)/lib; ln -s libfloat.so.1 libfloat.so
+ #ldconfig
+
+ clean: