Kill off the old gcc/binutils stuff

This commit is contained in:
Eric Andersen 2004-01-29 23:13:49 +00:00
parent 563a74609b
commit 65eb36c4e9
10 changed files with 0 additions and 1859 deletions

View file

@ -1,211 +0,0 @@
ifneq ($(USE_LINUX_UCLIBC),true)
#############################################################
#
# build binutils for use on the host system
#
#############################################################
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
BINUTILS_CAT:=bzcat
BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-build
$(DL_DIR)/$(BINUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE)
$(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE)
mkdir -p $(TOOL_BUILD_DIR)
mkdir -p $(DL_DIR)
mkdir -p $(STAGING_DIR)
mkdir -p $(STAGING_DIR)/lib/gcc-lib
mkdir -p $(STAGING_DIR)/usr/bin;
mkdir -p $(STAGING_DIR)/$(GNU_TARGET_NAME)/
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME); ln -fs ../lib)
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME); ln -fs ../include)
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
$(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-[0-9]*.patch
touch $(BINUTILS_DIR)/.patched
$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(BINUTILS_DIR1)
(cd $(BINUTILS_DIR1); CC="$(HOSTCC)" \
CC_FOR_HOST="$(HOSTCC)" \
CXX_FOR_HOST="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
--sbindir=$(STAGING_DIR)/sbin \
--sysconfdir=$(STAGING_DIR)/etc \
--datadir=$(STAGING_DIR)/share \
--includedir=$(STAGING_DIR)/include \
--libdir=$(STAGING_DIR)/lib \
--localstatedir=$(STAGING_DIR)/var \
--mandir=$(STAGING_DIR)/man \
--infodir=$(STAGING_DIR)/info \
--enable-targets=$(GNU_TARGET_NAME) \
--with-sysroot=$(STAGING_DIR) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
--program-prefix=$(ARCH)-linux-);
touch $(BINUTILS_DIR1)/.configured
$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
$(MAKE) $(JLEVEL) CC_FOR_HOST="$(HOSTCC)" \
CXX_FOR_HOST="$(HOSTCC)" LDFLAGS="$(HOSTLDFLAGS)" \
-C $(BINUTILS_DIR1);
$(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump
$(MAKE) $(JLEVEL) CC_FOR_HOST="$(HOSTCC)" \
CXX_FOR_HOST="$(HOSTCC)" LDFLAGS="$(HOSTLDFLAGS)" \
-C $(BINUTILS_DIR1) install;
rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
$(STAGING_DIR)/share/locale
mkdir -p $(STAGING_DIR)/usr/bin;
set -e; \
for app in addr2line ar as c++filt gprof ld nm objcopy \
objdump ranlib readelf size strings strip ; \
do \
if [ -x $(STAGING_DIR)/bin/$(ARCH)-linux-$${app} ] ; then \
(cd $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin; \
ln -fs ../../bin/$(ARCH)-linux-$${app} $${app}; \
); \
(cd $(STAGING_DIR)/usr/bin; \
ln -fs ../../bin/$(ARCH)-linux-$${app} $${app}; \
); \
fi; \
done;
$(STAGING_DIR)/lib/libg.a:
mkdir -p $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin
mkdir -p $(STAGING_DIR)/usr/include/
mkdir -p $(STAGING_DIR)/usr/lib/
$(TARGET_CROSS)ar rv $(STAGING_DIR)/lib/libg.a;
cp $(BINUTILS_DIR)/include/ansidecl.h $(STAGING_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/bfdlink.h $(STAGING_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/dis-asm.h $(STAGING_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/libiberty.h $(STAGING_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/symcat.h $(STAGING_DIR)/usr/include/
cp $(BINUTILS_DIR1)/bfd/bfd.h $(STAGING_DIR)/usr/include/
cp -a $(BINUTILS_DIR1)/bfd/.libs/* $(STAGING_DIR)/usr/lib/
cp -a $(BINUTILS_DIR1)/opcodes/.libs/* $(STAGING_DIR)/usr/lib/
cp -a $(BINUTILS_DIR1)/libiberty/libiberty.a $(STAGING_DIR)/usr/lib/
binutils: $(STAGING_DIR)/$(GNU_TARGET_NAME)/bin/ld $(STAGING_DIR)/lib/libg.a
binutils-source: $(DL_DIR)/$(BINUTILS_SOURCE)
binutils-clean:
rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)*
-$(MAKE) -C $(BINUTILS_DIR1) clean
binutils-dirclean:
rm -rf $(BINUTILS_DIR1)
#############################################################
#
# build binutils for use on the target system
#
#############################################################
BINUTILS_DIR2:=$(BUILD_DIR)/binutils-target
$(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(BINUTILS_DIR2)
mkdir -p $(TARGET_DIR)/usr/include
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)" \
LDFLAGS="$(HOSTLDFLAGS)" \
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$(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) \
--host=$(GNU_TARGET_NAME) \
--build=$(ARCH)-linux \
--prefix=/usr \
--mandir=/usr/man \
--infodir=/usr/info \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
);
touch $(BINUTILS_DIR2)/.configured
$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
$(MAKE) $(JLEVEL) -C $(BINUTILS_DIR2) \
CC_FOR_BUILD="$(HOSTCC)" \
CXX_FOR_BUILD="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
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$(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
$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
$(MAKE) $(JLEVEL) -C $(BINUTILS_DIR2) \
CC_FOR_BUILD="$(HOSTCC)" \
CXX_FOR_BUILD="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
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$(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 \
mandir=/usr/man \
DESTDIR=$(TARGET_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
-$(STRIP) $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/bin/* > /dev/null 2>&1
-$(STRIP) $(TARGET_DIR)/usr/bin/* > /dev/null 2>&1
$(TARGET_DIR)/usr/lib/libg.a:
$(TARGET_CROSS)ar rv $(TARGET_DIR)/usr/lib/libg.a;
cp $(BINUTILS_DIR)/include/ansidecl.h $(TARGET_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/bfdlink.h $(TARGET_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/dis-asm.h $(TARGET_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/libiberty.h $(TARGET_DIR)/usr/include/
cp $(BINUTILS_DIR)/include/symcat.h $(TARGET_DIR)/usr/include/
cp $(BINUTILS_DIR2)/bfd/bfd.h $(TARGET_DIR)/usr/include/
cp -a $(BINUTILS_DIR2)/bfd/.libs/* $(TARGET_DIR)/usr/lib/
cp -a $(BINUTILS_DIR2)/opcodes/.libs/* $(TARGET_DIR)/usr/lib/
cp -a $(BINUTILS_DIR2)/libiberty/libiberty.a $(TARGET_DIR)/usr/lib/
binutils_target: $(GCC_DEPENDANCY) $(TARGET_DIR)/usr/bin/ld $(TARGET_DIR)/usr/lib/libg.a
binutils_target-clean:
rm -f $(TARGET_DIR)/bin/$(GNU_TARGET_NAME)*
-$(MAKE) -C $(BINUTILS_DIR2) clean
binutils_target-dirclean:
rm -rf $(BINUTILS_DIR2)
endif #ifneq ($(USE_LINUX_UCLIBC),true)

View file

@ -1,298 +0,0 @@
# Makefile for to build a gcc/uClibc toolchain
#
# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ifneq ($(USE_LINUX_UCLIBC),true)
ifeq ($(GCC_2_95_TOOLCHAIN),true)
GCC_SITE:=http://www.uclibc.org/downloads/toolchain
GCC_SOURCE:=gcc-20011006.tar.bz2
GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-20011006
GCC_CAT:=bzcat
STLPORT_SITE=http://www.stlport.org/archive
STLPORT_SOURCE=STLport-4.5.3.tar.gz
STLPORT_DIR=$(TOOL_BUILD_DIR)/STLport-4.5.3
#############################################################
#
# Setup some initial stuff
#
#############################################################
ifeq ($(INSTALL_LIBSTDCPP),true)
TARGET_LANGUAGES:=c,c++
STLPORT_TARGET=stlport
else
TARGET_LANGUAGES:=c
STLPORT_TARGET=
endif
#############################################################
#
# Next build first pass gcc compiler
#
#############################################################
GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-2.95-initial
$(DL_DIR)/$(GCC_SOURCE):
$(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
$(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
touch $(GCC_DIR)/.patched
$(GCC_DIR)/.gcc2_95_build_hacks: $(GCC_DIR)/.patched
#
# Hack things to use the correct shared lib loader
#
(cd $(GCC_DIR); set -e; export LIST=`grep -lr -- "-dynamic-linker.*\.so[\.0-9]*" *`;\
if [ -n "$$LIST" ] ; then \
$(SED) "s,-dynamic-linker.*\.so[\.0-9]*},\
-dynamic-linker /lib/ld-uClibc.so.0},;" $$LIST; fi);
#
# Prevent system glibc start files from leaking in uninvited...
#
$(SED) "s,standard_startfile_prefix_1 = \".*,standard_startfile_prefix_1 =\
\"$(STAGING_DIR)/lib/\";,;" $(GCC_DIR)/gcc/gcc.c;
$(SED) "s,standard_startfile_prefix_2 = \".*,standard_startfile_prefix_2 =\
\"$(STAGING_DIR)/usr/lib/\";,;" $(GCC_DIR)/gcc/gcc.c;
#
# Prevent system glibc include files from leaking in uninvited...
#
$(SED) "s,^NATIVE_SYSTEM_HEADER_DIR.*,NATIVE_SYSTEM_HEADER_DIR=\
$(STAGING_DIR)/include,;" $(GCC_DIR)/gcc/Makefile.in;
$(SED) "s,^CROSS_SYSTEM_HEADER_DIR.*,CROSS_SYSTEM_HEADER_DIR=\
$(STAGING_DIR)/include,;" $(GCC_DIR)/gcc/Makefile.in;
$(SED) "s,^#define.*STANDARD_INCLUDE_DIR.*,#define STANDARD_INCLUDE_DIR \
\"$(STAGING_DIR)/include\",;" $(GCC_DIR)/gcc/cppdefault.h;
#
# Prevent system glibc libraries from being found by collect2
# when it calls locatelib() and rummages about the system looking
# for libraries with the correct name...
#
$(SED) "s,\"/lib,\"$(STAGING_DIR)/lib,g;" $(GCC_DIR)/gcc/collect2.c
$(SED) "s,\"/usr/,\"$(STAGING_DIR)/usr/,g;" $(GCC_DIR)/gcc/collect2.c
#
# Prevent gcc from using the unwind-dw2-fde-glibc code
#
$(SED) "s,^#ifndef inhibit_libc,#define inhibit_libc\n\
#ifndef inhibit_libc,g;" $(GCC_DIR)/gcc/unwind-dw2-fde-glibc.c;
#
# Use atexit() directly, rather than cxa_atexit
#
$(SED) "s,int flag_use_cxa_atexit = 1;,int flag_use_cxa_atexit = 0;,g;"\
$(GCC_DIR)/gcc/cp/decl2.c;
#
# We do not wish to build the libstdc++ library provided with gcc,
# since it doesn't seem to work at all with uClibc plus gcc 2.95...
#
mv $(GCC_DIR)/libstdc++ $(GCC_DIR)/libstdc++.orig
mv $(GCC_DIR)/libio $(GCC_DIR)/libio.orig
touch $(GCC_DIR)/.gcc2_95_build_hacks
# 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)/.gcc2_95_build_hacks
mkdir -p $(GCC_BUILD_DIR1)
(cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) AR=$(TARGET_CROSS)ar \
RANLIB=$(TARGET_CROSS)ranlib CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
--sbindir=$(STAGING_DIR)/sbin \
--sysconfdir=$(STAGING_DIR)/etc \
--datadir=$(STAGING_DIR)/share \
--includedir=$(STAGING_DIR)/include \
--libdir=$(STAGING_DIR)/lib \
--localstatedir=$(STAGING_DIR)/var \
--mandir=$(STAGING_DIR)/man \
--infodir=$(STAGING_DIR)/info \
--with-local-prefix=$(STAGING_DIR)/usr/local \
--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-);
touch $(GCC_BUILD_DIR1)/.configured
$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) \
AR_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ar \
RANLIB_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ranlib
touch $(GCC_BUILD_DIR1)/.compiled
$(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc: $(GCC_BUILD_DIR1)/.compiled
PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install;
#Cleanup then mess when --program-prefix mysteriously fails
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-uclibc-cpp
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
rm -f $(STAGING_DIR)/bin/gccbug $(STAGING_DIR)/bin/gcov
rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \
$(STAGING_DIR)/share/locale
gcc2_95_initial: binutils $(UCLIBC_DIR)/.configured $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
gcc2_95_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)*
gcc2_95_initial-dirclean:
rm -rf $(GCC_BUILD_DIR1)
#############################################################
#
# STLport -- an alternative C++ library
#
#############################################################
STLPORT_PATCH=$(SOURCE_DIR)/STLport-4.5.3.patch
$(DL_DIR)/$(STLPORT_SOURCE):
$(WGET) -P $(DL_DIR) $(STLPORT_SITE)/$(STLPORT_SOURCE)
$(STLPORT_DIR)/Makefile: $(DL_DIR)/$(STLPORT_SOURCE) $(STLPORT_PATCH)
zcat $(DL_DIR)/$(STLPORT_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
cat $(STLPORT_PATCH) | patch -d $(STLPORT_DIR) -p1
$(STLPORT_DIR)/lib/libstdc++.a: $(STLPORT_DIR)/Makefile
$(MAKE) ARCH=$(ARCH) PREFIX=$(STAGING_DIR) -C $(STLPORT_DIR)
$(STAGING_DIR)/lib/libstdc++.a: $(STLPORT_DIR)/lib/libstdc++.a
$(MAKE) ARCH=$(ARCH) PREFIX=$(STAGING_DIR) -C $(STLPORT_DIR) install
ifneq ($(HAS_MMU),true)
rm -f $(STAGING_DIR)/lib/libstdc++*.so*
endif
stlport: $(STAGING_DIR)/lib/libstdc++.a
stlport-source: $(DL_DIR)/$(STLPORT_SOURCE)
stlport-clean:
rm -f $(STAGING_DIR)/lib/libstdc++*
rm -f $(STAGING_DIR)/include/c++*
-$(MAKE) -C $(STLPORT_DIR) clean
stlport-dirclean:
rm -f $(STAGING_DIR)/lib/libstdc++*
rm -f $(STAGING_DIR)/include/g++-v3*
rm -rf $(STLPORT_DIR)
#############################################################
#
# second pass compiler build. Build the compiler targeting
# the newly built shared uClibc library.
#
#############################################################
GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-2.95-final
$(GCC_DIR)/.g++_build_hacks: $(GCC_DIR)/.patched
touch $(GCC_DIR)/.g++_build_hacks
$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks
mkdir -p $(GCC_BUILD_DIR2)
(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_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
--sbindir=$(STAGING_DIR)/sbin \
--sysconfdir=$(STAGING_DIR)/etc \
--datadir=$(STAGING_DIR)/share \
--localstatedir=$(STAGING_DIR)/var \
--mandir=$(STAGING_DIR)/man \
--infodir=$(STAGING_DIR)/info \
--with-local-prefix=$(STAGING_DIR)/usr/local \
--libdir=$(STAGING_DIR)/lib \
--includedir=$(STAGING_DIR)/include \
--with-gxx-include-dir=$(STAGING_DIR)/include/c++ \
--oldincludedir=$(STAGING_DIR)/include \
--enable-shared $(MULTILIB) \
--enable-target-optspace $(DISABLE_NLS) \
--with-gnu-ld --disable-__cxa_atexit \
--enable-languages=$(TARGET_LANGUAGES) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
--program-prefix=$(ARCH)-uclibc- \
);
touch $(GCC_BUILD_DIR2)/.configured
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
PATH=$(TARGET_PATH) CC=$(HOSTCC) \
AR_FOR_TARGET=$(TARGET_CROSS)ar RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
LD_FOR_TARGET=$(TARGET_CROSS)ld NM_FOR_TARGET=$(TARGET_CROSS)nm \
CC_FOR_TARGET=$(TARGET_CROSS)gcc $(MAKE) -C $(GCC_BUILD_DIR2)
touch $(GCC_BUILD_DIR2)/.compiled
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
touch $(GCC_BUILD_DIR2)/.installed
$(STAGING_DIR)/bin/$(ARCH)-uclibc-g++: $(GCC_BUILD_DIR2)/.compiled
PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install;
-mv $(STAGING_DIR)/bin/gcc $(STAGING_DIR)/usr/bin;
-mv $(STAGING_DIR)/bin/protoize $(STAGING_DIR)/usr/bin;
-mv $(STAGING_DIR)/bin/unprotoize $(STAGING_DIR)/usr/bin;
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-uclibc-cpp
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/$(ARCH)-uclibc-gcc
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin/$(ARCH)-uclibc-c++
-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
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 -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/*
set -e; \
for app in cc gcc c89 cpp c++ g++ ; do \
if [ -x $(STAGING_DIR)/bin/$(ARCH)-uclibc-$${app} ] ; then \
(cd $(STAGING_DIR)/usr/bin; \
ln -fs ../../bin/$(ARCH)-uclibc-$${app} $${app}; \
); \
fi; \
done;
gcc2_95: binutils uclibc-configured gcc2_95_initial uclibc \
$(STAGING_DIR)/bin/$(ARCH)-uclibc-g++ $(STLPORT_TARGET)
gcc2_95-source: $(DL_DIR)/$(GCC_SOURCE)
gcc2_95-clean:
rm -rf $(GCC_BUILD_DIR2)
rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)*
gcc2_95-dirclean:
rm -rf $(GCC_BUILD_DIR2)
endif
endif #ifneq ($(USE_LINUX_UCLIBC),true)

View file

@ -1,455 +0,0 @@
# Makefile for to build a gcc/uClibc toolchain
#
# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ifneq ($(USE_LINUX_UCLIBC),true)
ifneq ($(GCC_2_95_TOOLCHAIN),true)
# Older stuff...
#GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/
#GCC_SOURCE:=gcc-3.3.tar.gz
#GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-3.3
#GCC_CAT:=zcat
# Shiny new stuff...
GCC_VERSION:=3.3.2
#GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VERSION)
#GCC_SITE:=http://www.binarycode.org/gcc/releases/gcc-$(GCC_VERSION)
GCC_SITE:=http://gcc.get-software.com/releases/gcc-$(GCC_VERSION)
#
# snapshots....
#GCC_VERSION:=3.3-20031013
#GCC_SITE:=http://gcc.get-software.com/snapshots/$(GCC_VERSION)
#
GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2
GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)
GCC_CAT:=bzcat
#############################################################
#
# Setup some initial stuff
#
#############################################################
ifeq ($(INSTALL_LIBSTDCPP),true)
TARGET_LANGUAGES:=c,c++
else
TARGET_LANGUAGES:=c
endif
#############################################################
#
# build the first pass gcc compiler
#
#############################################################
GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-3.3-initial
$(DL_DIR)/$(GCC_SOURCE):
$(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
$(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-[0-9]*.patch
ifeq ($(SOFT_FLOAT),true)
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
#
# Hack things to use the correct shared lib loader
#
(cd $(GCC_DIR); set -e; export LIST=`grep -lr -- "-dynamic-linker.*\.so[\.0-9]*" *`;\
if [ -n "$$LIST" ] ; then \
$(SED) "s,-dynamic-linker.*\.so[\.0-9]*},\
-dynamic-linker /lib/ld-uClibc.so.0},;" $$LIST; fi);
#
# Prevent gcc from using the unwind-dw2-fde-glibc code used for
# unwinding stack frames for C++ exception handling. The
# unwind-dw2-fde-glibc code depends on glibc's ldso, we want to
# use the generic version instead.
#
$(SED) "s,^#ifndef inhibit_libc,#define inhibit_libc\n\
#ifndef inhibit_libc,g;" $(GCC_DIR)/gcc/unwind-dw2-fde-glibc.c;
#
# Prevent system glibc start files from leaking in uninvited...
#
$(SED) "s,standard_startfile_prefix_1 = \".*,standard_startfile_prefix_1 =\
\"$(STAGING_DIR)/lib/\";,;" $(GCC_DIR)/gcc/gcc.c;
$(SED) "s,standard_startfile_prefix_2 = \".*,standard_startfile_prefix_2 =\
\"$(STAGING_DIR)/usr/lib/\";,;" $(GCC_DIR)/gcc/gcc.c;
#
# Prevent system glibc include files from leaking in uninvited...
#
$(SED) "s,^NATIVE_SYSTEM_HEADER_DIR.*,NATIVE_SYSTEM_HEADER_DIR=\
$(STAGING_DIR)/include,;" $(GCC_DIR)/gcc/Makefile.in;
$(SED) "s,^CROSS_SYSTEM_HEADER_DIR.*,CROSS_SYSTEM_HEADER_DIR=\
$(STAGING_DIR)/include,;" $(GCC_DIR)/gcc/Makefile.in;
$(SED) "s,^#define.*STANDARD_INCLUDE_DIR.*,#define STANDARD_INCLUDE_DIR \
\"$(STAGING_DIR)/include\",;" $(GCC_DIR)/gcc/cppdefault.h;
#
# Prevent system glibc libraries from being found by collect2
# when it calls locatelib() and rummages about the system looking
# for libraries with the correct name...
#
$(SED) "s,\"/lib,\"$(STAGING_DIR)/lib,g;" $(GCC_DIR)/gcc/collect2.c
$(SED) "s,\"/usr/,\"$(STAGING_DIR)/usr/,g;" $(GCC_DIR)/gcc/collect2.c
touch $(GCC_DIR)/.gcc3_3_build_hacks
# 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)/.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)/$(ARCH)-linux/bin/ -B$(STAGING_DIR)/$(ARCH)-linux/lib/ -isystem $(STAGING_DIR)/$(ARCH)-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)" \
LDFLAGS="$(HOSTLDFLAGS)" \
gcc_cv_as_hidden=no \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
--sbindir=$(STAGING_DIR)/sbin \
--sysconfdir=$(STAGING_DIR)/etc \
--datadir=$(STAGING_DIR)/share \
--includedir=$(STAGING_DIR)/include \
--libdir=$(STAGING_DIR)/lib \
--localstatedir=$(STAGING_DIR)/var \
--mandir=$(STAGING_DIR)/man \
--infodir=$(STAGING_DIR)/info \
--with-local-prefix=$(STAGING_DIR)/usr/local \
--oldincludedir=$(STAGING_DIR)/include $(MULTILIB) \
--enable-target-optspace $(DISABLE_NLS) --with-gnu-ld \
--disable-shared --enable-languages=c --disable-__cxa_atexit \
$(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) \
CC="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
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)-linux-gcc: $(GCC_BUILD_DIR1)/.compiled
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) \
CC="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
-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)-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)-linux-gcc
gcc3_3_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)*
gcc3_3_initial-dirclean:
rm -rf $(GCC_BUILD_DIR1)
#############################################################
#
# second pass compiler build. Build the compiler targeting
# the newly built shared uClibc library.
#
#############################################################
GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-3.3-final
$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
mkdir -p $(GCC_BUILD_DIR2)
echo -e "#!/bin/sh\nexec $(GCC_BUILD_DIR2)/gcc/xgcc -B$(GCC_BUILD_DIR2)/gcc/ -B$(STAGING_DIR)/$(ARCH)-linux/bin/ -B$(STAGING_DIR)/$(ARCH)-linux/lib/ -isystem $(STAGING_DIR)/$(ARCH)-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)/$(ARCH)-linux/bin/ -B$(STAGING_DIR)/$(ARCH)-linux/lib/ -isystem $(STAGING_DIR)/$(ARCH)-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)" \
LDFLAGS="$(HOSTLDFLAGS)" \
gcc_cv_as_hidden=no \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_HOST_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
--sbindir=$(STAGING_DIR)/sbin \
--sysconfdir=$(STAGING_DIR)/etc \
--datadir=$(STAGING_DIR)/share \
--localstatedir=$(STAGING_DIR)/var \
--mandir=$(STAGING_DIR)/man \
--infodir=$(STAGING_DIR)/info \
--with-local-prefix=$(STAGING_DIR)/usr/local \
--libdir=$(STAGING_DIR)/lib \
--includedir=$(STAGING_DIR)/include \
--with-gxx-include-dir=$(STAGING_DIR)/include/c++ \
--oldincludedir=$(STAGING_DIR)/include \
--enable-shared $(MULTILIB) \
--enable-target-optspace $(DISABLE_NLS) \
--with-gnu-ld --disable-__cxa_atexit \
--enable-languages=$(TARGET_LANGUAGES) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
--program-prefix=$(ARCH)-linux- \
);
touch $(GCC_BUILD_DIR2)/.configured
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) \
CC="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
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=$(GCC_BUILD_DIR2)/target_gcc \
GCC_FOR_TARGET=$(GCC_BUILD_DIR2)/target_gcc \
CXX_FOR_TARGET=$(GCC_BUILD_DIR2)/target_g++ \
-C $(GCC_BUILD_DIR2)
touch $(GCC_BUILD_DIR2)/.compiled
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled $(STAGING_DIR)/lib/libc.a
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) \
CC="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
-C $(GCC_BUILD_DIR2) install;
-mv $(STAGING_DIR)/bin/gcc $(STAGING_DIR)/usr/bin;
-mv $(STAGING_DIR)/bin/protoize $(STAGING_DIR)/usr/bin;
-mv $(STAGING_DIR)/bin/unprotoize $(STAGING_DIR)/usr/bin;
-mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cpp $(STAGING_DIR)/bin/$(ARCH)-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)-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)-linux-$${app} ] ; then \
(cd $(STAGING_DIR)/usr/bin; \
ln -fs ../../bin/$(ARCH)-linux-$${app} $${app}; \
); \
fi; \
done;
touch $(GCC_BUILD_DIR2)/.installed
ifneq ($(TARGET_DIR),)
$(TARGET_DIR)/lib/libstdc++.so.5.0.5: $(GCC_BUILD_DIR2)/.installed
cp -a $(STAGING_DIR)/lib/libstdc++.so* $(TARGET_DIR)/lib/
$(GCC_BUILD_DIR2)/.shared_libgcc: $(GCC_BUILD_DIR2)/.installed
# Make sure a copy of libgcc_s is in the target's /lib.
if [ -f $(STAGING_DIR)/lib/libgcc_s.so.0.9.9 ] ; then \
cp -a $(STAGING_DIR)/lib/libgcc_s.so* $(TARGET_DIR)/lib/ ; \
fi
touch $(GCC_BUILD_DIR2)/.shared_libgcc
GCC_TARGETS:=$(GCC_BUILD_DIR2)/.shared_libgcc
ifeq ($(INSTALL_LIBSTDCPP),true)
GCC_TARGETS+=$(TARGET_DIR)/lib/libstdc++.so.5.0.5
endif
endif
gcc3_3: binutils uclibc-configured gcc3_3_initial $(LIBFLOAT_TARGET) uclibc \
$(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS)
gcc3_3-source: $(DL_DIR)/$(GCC_SOURCE)
gcc3_3-clean:
rm -rf $(GCC_BUILD_DIR2)
rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)*
gcc3_3-dirclean:
rm -rf $(GCC_BUILD_DIR2)
#############################################################
#
# Next build target gcc compiler
#
#############################################################
GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-3.3-target
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 \
CC="$(HOSTCC)" \
LDFLAGS="$(HOSTLDFLAGS)" \
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="$(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
# We need to unpack a pristine source tree to avoid some of
# the previously applied hacks, which do not apply here...
$(GCC_BUILD_DIR3)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
$(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv $(BUILD_DIR)/gcc-$(GCC_VERSION) $(GCC_BUILD_DIR3)
touch $(GCC_BUILD_DIR3)/.unpacked
$(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-[0-9]**.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
#
# Hack things to use the correct shared lib loader
#
(cd $(GCC_BUILD_DIR3); set -e; export LIST=`grep -lr -- "-dynamic-linker.*\.so[\.0-9]*" *`;\
if [ -n "$$LIST" ] ; then \
$(SED) "s,-dynamic-linker.*\.so[\.0-9]*},\
-dynamic-linker /lib/ld-uClibc.so.0},;" $$LIST; fi);
#
# Prevent gcc from using the unwind-dw2-fde-glibc code used for
# unwinding stack frames for C++ exception handling. The
# unwind-dw2-fde-glibc code depends on glibc's ldso, we want to
# use the generic version instead.
#
$(SED) "s,^#ifndef inhibit_libc,#define inhibit_libc\n\
#ifndef inhibit_libc,g;" $(GCC_BUILD_DIR3)/gcc/unwind-dw2-fde-glibc.c;
touch $(GCC_BUILD_DIR3)/.gcc3_3_build_hacks
$(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); \
$(TARGET_GCC_ARGS) \
gcc_cv_as_hidden=no \
./configure \
--verbose \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--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) \
$(DISABLE_NLS) \
--with-gnu-ld --disable-__cxa_atexit \
--enable-languages=$(TARGET_LANGUAGES) \
$(EXTRA_GCC_CONFIG_OPTIONS) \
);
touch $(GCC_BUILD_DIR3)/.configured
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
$(MAKE) $(JLEVEL) $(TARGET_GCC_ARGS) -C $(GCC_BUILD_DIR3)
touch $(GCC_BUILD_DIR3)/.compiled
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
$(MAKE) $(JLEVEL) $(TARGET_GCC_ARGS) DESTDIR=$(TARGET_DIR) \
-C $(GCC_BUILD_DIR3) install
(cd $(TARGET_DIR)/usr/bin; ln -fs gcc cc)
(cd $(TARGET_DIR)/lib; ln -fs /usr/bin/cpp)
rm -rf $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/include
rm -rf $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/sys-include
rm -rf $(TARGET_DIR)/usr/include/include $(TARGET_DIR)/usr/usr
-mv $(TARGET_DIR)/lib/*.a $(TARGET_DIR)/usr/lib/
-mv $(TARGET_DIR)/lib/*.la $(TARGET_DIR)/usr/lib/
rm -f $(TARGET_DIR)/lib/libstdc++.so*
# Make sure gcc does not think we are cross compiling
$(SED) "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/
# 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
gcc3_3_target-clean:
rm -rf $(GCC_BUILD_DIR3)
rm -f $(TARGET_DIR)/bin/$(GNU_TARGET_NAME)*
gcc3_3_target-dirclean:
rm -rf $(GCC_BUILD_DIR3)
endif
endif #ifneq ($(USE_LINUX_UCLIBC),true)

View file

@ -1,185 +0,0 @@
--- binutils-2.11.90.0.19.orig/ld/Makefile.am
+++ binutils-2.11.90.0.19/ld/Makefile.am
@@ -19,7 +19,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+scriptdir = $(libdir)
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
--- binutils-2.11.90.0.19.orig/ld/Makefile.in
+++ binutils-2.11.90.0.19/ld/Makefile.in
@@ -123,7 +123,7 @@
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
-scriptdir = $(tooldir)/lib
+scriptdir = $(libdir)
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff -urN binutils-2.11.90.0.27/gprof/gprof.texi binutils-2.11.90.0.27.new/gprof/gprof.texi
--- binutils-2.11.90.0.27/gprof/gprof.texi Tue Jun 19 14:57:58 2001
+++ binutils-2.11.90.0.27.new/gprof/gprof.texi Mon Aug 27 10:27:23 2001
@@ -137,6 +137,10 @@
If more than one profile file is specified, the @code{gprof}
output shows the sum of the profile information in the given profile files.
+If you use gcc 2.95.x or 3.0 to compile your binaries, you may need
+to add the @samp{-fprofile-arcs} to the compile command line in order
+for the call graphs to be properly stored in gmon.out.
+
@code{Gprof} calculates the amount of time spent in each routine.
Next, these times are propagated along the edges of the call graph.
Cycles are discovered, and calls into a cycle are made to share the time
@@ -266,6 +270,11 @@
to do the linking, simply specify @samp{-pg} in addition to your usual
options. The same option, @samp{-pg}, alters either compilation or linking
to do what is necessary for profiling. Here are examples:
+
+If you use gcc 2.95.x or 3.0.x, you may need to add the
+@samp{-fprofile-arcs} option to the compile line along with @samp{-pg}
+in order to allow the call-graphs to be properly included in the gmon.out
+file.
@example
cc -g -c myprog.c utils.c -pg
diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c
--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001
+++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001
@@ -127,6 +127,13 @@
{
bfd *nbfd;
const bfd_target *target_vec;
+ struct stat s;
+
+ if (stat (filename, &s) == 0)
+ if (S_ISDIR(s.st_mode)) {
+ bfd_set_error (bfd_error_file_not_recognized);
+ return NULL;
+ }
nbfd = _bfd_new_bfd ();
if (nbfd == NULL)
diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c
--- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001
+++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001
@@ -1830,7 +1830,7 @@
* The function returns the length of this instruction in bytes.
*/
-static char intel_syntax;
+static signed char intel_syntax;
static char open_char;
static char close_char;
static char separator_char;
diff -urN binutils-2.12.90.0.12/ld/emultempl/elf32.em binutils-2.12.90.0.12.new/ld/emultempl/elf32.em
--- binutils-2.12.90.0.12/ld/emultempl/elf32.em Wed Jun 19 00:41:59 2002
+++ binutils-2.12.90.0.12.new/ld/emultempl/elf32.em Wed Jun 26 10:00:26 2002
@@ -672,6 +672,8 @@
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
+ if ((lib_path) && (strlen (lib_path) == 0))
+ lib_path = NULL;
if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
force))
break;
@@ -867,6 +869,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (strlen (rpath) == 0))
+ rpath = NULL;
if (! (bfd_elf${ELFSIZE}_size_dynamic_sections
(output_bfd, command_line.soname, rpath,
command_line.filter_shlib,
diff -urN binutils-2.13.90.0.18/gprof/gprof.texi binutils-2.13.90.0.18.new/gprof/gprof.texi
--- binutils-2.13.90.0.18/gprof/gprof.texi 2003-02-02 18:29:09.000000000 -0500
+++ binutils-2.13.90.0.18.new/gprof/gprof.texi 2003-02-02 18:28:37.000000000 -0500
@@ -185,7 +185,7 @@
@c man end
@c man begin SEEALSO
-monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
+profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
``An Execution Profiler for Modular Programs'',
by S. Graham, P. Kessler, M. McKusick;
diff -urN binutils-2.13.90.0.10/opcodes/alpha-opc.c binutils-2.13.90.0.10.new/opcodes/alpha-opc.c
--- binutils-2.13.90.0.10/opcodes/alpha-opc.c 2002-03-07 14:52:40.000000000 -0500
+++ binutils-2.13.90.0.10.new/opcodes/alpha-opc.c 2002-10-12 20:16:08.000000000 -0400
@@ -1101,7 +1101,8 @@
{ "wmb", MFC(0x18,0x4400), BASE, ARG_NONE },
{ "fetch", MFC(0x18,0x8000), BASE, { ZA, PRB } },
{ "fetch_m", MFC(0x18,0xA000), BASE, { ZA, PRB } },
- { "rpcc", MFC(0x18,0xC000), BASE, { RA } },
+ { "rpcc", MFC(0x18,0xC000), BASE, { RA, ZB } },
+ { "rpcc", MFC(0x18,0xC000), BASE, { RA, RB } }, /* ev6 una */
{ "rc", MFC(0x18,0xE000), BASE, { RA } },
{ "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */
{ "rs", MFC(0x18,0xF000), BASE, { RA } },
--- binutils-2.13.90.0.18/bfd/elf64-alpha.c 2003-01-21 19:21:32.000000000 +0100
+++ binutils-2.13.90.0.18-modif/bfd/elf64-alpha.c 2003-04-11 01:24:26.000000000 +0200
@@ -4184,9 +4184,12 @@
loc = srel->contents;
loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
- <= srel->_cooked_size);
+ if (loc)
+ {
+ bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
+ <= srel->_cooked_size);
+ }
}
/* Relocate an Alpha ELF section for a relocatable link.
2003-05-23 H.J. Lu <hongjiu.lu@intel.com>
* ltmain.sh: Make symlink for shared library if needed.
opcodes/
2003-07-14 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in: Regenerated.
2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in: Regenerated.
2003-05-23 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (libopcodes_la_LIBADD): Use "-L../bfd -lbfd"
instead of "../bfd/libbfd.la".
* Makefile.in: Regenerated.
--- binutils/ltmain.sh.dso 2002-03-22 00:16:20.000000000 -0800
+++ binutils/ltmain.sh 2003-07-14 12:50:17.000000000 -0700
@@ -4413,6 +4413,10 @@ relink_command=\"$relink_command\""
# LD_LIBRARY_PATH before the program is installed.
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+ if test -n "$linkname"; then
+ $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)"
+ $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $?
+ fi
;;
esac
exit 0
--- binutils/opcodes/Makefile.am.dso 2003-06-11 07:18:04.000000000 -0700
+++ binutils/opcodes/Makefile.am 2003-07-14 12:50:18.000000000 -0700
@@ -283,7 +283,7 @@ disassemble.lo: disassemble.c $(INCDIR)/
libopcodes_la_SOURCES = dis-buf.c disassemble.c
libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la
-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la
+libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ -L../bfd -lbfd
libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in

View file

@ -1,264 +0,0 @@
diff -urN binutils-2.13.90.0.14/bfd/configure binutils-2.13.90.0.14.new/bfd/configure
--- binutils-2.13.90.0.14/bfd/configure 2002-11-14 12:37:55.000000000 -0500
+++ binutils-2.13.90.0.14.new/bfd/configure 2002-11-19 16:15:42.000000000 -0500
@@ -1208,7 +1208,7 @@
bfd_version_string="\"${VERSION}\""
if test x${is_release} = x; then
bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
+ bfd_version_string="\"${VERSION} ${bfd_version_date} uClibc\""
fi
diff -urN binutils-2.14.90.0.6.orig/bfd/elf-m10300.c binutils-2.14.90.0.6/bfd/elf-m10300.c
--- binutils-2.14.90.0.6.orig/bfd/elf-m10300.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf-m10300.c 2003-10-13 21:05:03.000000000 -0600
@@ -4018,7 +4018,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* Create dynamic sections when linking against a dynamic object. */
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-arm.h binutils-2.14.90.0.6/bfd/elf32-arm.h
--- binutils-2.14.90.0.6.orig/bfd/elf32-arm.h 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-arm.h 2003-10-13 21:05:03.000000000 -0600
@@ -117,7 +117,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
#define PLT_ENTRY_SIZE 16
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-cris.c binutils-2.14.90.0.6/bfd/elf32-cris.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-cris.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-cris.c 2003-10-13 21:05:03.000000000 -0600
@@ -536,7 +536,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-hppa.c binutils-2.14.90.0.6/bfd/elf32-hppa.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-hppa.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-hppa.c 2003-10-13 21:05:03.000000000 -0600
@@ -115,7 +115,7 @@
#define PLT_ENTRY_SIZE 8
#define GOT_ENTRY_SIZE 4
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
static const bfd_byte plt_stub[] =
{
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-i370.c binutils-2.14.90.0.6/bfd/elf32-i370.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-i370.c 2003-07-23 09:08:08.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-i370.c 2003-10-13 21:05:03.000000000 -0600
@@ -305,7 +305,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* Set the howto pointer for an i370 ELF reloc. */
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-i386.c binutils-2.14.90.0.6/bfd/elf32-i386.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-i386.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-i386.c 2003-10-13 21:05:03.000000000 -0600
@@ -423,7 +423,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-m68k.c binutils-2.14.90.0.6/bfd/elf32-m68k.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-m68k.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-m68k.c 2003-10-13 21:05:03.000000000 -0600
@@ -187,7 +187,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-ppc.c binutils-2.14.90.0.6/bfd/elf32-ppc.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-ppc.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-ppc.c 2003-10-13 21:05:03.000000000 -0600
@@ -49,7 +49,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
#define PLT_ENTRY_SIZE 12
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-s390.c binutils-2.14.90.0.6/bfd/elf32-s390.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-s390.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-s390.c 2003-10-13 21:05:03.000000000 -0600
@@ -452,7 +452,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-sh.c binutils-2.14.90.0.6/bfd/elf32-sh.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-sh.c 2003-08-21 09:28:47.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-sh.c 2003-10-13 21:05:03.000000000 -0600
@@ -113,7 +113,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
static reloc_howto_type sh_elf_howto_table[] =
{
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-sparc.c binutils-2.14.90.0.6/bfd/elf32-sparc.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-sparc.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-sparc.c 2003-10-13 21:05:03.000000000 -0600
@@ -507,7 +507,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The nop opcode we use. */
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-vax.c binutils-2.14.90.0.6/bfd/elf32-vax.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-vax.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-vax.c 2003-10-13 21:05:03.000000000 -0600
@@ -347,7 +347,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/libexec/ld.elf_so"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
diff -urN binutils-2.14.90.0.6.orig/bfd/elf32-xtensa.c binutils-2.14.90.0.6/bfd/elf32-xtensa.c
--- binutils-2.14.90.0.6.orig/bfd/elf32-xtensa.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf32-xtensa.c 2003-10-13 21:05:03.000000000 -0600
@@ -404,7 +404,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table.
(This does _not_ include the space for the literals associated with
diff -urN binutils-2.14.90.0.6.orig/bfd/elf64-alpha.c binutils-2.14.90.0.6/bfd/elf64-alpha.c
--- binutils-2.14.90.0.6.orig/bfd/elf64-alpha.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf64-alpha.c 2003-10-13 21:05:03.000000000 -0600
@@ -2328,7 +2328,7 @@
#define MAX_GOT_SIZE (64*1024)
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* Handle an Alpha specific section when reading an object file. This
is called when elfcode.h finds a section with an unknown type.
diff -urN binutils-2.14.90.0.6.orig/bfd/elf64-hppa.c binutils-2.14.90.0.6/bfd/elf64-hppa.c
--- binutils-2.14.90.0.6.orig/bfd/elf64-hppa.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf64-hppa.c 2003-10-13 21:05:03.000000000 -0600
@@ -31,7 +31,7 @@
#define DLT_ENTRY_SIZE 0x8
#define OPD_ENTRY_SIZE 0x20
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/pa20_64/dld.sl"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The stub is supposed to load the target address and target's DP
value out of the PLT, then do an external branch to the target
diff -urN binutils-2.14.90.0.6.orig/bfd/elf64-ppc.c binutils-2.14.90.0.6/bfd/elf64-ppc.c
--- binutils-2.14.90.0.6.orig/bfd/elf64-ppc.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf64-ppc.c 2003-10-13 21:05:03.000000000 -0600
@@ -94,7 +94,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
#define PLT_ENTRY_SIZE 24
diff -urN binutils-2.14.90.0.6.orig/bfd/elf64-s390.c binutils-2.14.90.0.6/bfd/elf64-s390.c
--- binutils-2.14.90.0.6.orig/bfd/elf64-s390.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf64-s390.c 2003-10-13 21:05:03.000000000 -0600
@@ -473,7 +473,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
diff -urN binutils-2.14.90.0.6.orig/bfd/elf64-sh64.c binutils-2.14.90.0.6/bfd/elf64-sh64.c
--- binutils-2.14.90.0.6.orig/bfd/elf64-sh64.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf64-sh64.c 2003-10-13 21:05:03.000000000 -0600
@@ -54,7 +54,7 @@
/* Return offset of the relocation in PLT entry. */
#define elf_sh64_plt_reloc_offset(info) (info->shared ? 52 : 44)
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The sh linker needs to keep track of the number of relocs that it
decides to copy in check_relocs for each symbol. This is so that
diff -urN binutils-2.14.90.0.6.orig/bfd/elf64-sparc.c binutils-2.14.90.0.6/bfd/elf64-sparc.c
--- binutils-2.14.90.0.6.orig/bfd/elf64-sparc.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf64-sparc.c 2003-10-13 21:05:03.000000000 -0600
@@ -959,7 +959,7 @@
#define LARGE_PLT_THRESHOLD 32768
#define GOT_RESERVED_ENTRIES 1
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* Fill in the .plt section. */
diff -urN binutils-2.14.90.0.6.orig/bfd/elf64-x86-64.c binutils-2.14.90.0.6/bfd/elf64-x86-64.c
--- binutils-2.14.90.0.6.orig/bfd/elf64-x86-64.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elf64-x86-64.c 2003-10-13 21:05:03.000000000 -0600
@@ -258,7 +258,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
diff -urN binutils-2.14.90.0.6.orig/bfd/elfxx-ia64.c binutils-2.14.90.0.6/bfd/elfxx-ia64.c
--- binutils-2.14.90.0.6.orig/bfd/elfxx-ia64.c 2003-08-21 09:28:48.000000000 -0600
+++ binutils-2.14.90.0.6/bfd/elfxx-ia64.c 2003-10-13 21:05:03.000000000 -0600
@@ -648,7 +648,7 @@
0x60, 0x00, 0x80, 0x00 /* br.few b6;; */
};
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
static const bfd_byte oor_brl[16] =
{

View file

@ -1,117 +0,0 @@
--- gcc-3.3/libstdc++-v3/configure 2003-05-01 20:37:25.000000000 -0600
+++ gcc-3.3-patched/libstdc++-v3/configure 2003-06-21 00:22:02.000000000 -0600
@@ -5163,10 +5163,6 @@
EOF
cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
#define HAVE_HYPOTF 1
EOF
@@ -10293,103 +10289,6 @@
#define HAVE_MMAP 1
EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ACOSF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ASINF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ATAN2F 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_ATANF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_CEILF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGN 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COPYSIGNF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COSF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_COSHF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_EXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FABSF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FLOORF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FMODF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_FREXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_LDEXPF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_LOG10F 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_LOGF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_MODFF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_POWF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_SINF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_SINHF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_SQRTF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_TANF 1
-EOF
-
- cat >> confdefs.h <<\EOF
-#define HAVE_TANHF 1
-EOF
-
;;
esac

View file

@ -1,18 +0,0 @@
--- gcc-3.3.1/gcc/cppinit.c.old 2003-08-29 17:08:57.000000000 -0500
+++ gcc-3.3.1/gcc/cppinit.c 2003-08-29 16:53:36.000000000 -0500
@@ -787,6 +787,7 @@
if (path != 0 && *path != 0)
path_include (pfile, path, SYSTEM);
+#if 0
/* Search "translated" versions of GNU directories.
These have /usr/local/lib/gcc... replaced by specd_prefix. */
if (specd_prefix != 0 && cpp_GCC_INCLUDE_DIR_len)
@@ -824,6 +825,7 @@
}
}
}
+#endif
/* Search ordinary names for GNU include directories. */
for (p = cpp_include_defaults; p->fname; p++)

View file

@ -1,283 +0,0 @@
diff -urN gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/c_locale.cc gcc-3.3.1/libstdc++-v3/config/locale/gnu/c_locale.cc
--- gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/c_locale.cc 2003-02-28 00:09:52.000000000 -0600
+++ gcc-3.3.1/libstdc++-v3/config/locale/gnu/c_locale.cc 2003-08-31 10:55:17.000000000 -0500
@@ -195,12 +195,15 @@
"LC_TIME",
"LC_COLLATE",
"LC_MONETARY",
- "LC_MESSAGES",
+ "LC_MESSAGES"
+#if _GLIBCPP_NUM_CATEGORIES != 0
+ ,
"LC_PAPER",
"LC_NAME",
"LC_ADDRESS",
"LC_TELEPHONE",
"LC_MEASUREMENT",
"LC_IDENTIFICATION"
+#endif
};
} // namespace std
diff -urN gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/c_locale.h gcc-3.3.1/libstdc++-v3/config/locale/gnu/c_locale.h
--- gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/c_locale.h 2003-01-23 12:56:16.000000000 -0600
+++ gcc-3.3.1/libstdc++-v3/config/locale/gnu/c_locale.h 2003-08-31 10:55:17.000000000 -0500
@@ -46,6 +46,10 @@
#define _GLIBCPP_C_LOCALE_GNU 1
#define _GLIBCPP_NUM_CATEGORIES 6
+#ifdef __UCLIBC__
+#undef _GLIBCPP_NUM_CATEGORIES
+#define _GLIBCPP_NUM_CATEGORIES 0
+#endif
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
namespace __gnu_cxx
diff -urN gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/c++locale_internal.h gcc-3.3.1/libstdc++-v3/config/locale/gnu/c++locale_internal.h
--- gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/c++locale_internal.h 2002-09-05 02:46:16.000000000 -0500
+++ gcc-3.3.1/libstdc++-v3/config/locale/gnu/c++locale_internal.h 2003-08-31 10:55:17.000000000 -0500
@@ -48,7 +48,9 @@
extern "C" __typeof(towlower_l) __towlower_l;
extern "C" __typeof(towupper_l) __towupper_l;
extern "C" __typeof(wcscoll_l) __wcscoll_l;
+#ifdef HAVE_WCSFTIME
extern "C" __typeof(wcsftime_l) __wcsftime_l;
+#endif
extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
extern "C" __typeof(wctype_l) __wctype_l;
extern "C" __typeof(newlocale) __newlocale;
diff -urN gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/messages_members.cc gcc-3.3.1/libstdc++-v3/config/locale/gnu/messages_members.cc
--- gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/messages_members.cc 2003-02-28 00:09:52.000000000 -0600
+++ gcc-3.3.1/libstdc++-v3/config/locale/gnu/messages_members.cc 2003-08-31 10:55:17.000000000 -0500
@@ -36,6 +36,13 @@
#include <locale>
#include <bits/c++locale_internal.h>
+#ifdef __UCLIBC__
+extern "C" char *__dcgettext(const char *domainname,
+ const char *msgid, int category);
+#undef gettext
+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
+#endif
+
namespace std
{
// Specializations.
diff -urN gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/messages_members.h gcc-3.3.1/libstdc++-v3/config/locale/gnu/messages_members.h
--- gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/messages_members.h 2003-01-06 16:20:03.000000000 -0600
+++ gcc-3.3.1/libstdc++-v3/config/locale/gnu/messages_members.h 2003-08-31 10:55:17.000000000 -0500
@@ -33,6 +33,12 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
+#ifdef __UCLIBC__
+extern "C" char *__textdomain(const char *domainname);
+extern "C" char *__bindtextdomain(const char *domainname,
+ const char *dirname);
+#endif
+
// Non-virtual member functions.
template<typename _CharT>
messages<_CharT>::messages(size_t __refs)
@@ -61,7 +67,11 @@
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char* __dir) const
{
+#ifdef __UCLIBC__
+ __bindtextdomain(__s.c_str(), __dir);
+#else
bindtextdomain(__s.c_str(), __dir);
+#endif
return this->do_open(__s, __loc);
}
@@ -83,7 +93,11 @@
{
// No error checking is done, assume the catalog exists and can
// be used.
+#ifdef __UCLIBC__
+ __textdomain(__s.c_str());
+#else
textdomain(__s.c_str());
+#endif
return 0;
}
diff -urN gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/numeric_members.cc gcc-3.3.1/libstdc++-v3/config/locale/gnu/numeric_members.cc
--- gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/numeric_members.cc 2003-02-28 00:09:52.000000000 -0600
+++ gcc-3.3.1/libstdc++-v3/config/locale/gnu/numeric_members.cc 2003-08-31 10:55:18.000000000 -0500
@@ -86,8 +86,13 @@
else
{
// Named locale.
+#ifdef __UCLIBC__
+ _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __cloc->decimal_point_wc }).__w);
+ _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __cloc->thousands_sep_wc }).__w);
+#else
_M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
_M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
+#endif
if (_M_thousands_sep == L'\0')
_M_grouping = "";
else
diff -urN gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/time_members.cc gcc-3.3.1/libstdc++-v3/config/locale/gnu/time_members.cc
--- gcc-3.3.1-old/libstdc++-v3/config/locale/gnu/time_members.cc 2003-02-28 00:09:52.000000000 -0600
+++ gcc-3.3.1/libstdc++-v3/config/locale/gnu/time_members.cc 2003-08-31 10:55:18.000000000 -0500
@@ -183,6 +183,7 @@
}
}
+#ifndef __UCLIBC__
#ifdef _GLIBCPP_USE_WCHAR_T
template<>
void
@@ -328,4 +329,5 @@
}
}
#endif
+#endif
}
diff -urN gcc-3.3.1-old/libstdc++-v3/config/os/gnu-linux/ctype_base.h gcc-3.3.1/libstdc++-v3/config/os/gnu-linux/ctype_base.h
--- gcc-3.3.1-old/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2002-09-09 15:26:41.000000000 -0500
+++ gcc-3.3.1/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2003-08-31 10:55:18.000000000 -0500
@@ -36,11 +36,18 @@
struct ctype_base
{
// Non-standard typedefs.
+#ifdef __UCLIBC__
+ typedef const __ctype_touplow_t* __to_type;
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef __ctype_mask_t mask;
+#else
typedef const int* __to_type;
-
// NB: Offsets into ctype<char>::_M_table force a particular size
// on the mask type. Because of this, we don't use an enum.
typedef unsigned short mask;
+#endif
+
static const mask upper = _ISupper;
static const mask lower = _ISlower;
static const mask alpha = _ISalpha;
diff -urN gcc-3.3.1-old/libstdc++-v3/include/c_std/std_cstdlib.h gcc-3.3.1/libstdc++-v3/include/c_std/std_cstdlib.h
--- gcc-3.3.1-old/libstdc++-v3/include/c_std/std_cstdlib.h 2003-04-18 05:08:05.000000000 -0500
+++ gcc-3.3.1/libstdc++-v3/include/c_std/std_cstdlib.h 2003-08-31 10:55:18.000000000 -0500
@@ -101,9 +101,11 @@
using ::labs;
using ::ldiv;
using ::malloc;
+#if _GLIBCPP_USE_WCHAR_T
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
+#endif
using ::qsort;
using ::rand;
using ::realloc;
@@ -112,8 +114,10 @@
using ::strtol;
using ::strtoul;
using ::system;
+#if _GLIBCPP_USE_WCHAR_T
using ::wcstombs;
using ::wctomb;
+#endif
inline long
abs(long __i) { return labs(__i); }
diff -urN gcc-3.3.1-old/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.3.1/libstdc++-v3/include/c_std/std_cwchar.h
--- gcc-3.3.1-old/libstdc++-v3/include/c_std/std_cwchar.h 2003-04-18 05:08:05.000000000 -0500
+++ gcc-3.3.1/libstdc++-v3/include/c_std/std_cwchar.h 2003-08-31 10:55:18.000000000 -0500
@@ -165,7 +165,9 @@
using ::wcscoll;
using ::wcscpy;
using ::wcscspn;
+#ifdef HAVE_WCSFTIME
using ::wcsftime;
+#endif
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
diff -urN gcc-3.3.2-old/libstdc++-v3/config/locale/gnu/ctype_members.cc gcc-3.3.2/libstdc++-v3/config/locale/gnu/ctype_members.cc
--- gcc-3.3.2-old/libstdc++-v3/config/locale/gnu/ctype_members.cc 2003-10-07 03:40:58.000000000 -0500
+++ gcc-3.3.2/libstdc++-v3/config/locale/gnu/ctype_members.cc 2003-11-10 14:21:45.000000000 -0600
@@ -36,6 +36,14 @@
#include <locale>
#include <bits/c++locale_internal.h>
+#ifdef __UCLIBC_HAS_XLOCALE__
+struct __uclibc_locale_struct_header {
+ const __ctype_mask_t *__ctype_b;
+ const __ctype_touplow_t *__ctype_tolower;
+ const __ctype_touplow_t *__ctype_toupper;
+};
+#endif
+
namespace std
{
// NB: The other ctype<char> specializations are in src/locale.cc and
@@ -46,9 +54,9 @@
{
_S_destroy_c_locale(_M_c_locale_ctype);
_S_create_c_locale(_M_c_locale_ctype, __s);
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = _M_c_locale_ctype->__ctype_b;
+ _M_toupper = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_toupper;
+ _M_tolower = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_tolower;
+ _M_table = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_b;
}
#ifdef _GLIBCPP_USE_WCHAR_T
diff -urN gcc-3.3.2-old/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h gcc-3.3.2/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h
--- gcc-3.3.2-old/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h 2002-10-08 18:32:22.000000000 -0500
+++ gcc-3.3.2/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h 2003-11-10 14:20:37.000000000 -0600
@@ -35,11 +35,21 @@
// Information as gleaned from /usr/include/ctype.h
#if _GLIBCPP_C_LOCALE_GNU
+#ifdef __UCLIBC_HAS_XLOCALE__
+struct __uclibc_locale_struct_header {
+ const __ctype_mask_t *__ctype_b;
+ const __ctype_touplow_t *__ctype_tolower;
+ const __ctype_touplow_t *__ctype_toupper;
+};
+#endif
+#endif
+
+#if _GLIBCPP_C_LOCALE_GNU
const ctype_base::mask*
ctype<char>::classic_table() throw()
{
locale::classic();
- return _S_c_locale->__ctype_b;
+ return ((struct __uclibc_locale_struct_header *)_S_c_locale)->__ctype_b;
}
#else
const ctype_base::mask*
@@ -65,9 +75,9 @@
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
{
_M_c_locale_ctype = _S_clone_c_locale(__cloc);
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
+ _M_toupper = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_toupper;
+ _M_tolower = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_tolower;
+ _M_table = __table ? __table : ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_b;
}
#else
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
@@ -96,9 +106,9 @@
__ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
{
_M_c_locale_ctype = _S_c_locale;
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
+ _M_toupper = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_toupper;
+ _M_tolower = ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_tolower;
+ _M_table = __table ? __table : ((struct __uclibc_locale_struct_header *)_M_c_locale_ctype)->__ctype_b;
}
#else
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :

View file

@ -1,14 +0,0 @@
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

View file

@ -1,14 +0,0 @@
--- 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)