summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-09-03 00:49:43 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-09-03 00:49:43 +0000
commit3ad3d8a1d8c25bab9937e2d9e08ccdbb0b042543 (patch)
tree56c0b25562b460f75a4191b826be6690a8015db9 /make
parente694138b173d963ab0348f652e3882db97e2d296 (diff)
Update to what I'm currently using. Lots of changes...
1) Allow selection of binutils/gcc/gdb/kernel headers to build, although some of the older tool patches probably need updating. 2) Rework gdb build so that remote debugging now works with gdbserver. 3) Misc. other package updates.3) Misc. other package updates.3) Misc. other package updates.
Diffstat (limited to 'make')
-rw-r--r--make/autoconf.mk4
-rw-r--r--make/automake.mk4
-rw-r--r--make/bash.mk1
-rw-r--r--make/binutils-uclibc.mk26
-rw-r--r--make/busybox.mk8
-rw-r--r--make/ccache.mk32
-rw-r--r--make/ext2root.mk2
-rw-r--r--make/gcc-uclibc-2.95.mk35
-rw-r--r--make/gcc-uclibc-3.x.mk (renamed from make/gcc-uclibc-3.3.mk)109
-rw-r--r--make/gdb.mk189
-rw-r--r--make/gdbserver.mk53
-rw-r--r--make/kernel-headers.mk44
-rw-r--r--make/libtool.mk6
-rw-r--r--make/linux.mk8
-rw-r--r--make/ltrace.mk6
-rw-r--r--make/ncurses.mk3
-rw-r--r--make/sed.mk4
-rw-r--r--make/strace.mk6
-rw-r--r--make/uclibc.mk60
-rw-r--r--make/util-linux.mk2
20 files changed, 345 insertions, 257 deletions
diff --git a/make/autoconf.mk b/make/autoconf.mk
index 8343160ae..4b39ebf9b 100644
--- a/make/autoconf.mk
+++ b/make/autoconf.mk
@@ -3,10 +3,10 @@
# autoconf
#
#############################################################
-AUTOCONF_SOURCE:=autoconf-2.57.tar.bz2
+AUTOCONF_SOURCE:=autoconf-2.59.tar.bz2
AUTOCONF_SITE:=ftp://ftp.gnu.org/gnu/autoconf
AUTOCONF_CAT:=bzcat
-AUTOCONF_DIR:=$(BUILD_DIR)/autoconf-2.57
+AUTOCONF_DIR:=$(BUILD_DIR)/autoconf-2.59
AUTOCONF_BINARY:=autoconf
AUTOCONF_TARGET_BINARY:=usr/bin/autoconf
diff --git a/make/automake.mk b/make/automake.mk
index 6ac66003a..31abb805b 100644
--- a/make/automake.mk
+++ b/make/automake.mk
@@ -3,10 +3,10 @@
# automake
#
#############################################################
-AUTOMAKE_SOURCE:=automake-1.6.3.tar.bz2
+AUTOMAKE_SOURCE:=automake-1.9.tar.bz2
AUTOMAKE_SITE:=ftp://ftp.gnu.org/gnu/automake
AUTOMAKE_CAT:=bzcat
-AUTOMAKE_DIR:=$(BUILD_DIR)/automake-1.6.3
+AUTOMAKE_DIR:=$(BUILD_DIR)/automake-1.9
AUTOMAKE_BINARY:=automake
AUTOMAKE_TARGET_BINARY:=usr/bin/automake
diff --git a/make/bash.mk b/make/bash.mk
index 26c408fc9..855c0fbe0 100644
--- a/make/bash.mk
+++ b/make/bash.mk
@@ -46,6 +46,7 @@ $(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
$(DISABLE_LARGEFILE) \
--with-curses \
--enable-alias \
+ --without-bash-malloc \
);
touch $(BASH_DIR)/.configured
diff --git a/make/binutils-uclibc.mk b/make/binutils-uclibc.mk
index 0f3296497..8ed94d6f3 100644
--- a/make/binutils-uclibc.mk
+++ b/make/binutils-uclibc.mk
@@ -3,25 +3,37 @@
# build binutils for use on the host system
#
#############################################################
+BINUTILS_VERSION:=$(strip $(BINUTILS_VERSION))
+
BINUTILS_SITE:=http://ftp.kernel.org/pub/linux/devel/binutils
-BINUTILS_SOURCE:=binutils-2.14.90.0.6.tar.bz2
-BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.14.90.0.6
+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-build
+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)
- mkdir -p $(DL_DIR)
$(BINUTILS_CAT) $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(BINUTILS_DIR)/.unpacked
$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
- # Apply any files named binutils-*.patch from the source directory to binutils
- $(SOURCE_DIR)/patch-kernel.sh $(BINUTILS_DIR) $(SOURCE_DIR) binutils-uclibc*.patch
+ # 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
@@ -77,7 +89,7 @@ binutils-dirclean:
# build binutils for use on the target system
#
#############################################################
-BINUTILS_DIR2:=$(BUILD_DIR)/binutils-target
+BINUTILS_DIR2:=$(BUILD_DIR)/binutils-$(BINUTILS_VERSION)-target
$(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(BINUTILS_DIR2)
(cd $(BINUTILS_DIR2); \
diff --git a/make/busybox.mk b/make/busybox.mk
index 4ad737ccd..b6cd287fc 100644
--- a/make/busybox.mk
+++ b/make/busybox.mk
@@ -4,14 +4,14 @@
#
#############################################################
-ifeq ($(USE_BUSYBOX_SNAPSHOT),true)
+ifneq ($(strip $(USE_BUSYBOX_SNAPSHOT)),)
# Be aware that this changes daily....
BUSYBOX_DIR:=$(BUILD_DIR)/busybox
-BUSYBOX_SOURCE:=busybox-snapshot.tar.bz2
+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-pre8
-BUSYBOX_SOURCE:=busybox-1.00-pre8.tar.bz2
+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
diff --git a/make/ccache.mk b/make/ccache.mk
index f495be954..eea70017f 100644
--- a/make/ccache.mk
+++ b/make/ccache.mk
@@ -19,8 +19,11 @@ $(CCACHE_DIR1)/.unpacked: $(DL_DIR)/$(CCACHE_SOURCE)
touch $(CCACHE_DIR1)/.unpacked
$(CCACHE_DIR1)/.patched: $(CCACHE_DIR1)/.unpacked
- $(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/usr/bin\",g" \
+ # 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
@@ -43,14 +46,16 @@ $(CCACHE_DIR1)/$(CCACHE_BINARY): $(CCACHE_DIR1)/.configured
$(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY)
mkdir -p $(STAGING_DIR)/usr/bin;
- mkdir -p $(TOOL_BUILD_DIR)/.ccache;
cp $(CCACHE_DIR1)/ccache $(STAGING_DIR)/usr/bin
- (cd $(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 $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-gcc; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-cc; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-uclibc-cc);
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc ] && \
- mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(STAGING_DIR)/usr/bin/
+ mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(STAGING_DIR)/bin-ccache/
(cd $(STAGING_DIR)/bin; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-cc; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-gcc; \
@@ -58,9 +63,9 @@ $(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY)
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc);
ifeq ($(INSTALL_LIBSTDCPP),true)
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ ] && \
- mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ $(STAGING_DIR)/usr/bin/
+ mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ $(STAGING_DIR)/bin-ccache/
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ ] && \
- mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ $(STAGING_DIR)/usr/bin/
+ mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ $(STAGING_DIR)/bin-ccache/
(cd $(STAGING_DIR)/bin; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-c++; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-g++;\
@@ -68,11 +73,7 @@ ifeq ($(INSTALL_LIBSTDCPP),true)
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-g++);
endif
-ifeq ($(GCC_2_95_TOOLCHAIN),true)
-ccache: gcc2_95 $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
-else
-ccache: gcc3_3 $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
-endif
+ccache: gcc $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
ccache-clean:
$(MAKE) -C $(CCACHE_DIR1) uninstall
@@ -128,12 +129,11 @@ $(TARGET_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR2)/$(CCACHE_BINARY)
$(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)/usr/bin; ln -fs gcc cc)
(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++;)
+ 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)
diff --git a/make/ext2root.mk b/make/ext2root.mk
index 84e14b48f..ff2877145 100644
--- a/make/ext2root.mk
+++ b/make/ext2root.mk
@@ -34,7 +34,7 @@ genext2fs: $(GENEXT2_DIR)/genext2fs
# How much KB we want to add to the calculated size for slack space
GENEXT2_REALSIZE=$(subst total,, $(shell LANG=C du $(TARGET_DIR) -s -c -k | grep total ))
GENEXT2_ADDTOROOTSIZE=$(shell if [ $(GENEXT2_REALSIZE) -ge 20000 ] ; then echo 16384; else echo 16; fi)
-GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE))
+GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE) + 200)
# We currently add about 400 device nodes, so add that into the total
GENEXT2_INODES=$(shell expr $(shell find $(TARGET_DIR) | wc -l) + 400)
#GENEXT2_SIZE=100000
diff --git a/make/gcc-uclibc-2.95.mk b/make/gcc-uclibc-2.95.mk
index 9294b53f7..ddbf118e9 100644
--- a/make/gcc-uclibc-2.95.mk
+++ b/make/gcc-uclibc-2.95.mk
@@ -17,7 +17,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-ifeq ($(GCC_2_95_TOOLCHAIN),true)
+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
@@ -48,20 +49,20 @@ endif
# build the first pass gcc compiler
#
#############################################################
-GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc2_95-initial
+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) gcc2.95-mega.patch.bz2
- $(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) gcc2.95-uclibc-conf.patch
- #$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) gcc-uclibc2_95*.patch
+ $(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...
@@ -107,13 +108,13 @@ $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled
#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
-gcc2_95_initial: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
+gcc_initial: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
-gcc2_95_initial-clean:
+gcc_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-gcc2_95_initial-dirclean:
+gcc_initial-dirclean:
rm -rf $(GCC_BUILD_DIR1)
#############################################################
@@ -156,7 +157,7 @@ stlport-dirclean:
# the newly built shared uClibc library.
#
#############################################################
-GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc2_95-final
+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)
@@ -200,16 +201,16 @@ endif
);
touch $(GCC_BUILD_DIR2)/.installed
-gcc2_95: uclibc-configured binutils gcc2_95_initial $(LIBFLOAT_TARGET) uclibc \
+gcc: uclibc-configured binutils gcc_initial $(LIBFLOAT_TARGET) uclibc \
$(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS) $(STLPORT_TARGET)
-gcc2_95-source: $(DL_DIR)/$(GCC_SOURCE)
+gcc-source: $(DL_DIR)/$(GCC_SOURCE)
-gcc2_95-clean:
+gcc-clean:
rm -rf $(GCC_BUILD_DIR2)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-gcc2_95-dirclean:
+gcc-dirclean:
rm -rf $(GCC_BUILD_DIR2)
#############################################################
@@ -217,7 +218,7 @@ gcc2_95-dirclean:
# Next build target gcc compiler
#
#############################################################
-GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc2_95-target
+GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target
$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR2)/.installed
mkdir -p $(GCC_BUILD_DIR3)
@@ -264,13 +265,13 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
#rm -rf $(TARGET_DIR)/usr/lib/libgcc_s.so*
#touch -c $(TARGET_DIR)/usr/bin/gcc
-gcc2_95_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc
+gcc_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc
-gcc2_95_target-clean:
+gcc_target-clean:
rm -rf $(GCC_BUILD_DIR3)
rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-gcc2_95_target-dirclean:
+gcc_target-dirclean:
rm -rf $(GCC_BUILD_DIR3)
endif
diff --git a/make/gcc-uclibc-3.3.mk b/make/gcc-uclibc-3.x.mk
index d39eed590..a4760dbdf 100644
--- a/make/gcc-uclibc-3.3.mk
+++ b/make/gcc-uclibc-3.x.mk
@@ -17,12 +17,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-ifneq ($(GCC_2_95_TOOLCHAIN),true)
+ifneq ($(findstring 2.95,$(GCC_VERSION)),2.95)
+GCC_VERSION:=$(strip $(GCC_VERSION))
-# Shiny new stuff...
-GCC_VERSION:=3.3.4
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)
+#GCC_SITE:=http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(GCC_VERSION)
#
# snapshots....
@@ -55,31 +54,44 @@ endif
# build the first pass gcc compiler
#
#############################################################
-GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-3.3-initial
+GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-initial
$(DL_DIR)/$(GCC_SOURCE):
+ echo GCC_SOURCE is $(GCC_SOURCE)
+ /bin/false
+ 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-uclibc-3.3*.patch
+ $(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))","i386")
- $(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) i386-gcc-soft-float.patch
+ifeq ("$(strip $(ARCH))","arm")
+ $(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)
- -mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include
(cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=$(STAGING_DIR) \
@@ -88,7 +100,6 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=c \
--disable-shared \
- --includedir=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include \
--with-sysroot=$(TOOL_BUILD_DIR)/uClibc_dev/ \
--disable-__cxa_atexit \
--enable-target-optspace \
@@ -96,6 +107,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
$(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
@@ -108,13 +120,13 @@ $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled
#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: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
+gcc_initial: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
-gcc3_3_initial-clean:
+gcc_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-gcc3_3_initial-dirclean:
+gcc_initial-dirclean:
rm -rf $(GCC_BUILD_DIR1)
#############################################################
@@ -123,11 +135,18 @@ gcc3_3_initial-dirclean:
# the newly built shared uClibc library.
#
#############################################################
-GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-3.3-final
-$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
+#
+# 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
+ ln -sf ../include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
(cd $(GCC_BUILD_DIR2); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=$(STAGING_DIR) \
@@ -136,13 +155,13 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/$(REAL_GNU_TAR
--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) \
+ $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
$(GCC_USE_SJLJ_EXCEPTIONS) \
$(EXTRA_GCC_CONFIG_OPTIONS));
touch $(GCC_BUILD_DIR2)/.configured
@@ -167,15 +186,6 @@ endif
$(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \
done; \
);
-ifeq ($(SOFT_FLOAT),true)
- # Replace specs file with one that defaults to soft float mode.
- if [ ! -f $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \
- echo staging dir specs file is missing ; \
- /bin/false ; \
- fi;
- cp $(SOURCE_DIR)/specs-$(ARCH)-soft-float \
- $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
-endif
touch $(GCC_BUILD_DIR2)/.installed
$(TARGET_DIR)/lib/libgcc_s.so.1: $(GCC_BUILD_DIR2)/.installed
@@ -184,16 +194,16 @@ $(TARGET_DIR)/lib/libgcc_s.so.1: $(GCC_BUILD_DIR2)/.installed
-$(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/
-gcc3_3: uclibc-configured binutils gcc3_3_initial $(LIBFLOAT_TARGET) uclibc \
+gcc: uclibc-configured binutils gcc_initial $(LIBFLOAT_TARGET) uclibc \
$(TARGET_DIR)/lib/libgcc_s.so.1 $(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS)
-gcc3_3-source: $(DL_DIR)/$(GCC_SOURCE)
+gcc-source: $(DL_DIR)/$(GCC_SOURCE)
-gcc3_3-clean:
+gcc-clean:
rm -rf $(GCC_BUILD_DIR2)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-gcc3_3-dirclean:
+gcc-dirclean:
rm -rf $(GCC_BUILD_DIR2)
#############################################################
@@ -201,7 +211,7 @@ gcc3_3-dirclean:
# Next build target gcc compiler
#
#############################################################
-GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-3.3-target
+GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target
$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR2)/.installed
mkdir -p $(GCC_BUILD_DIR3)
@@ -220,6 +230,7 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR2)/.installed
$(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
@@ -229,25 +240,23 @@ $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
$(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
-ifeq ($(SOFT_FLOAT),true)
- # Replace specs file with one that defaults to soft float mode.
- if [ ! -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \
- echo target dir specs file is missing ; \
- /bin/false ; \
- fi;
- cp $(SOURCE_DIR)/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
-else
# Remove broken specs file (cross compile flag is set).
- rm -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
-endif
+ rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/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/$(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)
#
@@ -255,18 +264,22 @@ endif
#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/
+ @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
-gcc3_3_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc
+gcc_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc
-gcc3_3_target-clean:
+gcc_target-clean:
rm -rf $(GCC_BUILD_DIR3)
rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-gcc3_3_target-dirclean:
+gcc_target-dirclean:
rm -rf $(GCC_BUILD_DIR3)
endif
diff --git a/make/gdb.mk b/make/gdb.mk
index 59a08be3d..4030ede7f 100644
--- a/make/gdb.mk
+++ b/make/gdb.mk
@@ -1,42 +1,112 @@
-#############################################################
+######################################################################
#
# gdb
#
-#############################################################
+######################################################################
+GDB_VERSION:=$(strip $(GDB_VERSION))
-GDB_SITE:=ftp://ftp.gnu.org/gnu/gdb/
-GDB_DIR:=$(BUILD_DIR)/gdb-5.3
-GDB_SOURCE:=gdb-5.3.tar.gz
-GDB_PATCH:=$(SOURCE_DIR)/gdb.patch
-GDB_UCLIBC_PATCH:=$(SOURCE_DIR)/gdb-5.3-uclibc.patch
+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_PATCH)
- gunzip -c $(DL_DIR)/$(GDB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- cat $(GDB_PATCH) | patch -p1 -d $(GDB_DIR)
- cat $(GDB_UCLIBC_PATCH) | patch -p1 -d $(GDB_DIR)
- touch $(GDB_DIR)/.unpacked
-
-$(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
+$(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/
- (cd $(GDB_DIR); rm -rf config.cache; \
+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); \
$(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS)" \
- 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 \
- ./configure \
+ 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_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 \
@@ -51,30 +121,65 @@ $(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
$(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_DIR)/.configured
+ touch $(GDB_SERVER_DIR)/.configured
-$(GDB_DIR)/gdb/gdb: $(GDB_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(GDB_DIR)
- $(STRIP) $(GDB_DIR)/gdb/gdb
+$(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/gdb: $(GDB_DIR)/gdb/gdb
- install -c $(GDB_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb
- rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
- $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+$(TARGET_DIR)/usr/bin/gdbserver: $(GDB_SERVER_DIR)/gdbserver
+ install -c $(GDB_SERVER_DIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver
-gdb: $(TARGET_DIR)/usr/bin/gdb
+gdbserver: $(TARGET_DIR)/usr/bin/gdbserver
-gdb-source: $(DL_DIR)/$(GDB_SOURCE)
+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_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 \
+ );
+ 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/$(OPTIMIZE_FOR_CPU)-linux-uclibc-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)
-gdb-clean:
- $(MAKE) -C $(GDB_DIR) clean
-gdb-dirclean:
- rm -rf $(GDB_DIR)
diff --git a/make/gdbserver.mk b/make/gdbserver.mk
deleted file mode 100644
index 1ab44a236..000000000
--- a/make/gdbserver.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-#############################################################
-#
-# gdbserver
-#
-#############################################################
-
-#Use GDB_DIR/etc values from gdb.mk
-#Build gdbserver in a dir outside of the main gdb tree
-GDB_WDIR:=$(BUILD_DIR)/gdbserver
-
-
-$(GDB_WDIR)/.configured: $(GDB_DIR)/.unpacked
- mkdir -p $(GDB_WDIR)
- (cd $(GDB_WDIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(GDB_DIR)/gdb/gdbserver/configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(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_WDIR)/.configured
-
-$(GDB_WDIR)/gdbserver: $(GDB_WDIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(GDB_WDIR)
- $(STRIP) $(GDB_WDIR)/gdbserver
-
-$(TARGET_DIR)/usr/bin/gdbserver: $(GDB_WDIR)/gdbserver
- install -c $(GDB_WDIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver
- rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
- $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
-
-gdbserver: $(TARGET_DIR)/usr/bin/gdbserver
-
-gdbserver-clean:
- $(MAKE) -C $(GDB_WDIR) clean
-
-gdbserver-dirclean:
- rm -rf $(GDB_WDIR)
-
diff --git a/make/kernel-headers.mk b/make/kernel-headers.mk
index c7b5a39e6..921b08cf9 100644
--- a/make/kernel-headers.mk
+++ b/make/kernel-headers.mk
@@ -7,28 +7,44 @@
#
#############################################################
ifneq ($(filter $(TARGETS),kernel-headers),)
+DEFAULT_KERNEL_HEADERS:=$(strip $(DEFAULT_KERNEL_HEADERS))
-VERSION=2
-PATCHLEVEL=4
-SUBLEVEL=25
+LINUX_SITE:=127.0.0.1
+LINUX_SOURCE:=unspecified-kernel-headers
+
+ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.4.25")
+VERSION:=2
+PATCHLEVEL:=4
+SUBLEVEL:=25
LINUX_SITE:=http://www.uclibc.org/downloads/toolchain
LINUX_SOURCE:=kernel-headers-2.4.25.tar.bz2
LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux
+endif
+ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.6.7")
+VERSION:=2
+PATCHLEVEL:=6
+SUBLEVEL:=7
+LINUX_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
+LINUX_SOURCE:=linux-libc-headers-2.6.7.0.tar.bz2
+LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.7.0
+endif
-# Uncomment this for 2.6.x kernel header files
-#VERSION=2
-#PATCHLEVEL=6
-#SUBLEVEL=8
-#LINUX_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
-#LINUX_SOURCE:=linux-libc-headers-2.6.8.0.tar.bz2
-#LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.8.0
-
+ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.6.8")
+VERSION:=2
+PATCHLEVEL:=6
+SUBLEVEL:=8
+LINUX_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
+LINUX_SOURCE:=linux-libc-headers-2.6.8.0.tar.bz2
+LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.8.0
+endif
+LINUX_VERSION:=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
LINUX_DIR:=$(TOOL_BUILD_DIR)/linux
$(DL_DIR)/$(LINUX_SOURCE):
+ mkdir -p $(DL_DIR)
$(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
@@ -39,7 +55,11 @@ ifneq ($(LINUX_UNPACK_DIR),$(LINUX_DIR))
endif
touch $(LINUX_DIR)/.unpacked
-$(LINUX_DIR)/.configured: $(LINUX_DIR)/.unpacked
+$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
+ $(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR) $(SOURCE_DIR) linux-libc-headers-$(LINUX_VERSION)-*.patch
+ touch $(LINUX_DIR)/.patched
+
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
rm -f $(LINUX_DIR)/include/asm
@if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
echo -e "VERSION = $(VERSION)\nPATCHLEVEL = $(PATCHLEVEL)\n" > \
diff --git a/make/libtool.mk b/make/libtool.mk
index fbe1fb663..fbee18e74 100644
--- a/make/libtool.mk
+++ b/make/libtool.mk
@@ -3,10 +3,10 @@
# libtool
#
#############################################################
-LIBTOOL_SOURCE:=libtool_1.4.3.orig.tar.gz
-LIBTOOL_SITE:=http://ftp.debian.org/debian/pool/main/libt/libtool
+LIBTOOL_SOURCE:=libtool-1.5.8.tar.gz
+LIBTOOL_SITE:=ftp://ftp.gnu.org/gnu/libtool
LIBTOOL_CAT:=zcat
-LIBTOOL_DIR:=$(BUILD_DIR)/libtool-1.4.3
+LIBTOOL_DIR:=$(BUILD_DIR)/libtool-1.5.8
LIBTOOL_BINARY:=libtool
LIBTOOL_TARGET_BINARY:=usr/bin/libtool
diff --git a/make/linux.mk b/make/linux.mk
index bb8f96b19..844429d24 100644
--- a/make/linux.mk
+++ b/make/linux.mk
@@ -45,11 +45,13 @@ LINUX_SOURCE_DIR=$(LINUX_DIR)
$(DL_DIR)/$(LINUX_SOURCE):
- $(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
+ mkdir $(DL_DIR)
+ $(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
- mkdir -p $(LINUX_DIR) $(TOOL_BUILD_DIR)
- rm -rf $(LINUX_DIR)
+ mkdir $(TOOL_BUILD_DIR)
+ #mkdir -p $(LINUX_DIR)
+ #rm -rf $(LINUX_DIR)
bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
ifneq ($(DOWNLOAD_LINUX_VERSION),$(LINUX_VERSION))
# Rename the dir from the downloaded version to the AFTER patch version
diff --git a/make/ltrace.mk b/make/ltrace.mk
index 146bd4049..2170e3306 100644
--- a/make/ltrace.mk
+++ b/make/ltrace.mk
@@ -3,9 +3,9 @@
# ltrace
#
#############################################################
-LTRACE_SOURCE=ltrace_0.3.32.tar.gz
+LTRACE_SOURCE=ltrace_0.3.35.tar.gz
LTRACE_SITE=http://ftp.debian.org/debian/pool/main/l/ltrace
-LTRACE_DIR=$(BUILD_DIR)/ltrace-0.3.32
+LTRACE_DIR=$(BUILD_DIR)/ltrace-0.3.35
LTRACE_BINARY=ltrace
LTRACE_TARGET_BINARY=usr/bin/ltrace
@@ -29,7 +29,7 @@ $(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.source
touch $(LTRACE_DIR)/.configured;
$(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(LTRACE_DIR)
+ $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld -C $(LTRACE_DIR)
$(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(LTRACE_DIR) install
diff --git a/make/ncurses.mk b/make/ncurses.mk
index 1768c1e4e..f57868e54 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.33 2004/07/28 19:26:04 andersen Exp $
+# $Id: ncurses.mk,v 1.34 2004/09/03 00:49:33 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
@@ -35,6 +35,7 @@ $(NCURSES_DIR)/.dist: $(DL_DIR)/$(NCURSES_SOURCE)
#use the local tic and not whatever the build system was going to find.
$(SED) 's~\$$srcdir/shlib tic\$$suffix~/usr/bin/tic~' \
$(NCURSES_DIR)/misc/run_tic.in
+ $(SOURCE_DIR)/patch-kernel.sh $(NCURSES_DIR) $(SOURCE_DIR) ncurses-*.patch
touch $(NCURSES_DIR)/.dist
$(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist
diff --git a/make/sed.mk b/make/sed.mk
index 2476c59aa..5d2f0f8b9 100644
--- a/make/sed.mk
+++ b/make/sed.mk
@@ -18,7 +18,8 @@ SED:=$(STAGING_DIR)/bin/sed -i -e
HOST_SED_TARGET=$(shell ./sources/sedcheck.sh)
$(DL_DIR)/$(SED_SOURCE):
- $(WGET) -P $(DL_DIR) $(SED_SITE)/$(SED_SOURCE)
+ mkdir -p $(DL_DIR)
+ $(WGET) -P $(DL_DIR) $(SED_SITE)/$(SED_SOURCE)
sed-source: $(DL_DIR)/$(SED_SOURCE)
@@ -30,7 +31,6 @@ sed-source: $(DL_DIR)/$(SED_SOURCE)
#############################################################
$(SED_DIR1)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
mkdir -p $(TOOL_BUILD_DIR)
- mkdir -p $(DL_DIR)
mkdir -p $(STAGING_DIR)/bin;
$(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(SED_DIR1)/.unpacked
diff --git a/make/strace.mk b/make/strace.mk
index 546584d80..f74897465 100644
--- a/make/strace.mk
+++ b/make/strace.mk
@@ -3,10 +3,12 @@
# strace
#
#############################################################
-STRACE_SOURCE:=strace-4.5.3.tar.bz2
+#STRACE_SOURCE:=strace-4.5.3.tar.bz2
+STRACE_SOURCE:=strace-4.5.6.tar.bz2
STRACE_SITE:=http://aleron.dl.sourceforge.net/sourceforge/strace
STRACE_CAT:=bzcat
-STRACE_DIR:=$(BUILD_DIR)/strace-4.5.3
+#STRACE_DIR:=$(BUILD_DIR)/strace-4.5.3
+STRACE_DIR:=$(BUILD_DIR)/strace-4.5.6
$(DL_DIR)/$(STRACE_SOURCE):
diff --git a/make/uclibc.mk b/make/uclibc.mk
index e0de21a7e..7a837e427 100644
--- a/make/uclibc.mk
+++ b/make/uclibc.mk
@@ -3,14 +3,17 @@
# uClibc (the C library)
#
#############################################################
-ifeq ($(USE_UCLIBC_SNAPSHOT),true)
+
+ifneq ($(strip $(USE_UCLIBC_SNAPSHOT)),)
# Be aware that this changes daily....
-UCLIBC_DIR=$(BUILD_DIR)/uClibc
-UCLIBC_SOURCE=uClibc-snapshot.tar.bz2
+UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc
+UCLIBC_SOURCE:=uClibc-$(strip $(USE_UCLIBC_SNAPSHOT)).tar.bz2
UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots
else
-UCLIBC_DIR:=$(BUILD_DIR)/uClibc-0.9.26
-UCLIBC_SOURCE:=uClibc-0.9.26.tar.bz2
+# 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
@@ -30,21 +33,12 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
$(DL_DIR)/$(UCLIBC_SOURCE):
+ mkdir -p $(DL_DIR)
$(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE)
$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
-ifeq ($(SOFT_FLOAT),true)
- # Make sure we have a soft float specs file for this arch
- if [ ! -f $(SOURCE_DIR)/specs-$(ARCH)-soft-float ] ; then \
- echo soft float configured but no specs file for this arch ; \
- /bin/false ; \
- fi;
-endif
- bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- #(cd $(BUILD_DIR) ; ln -s $(DL_DIR)/uClibc)
- #-mkdir $(UCLIBC_DIR)
- #(cd $(DL_DIR)/uClibc && tar cf - .) | (cd $(UCLIBC_DIR) && tar xvfp - )
- $(SOURCE_DIR)/patch-kernel.sh $(UCLIBC_DIR) $(SOURCE_DIR) uClibc-*.patch
+ 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_DIR)/.configured
@@ -77,38 +71,32 @@ 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)" \
- oldconfig;
- -$(MAKE) -C $(UCLIBC_DIR) \
+ $(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
HOSTCC="$(HOSTCC)" \
- headers pregen install_dev;
+ pregen install_dev;
touch $(UCLIBC_DIR)/.configured
$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET)
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX= \
- DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
+ DEVEL_PREFIX=/ \
RUNTIME_PREFIX=/ \
HOSTCC="$(HOSTCC)" \
all
-$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
+$(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(STAGING_DIR)/ \
- DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
- RUNTIME_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
+ DEVEL_PREFIX=/ \
+ RUNTIME_PREFIX=/ \
install_runtime
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(STAGING_DIR)/ \
- DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
- RUNTIME_PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/ \
+ DEVEL_PREFIX=/ \
+ RUNTIME_PREFIX=/ \
install_dev
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(STAGING_DIR) \
@@ -118,7 +106,7 @@ $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
$(MAKE) -C $(UCLIBC_DIR)/utils clean
ifneq ($(TARGET_DIR),)
-$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
+$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/lib/libc.a
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(TARGET_DIR) \
DEVEL_PREFIX=/usr/ \
@@ -134,7 +122,7 @@ endif
uclibc-configured: $(UCLIBC_DIR)/.configured
-uclibc: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a \
+uclibc: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/lib/libc.a \
$(UCLIBC_TARGETS)
uclibc-source: $(DL_DIR)/$(UCLIBC_SOURCE)
@@ -165,11 +153,7 @@ $(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
RUNTIME_PREFIX=/ \
install_dev
-ifeq ($(GCC_2_95_TOOLCHAIN),true)
-uclibc_target: gcc2_95 uclibc $(TARGET_DIR)/usr/lib/libc.a
-else
-uclibc_target: gcc3_3 uclibc $(TARGET_DIR)/usr/lib/libc.a
-endif
+uclibc_target: gcc uclibc $(TARGET_DIR)/usr/lib/libc.a
uclibc_target-clean:
rm -f $(TARGET_DIR)/include
diff --git a/make/util-linux.mk b/make/util-linux.mk
index c29a8403b..2a77d18f4 100644
--- a/make/util-linux.mk
+++ b/make/util-linux.mk
@@ -5,7 +5,7 @@
#############################################################
UTIL-LINUX_SOURCE:=util-linux_2.12.orig.tar.gz
UTIL-LINUX_SITE:=http://ftp.debian.org/debian/pool/main/u/util-linux/
-UTIL-LINUX_PATCH:=util-linux_2.12-6.diff.gz
+UTIL-LINUX_PATCH:=util-linux_2.12-7.diff.gz
UTIL-LINUX_CAT:=zcat
UTIL-LINUX_DIR:=$(BUILD_DIR)/util-linux-2.12
UTIL-LINUX_BINARY:=$(UTIL-LINUX_DIR)/misc-utils/mcookie