finally move buildroot-ng to trunk
This commit is contained in:
54
toolchain/Config.in
Normal file
54
toolchain/Config.in
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
config NATIVE_TOOLCHAIN
|
||||
bool
|
||||
prompt "Use host's toolchain" if DEVEL && BROKEN
|
||||
default n
|
||||
help
|
||||
If enabled, OpenWrt will compile using your existing toolchain instead of compiling one
|
||||
|
||||
menuconfig TOOLCHAINOPTS
|
||||
bool "Toolchain Options" if DEVEL
|
||||
depends !NATIVE_TOOLCHAIN
|
||||
|
||||
source "toolchain/binutils/Config.in"
|
||||
source "toolchain/gcc/Config.in"
|
||||
|
||||
config GDB
|
||||
bool
|
||||
prompt "Build gdb" if TOOLCHAINOPTS
|
||||
default n
|
||||
help
|
||||
Enable if you want to build the gdb
|
||||
|
||||
config LARGEFILE
|
||||
bool
|
||||
prompt "Enable large file (files > 2 GB) support?" if TOOLCHAINOPTS
|
||||
depends on !cris
|
||||
default y
|
||||
help
|
||||
Enable large file (files > 2 GB) support
|
||||
|
||||
config SOFT_FLOAT
|
||||
bool
|
||||
prompt "Use software floating point by default" if TOOLCHAINOPTS
|
||||
default n
|
||||
depends on arm || mips || powerpc
|
||||
help
|
||||
If your target CPU does not have a Floating Point Unit (FPU) or a
|
||||
kernel FPU emulator, but you still wish to support floating point
|
||||
functions, then everything will need to be compiled with soft floating
|
||||
point support (-msoft-float).
|
||||
|
||||
Most people will answer N.
|
||||
|
||||
config TARGET_OPTIMIZATION
|
||||
string
|
||||
prompt "Target Optimizations" if TOOLCHAINOPTS
|
||||
default "-Os -pipe -march=i486 -funit-at-a-time" if i386
|
||||
default "-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" if mipsel || mips
|
||||
default "-Os -pipe -mcpu=xscale -funit-at-a-time" if armeb
|
||||
default "-Os -pipe -funit-at-a-time"
|
||||
help
|
||||
Optimizations to use when building for the target host.
|
||||
|
||||
source "toolchain/gcc/Config.version"
|
||||
72
toolchain/Makefile
Normal file
72
toolchain/Makefile
Normal file
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Main makefile for the toolchain
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
TARGETS-y:=kernel-headers libnotimpl
|
||||
TARGETS-$(CONFIG_GDB) += gdb
|
||||
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
|
||||
TARGETS-y+=binutils gcc uClibc
|
||||
endif
|
||||
|
||||
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
|
||||
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
|
||||
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
|
||||
|
||||
all: install
|
||||
download: $(TARGETS_DOWNLOAD)
|
||||
install: $(TARGETS_INSTALL)
|
||||
clean: $(TARGETS_CLEAN)
|
||||
$(TARGETS_INSTALL): $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
|
||||
|
||||
uClibc-prepare: kernel-headers-prepare
|
||||
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
|
||||
binutils-prepare: uClibc-prepare
|
||||
gcc-prepare: binutils-install
|
||||
uClibc-compile: gcc-compile
|
||||
libnotimpl-compile: gcc-install
|
||||
endif
|
||||
gcc-install: uClibc-install
|
||||
|
||||
TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles
|
||||
|
||||
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME):
|
||||
@mkdir -p $@
|
||||
@ln -sf ../lib $@/lib
|
||||
|
||||
$(TOOLCHAIN_STAMP_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
$(TOOLCHAIN_BUILD_DIR):
|
||||
@mkdir -p $@
|
||||
|
||||
%-download: FORCE
|
||||
$(MAKE) -C $(patsubst %-download,%,$@) download
|
||||
|
||||
%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) $(TOOLCHAIN_BUILD_DIR) FORCE
|
||||
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
|
||||
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
|
||||
}
|
||||
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
|
||||
|
||||
%-compile: %-prepare
|
||||
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
|
||||
$(MAKE) -C $(patsubst %-compile,%,$@) compile; \
|
||||
}
|
||||
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
|
||||
|
||||
%-install: %-compile
|
||||
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
|
||||
$(MAKE) -C $(patsubst %-install,%,$@) install; \
|
||||
}
|
||||
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
|
||||
|
||||
%-clean: FORCE
|
||||
@$(MAKE) -C $(patsubst %-clean,%,$@) clean
|
||||
@rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-*
|
||||
|
||||
24
toolchain/binutils/Config.in
Normal file
24
toolchain/binutils/Config.in
Normal file
@@ -0,0 +1,24 @@
|
||||
# Choose binutils version.
|
||||
|
||||
choice
|
||||
prompt "Binutils Version" if TOOLCHAINOPTS
|
||||
default BINUTILS_VERSION_2_16_1
|
||||
help
|
||||
Select the version of binutils you wish to use.
|
||||
|
||||
config BINUTILS_VERSION_2_16_1
|
||||
bool "binutils 2.16.1"
|
||||
|
||||
config BINUTILS_VERSION_2_17
|
||||
bool "binutils 2.17"
|
||||
|
||||
endchoice
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
prompt "Binutils Version" if (TOOLCHAINOPTS && NULL)
|
||||
default "2.16.1" if BINUTILS_VERSION_2_16_1
|
||||
default "2.17" if BINUTILS_VERSION_2_17
|
||||
default "2.16.1"
|
||||
|
||||
|
||||
54
toolchain/binutils/Makefile
Normal file
54
toolchain/binutils/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=binutils
|
||||
PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#"))
|
||||
|
||||
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
|
||||
ftp://gatekeeper.dec.com/pub/GNU/ \
|
||||
ftp://ftp.uu.net/archive/systems/gnu/ \
|
||||
ftp://ftp.eu.uu.net/pub/gnu/ \
|
||||
ftp://ftp.funet.fi/pub/gnu/prep/ \
|
||||
ftp://ftp.leo.org/pub/comp/os/unix/gnu/
|
||||
|
||||
PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
|
||||
PKG_MD5SUM:=unknown
|
||||
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_CAT:=bzcat
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
if [ -d ./patches/$(PKG_VERSION) ]; then \
|
||||
$(SCRIPT_DIR)/patch-kernel.sh $(PKG_BUILD_DIR) ./patches/$(PKG_VERSION); \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); \
|
||||
./configure \
|
||||
--prefix=$(STAGING_DIR) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--disable-werror \
|
||||
--disable-nls \
|
||||
);
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) all
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) install
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
586
toolchain/binutils/patches/2.16.1/100-uclibc-conf.patch
Normal file
586
toolchain/binutils/patches/2.16.1/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,586 @@
|
||||
diff -ur binutils-2.15.97.orig/bfd/config.bfd binutils-2.15.97/bfd/config.bfd
|
||||
--- binutils-2.15.97.orig/bfd/config.bfd 2005-04-29 20:48:14.000000000 -0400
|
||||
+++ binutils-2.15.97/bfd/config.bfd 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -140,7 +140,7 @@
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=bfd_elf64_alpha_vec
|
||||
;;
|
||||
- alpha*-*-linux-gnu* | alpha*-*-elf*)
|
||||
+ alpha*-*-linux-* | alpha*-*-elf*)
|
||||
targ_defvec=bfd_elf64_alpha_vec
|
||||
targ_selvecs=ecoffalpha_little_vec
|
||||
;;
|
||||
@@ -150,7 +150,7 @@
|
||||
alpha*-*-*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
;;
|
||||
- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
|
||||
+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
|
||||
targ_defvec=bfd_elf64_ia64_little_vec
|
||||
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
|
||||
;;
|
||||
@@ -227,7 +227,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- armeb-*-elf | arm*b-*-linux-gnu*)
|
||||
+ armeb-*-elf | arm*b-*-linux-*)
|
||||
targ_defvec=bfd_elf32_bigarm_vec
|
||||
targ_selvecs=bfd_elf32_littlearm_vec
|
||||
;;
|
||||
@@ -235,7 +235,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
|
||||
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
|
||||
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
|
||||
arm*-*-eabi* )
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
@@ -385,7 +385,7 @@
|
||||
;;
|
||||
|
||||
#ifdef BFD64
|
||||
- hppa*64*-*-linux-gnu*)
|
||||
+ hppa*64*-*-linux-*)
|
||||
targ_defvec=bfd_elf64_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf64_hppa_vec
|
||||
;;
|
||||
@@ -396,7 +396,7 @@
|
||||
;;
|
||||
#endif
|
||||
|
||||
- hppa*-*-linux-gnu*)
|
||||
+ hppa*-*-linux-*)
|
||||
targ_defvec=bfd_elf32_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf32_hppa_vec
|
||||
;;
|
||||
@@ -529,7 +529,7 @@
|
||||
targ_selvecs=bfd_elf32_i386_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
|
||||
targ64_selvecs=bfd_elf64_x86_64_vec
|
||||
@@ -543,7 +543,7 @@
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
- x86_64-*-linux-gnu*)
|
||||
+ x86_64-*-linux-*)
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
@@ -719,7 +719,7 @@
|
||||
targ_selvecs=bfd_elf32_m68k_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-*)
|
||||
targ_defvec=bfd_elf32_m68k_vec
|
||||
targ_selvecs=m68klinux_vec
|
||||
;;
|
||||
@@ -1005,7 +1005,7 @@
|
||||
;;
|
||||
#endif
|
||||
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
|
||||
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
|
||||
+ powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
|
||||
powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
|
||||
targ_defvec=bfd_elf32_powerpc_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
|
||||
@@ -1042,7 +1042,7 @@
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
;;
|
||||
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
|
||||
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
|
||||
+ powerpcle-*-solaris2* | powerpcle-*-linux-* | powerpcle-*-vxworks* |\
|
||||
powerpcle-*-rtems*)
|
||||
targ_defvec=bfd_elf32_powerpcle_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
@@ -1213,7 +1213,7 @@
|
||||
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc-*-linux-gnu*)
|
||||
+ sparc-*-linux-*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1260,7 +1260,7 @@
|
||||
targ_defvec=sunos_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc64-*-linux-gnu*)
|
||||
+ sparc64-*-linux-*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1329,7 +1329,7 @@
|
||||
targ_underscore=yes
|
||||
;;
|
||||
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
targ_defvec=bfd_elf32_vax_vec
|
||||
;;
|
||||
|
||||
diff -ur binutils-2.15.97.orig/bfd/configure binutils-2.15.97/bfd/configure
|
||||
--- binutils-2.15.97.orig/bfd/configure 2005-04-29 20:48:14.000000000 -0400
|
||||
+++ binutils-2.15.97/bfd/configure 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -9918,7 +9918,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -9982,7 +9982,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
;;
|
||||
@@ -10020,7 +10020,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -10154,7 +10154,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
diff -ur binutils-2.15.97.orig/bfd/configure.in binutils-2.15.97/bfd/configure.in
|
||||
--- binutils-2.15.97.orig/bfd/configure.in 2005-04-29 20:48:14.000000000 -0400
|
||||
+++ binutils-2.15.97/bfd/configure.in 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -163,7 +163,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -248,7 +248,7 @@
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
changequote(,)dnl
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
@@ -289,7 +289,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -375,7 +375,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
diff -ur binutils-2.15.97.orig/gas/configure binutils-2.15.97/gas/configure
|
||||
--- binutils-2.15.97.orig/gas/configure 2005-04-29 20:48:14.000000000 -0400
|
||||
+++ binutils-2.15.97/gas/configure 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -4462,7 +4462,7 @@
|
||||
_ACEOF
|
||||
|
||||
;;
|
||||
- ppc-*-linux-gnu*)
|
||||
+ ppc-*-linux-*)
|
||||
case "$endian" in
|
||||
big) ;;
|
||||
*) { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5
|
||||
diff -ur binutils-2.15.97.orig/gas/configure.in binutils-2.15.97/gas/configure.in
|
||||
--- binutils-2.15.97.orig/gas/configure.in 2005-04-29 20:48:14.000000000 -0400
|
||||
+++ binutils-2.15.97/gas/configure.in 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -161,7 +161,7 @@
|
||||
AC_DEFINE(AIX_WEAK_SUPPORT, 1,
|
||||
[Define if using AIX 5.2 value for C_WEAKEXT.])
|
||||
;;
|
||||
- ppc-*-linux-gnu*)
|
||||
+ ppc-*-linux-*)
|
||||
case "$endian" in
|
||||
big) ;;
|
||||
*) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
|
||||
diff -ur binutils-2.15.97.orig/gas/configure.tgt binutils-2.15.97/gas/configure.tgt
|
||||
--- binutils-2.15.97.orig/gas/configure.tgt 2005-04-29 20:48:14.000000000 -0400
|
||||
+++ binutils-2.15.97/gas/configure.tgt 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -100,7 +100,7 @@
|
||||
alpha-*-*vms*) fmt=evax ;;
|
||||
alpha-*-osf*) fmt=ecoff ;;
|
||||
alpha-*-linuxecoff*) fmt=ecoff ;;
|
||||
- alpha-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ alpha-*-linux-*) fmt=elf em=linux ;;
|
||||
alpha-*-netbsd*) fmt=elf em=nbsd ;;
|
||||
alpha-*-openbsd*) fmt=elf em=obsd ;;
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
arm-*-conix*) fmt=elf ;;
|
||||
arm-*-linux*aout*) fmt=aout em=linux ;;
|
||||
arm-*-linux-gnueabi*) fmt=elf em=armlinuxeabi ;;
|
||||
- arm-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ arm-*-linux-*) fmt=elf em=linux ;;
|
||||
arm-*-uclinux*) fmt=elf em=linux ;;
|
||||
arm-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
arm-*-*n*bsd*) fmt=aout em=nbsd ;;
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
avr-*-*) fmt=elf ;;
|
||||
|
||||
- cris-*-linux-gnu* | crisv32-*-linux-gnu*)
|
||||
+ cris-*-linux-* | crisv32-*-linux-*)
|
||||
fmt=multi bfd_gas=yes em=linux ;;
|
||||
cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;;
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
i386-*-linux*aout*) fmt=aout em=linux ;;
|
||||
i386-*-linux*oldld) fmt=aout em=linux ;;
|
||||
i386-*-linux*coff*) fmt=coff em=linux ;;
|
||||
- i386-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ i386-*-linux-*) fmt=elf em=linux ;;
|
||||
i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;;
|
||||
i386-*-sysv[45]*) fmt=elf ;;
|
||||
i386-*-solaris*) fmt=elf ;;
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
ia64-*-elf*) fmt=elf ;;
|
||||
ia64-*-aix*) fmt=elf em=ia64aix ;;
|
||||
- ia64-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ ia64-*-linux-*) fmt=elf em=linux ;;
|
||||
ia64-*-hpux*) fmt=elf em=hpux ;;
|
||||
ia64-*-netbsd*) fmt=elf em=nbsd ;;
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
m68k-*-rtems*) fmt=elf ;;
|
||||
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
|
||||
m68k-*-linux*aout*) fmt=aout em=linux ;;
|
||||
- m68k-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ m68k-*-linux-*) fmt=elf em=linux ;;
|
||||
m68k-*-uclinux*) fmt=elf ;;
|
||||
m68k-*-gnu*) fmt=elf ;;
|
||||
m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
@@ -332,7 +332,7 @@
|
||||
ppc-*-beos*) fmt=coff ;;
|
||||
ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
|
||||
ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
|
||||
- ppc-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ ppc-*-linux-*) fmt=elf em=linux ;;
|
||||
ppc-*-solaris*) fmt=elf ;;
|
||||
ppc-*-rtems*) fmt=elf ;;
|
||||
ppc-*-macos*) fmt=coff em=macos ;;
|
||||
@@ -340,7 +340,7 @@
|
||||
ppc-*-kaos*) fmt=elf ;;
|
||||
ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;;
|
||||
|
||||
- s390-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ s390-*-linux-*) fmt=elf em=linux ;;
|
||||
s390-*-tpf*) fmt=elf ;;
|
||||
|
||||
sh*-*-linux*) fmt=elf em=linux
|
||||
@@ -369,7 +369,7 @@
|
||||
sparc-*-aout | sparc*-*-vxworks*) fmt=aout em=sparcaout ;;
|
||||
sparc-*-coff) fmt=coff ;;
|
||||
sparc-*-linux*aout*) fmt=aout em=linux ;;
|
||||
- sparc-*-linux-gnu*) fmt=elf em=linux ;;
|
||||
+ sparc-*-linux-*) fmt=elf em=linux ;;
|
||||
sparc-fujitsu-none) fmt=aout ;;
|
||||
sparc-*-elf) fmt=elf ;;
|
||||
sparc-*-sysv4*) fmt=elf ;;
|
||||
@@ -398,7 +398,7 @@
|
||||
vax-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
vax-*-netbsd*) fmt=aout em=nbsd ;;
|
||||
vax-*-bsd* | vax-*-ultrix*) fmt=aout ;;
|
||||
- vax-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
|
||||
+ vax-*-linux-*) fmt=elf em=linux bfd_gas=yes ;;
|
||||
|
||||
w65-*-*) fmt=coff ;;
|
||||
|
||||
diff -ur binutils-2.15.97.orig/ld/configure.host binutils-2.15.97/ld/configure.host
|
||||
--- binutils-2.15.97.orig/ld/configure.host 2005-04-29 20:48:15.000000000 -0400
|
||||
+++ binutils-2.15.97/ld/configure.host 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -83,7 +83,7 @@
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
|
||||
;;
|
||||
|
||||
-arm*-*-linux-gnu*)
|
||||
+arm*-*-linux-*)
|
||||
HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
|
||||
;;
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
|
||||
;;
|
||||
|
||||
-ia64-*-linux-gnu*)
|
||||
+ia64-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
|
||||
;;
|
||||
|
||||
@@ -155,11 +155,11 @@
|
||||
HOSTING_LIBS='-L/usr/lib32 '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
|
||||
;;
|
||||
|
||||
-mips*-*-linux-gnu*)
|
||||
+mips*-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
|
||||
;;
|
||||
|
||||
-m68*-*-linux-gnu*)
|
||||
+m68*-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
|
||||
;;
|
||||
|
||||
@@ -183,19 +183,19 @@
|
||||
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
|
||||
;;
|
||||
|
||||
-powerpc64*-*-linux-gnu*)
|
||||
+powerpc64*-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld64.so.1,"`
|
||||
;;
|
||||
|
||||
-powerpc*-*-linux-gnu*)
|
||||
+powerpc*-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
|
||||
;;
|
||||
|
||||
-s390x-*-linux-gnu*)
|
||||
+s390x-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld64.so.1,"`
|
||||
;;
|
||||
|
||||
-s390-*-linux-gnu*)
|
||||
+s390-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld.so.1,"`
|
||||
;;
|
||||
|
||||
@@ -209,15 +209,15 @@
|
||||
HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
|
||||
;;
|
||||
|
||||
-sparc-*-linux-gnu*)
|
||||
+sparc-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib/ld-linux.so.2,"`
|
||||
;;
|
||||
|
||||
-sparc64-*-linux-gnu*)
|
||||
+sparc64-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux.so.2,"`
|
||||
;;
|
||||
|
||||
-x86_64-*-linux-gnu*)
|
||||
+x86_64-*-linux-*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`specs.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
|
||||
;;
|
||||
|
||||
diff -ur binutils-2.15.97.orig/ld/configure.tgt binutils-2.15.97/ld/configure.tgt
|
||||
--- binutils-2.15.97.orig/ld/configure.tgt 2005-04-29 20:48:15.000000000 -0400
|
||||
+++ binutils-2.15.97/ld/configure.tgt 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -30,7 +30,7 @@
|
||||
cris-*-*aout*) targ_emul=crisaout
|
||||
targ_extra_emuls="criself crislinux"
|
||||
targ_extra_libpath=$targ_extra_emuls ;;
|
||||
-cris-*-linux-gnu* | cris-*-linux-gnu*)
|
||||
+cris-*-linux-* | crisv32-*-linux-*)
|
||||
targ_emul=crislinux ;;
|
||||
cris-*-* | crisv32-*-*) targ_emul=criself
|
||||
targ_extra_emuls="crisaout crislinux"
|
||||
@@ -62,14 +62,14 @@
|
||||
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
|
||||
tdir_sun4=sparc-sun-sunos4
|
||||
;;
|
||||
-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
|
||||
+sparc64-*-linux-*) targ_emul=elf64_sparc
|
||||
targ_extra_emuls="elf32_sparc sparclinux sun4"
|
||||
targ_extra_libpath=elf32_sparc
|
||||
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
|
||||
tdir_sparclinux=${tdir_elf32_sparc}aout
|
||||
tdir_sun4=sparc-sun-sunos4
|
||||
;;
|
||||
-sparc*-*-linux-gnu*) targ_emul=elf32_sparc
|
||||
+sparc*-*-linux-*) targ_emul=elf32_sparc
|
||||
targ_extra_emuls="sparclinux elf64_sparc sun4"
|
||||
targ_extra_libpath=elf64_sparc
|
||||
tdir_sparclinux=${targ_alias}aout
|
||||
@@ -119,8 +119,8 @@
|
||||
ia64-*-aix*) targ_emul=elf64_aix ;;
|
||||
m32r*le-*-elf*) targ_emul=m32rlelf ;;
|
||||
m32r*-*-elf*) targ_emul=m32relf ;;
|
||||
-m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
|
||||
-m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
|
||||
+m32r*le-*-linux-*) targ_emul=m32rlelf_linux ;;
|
||||
+m32r*-*-linux-*) targ_emul=m32relf_linux ;;
|
||||
m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
|
||||
targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
|
||||
m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
|
||||
@@ -131,7 +131,7 @@
|
||||
m68*-apple-aux*) targ_emul=m68kaux ;;
|
||||
maxq-*-coff) targ_emul=maxqcoff;;
|
||||
*-tandem-none) targ_emul=st2000 ;;
|
||||
-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
|
||||
+i370-*-elf* | i370-*-linux-*) targ_emul=elf32i370 ;;
|
||||
i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
|
||||
i[3-7]86-*-vsta) targ_emul=vsta ;;
|
||||
i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
|
||||
@@ -155,14 +155,14 @@
|
||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
|
||||
;;
|
||||
i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
|
||||
-i[3-7]86-*-linux-gnu*) targ_emul=elf_i386
|
||||
+i[3-7]86-*-linux-*) targ_emul=elf_i386
|
||||
targ_extra_emuls=i386linux
|
||||
if test x${want64} = xtrue; then
|
||||
targ_extra_emuls="$targ_extra_emuls elf_x86_64"
|
||||
fi
|
||||
tdir_i386linux=${targ_alias}aout
|
||||
;;
|
||||
-x86_64-*-linux-gnu*) targ_emul=elf_x86_64
|
||||
+x86_64-*-linux-*) targ_emul=elf_x86_64
|
||||
targ_extra_emuls="elf_i386 i386linux"
|
||||
targ_extra_libpath=elf_i386
|
||||
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
|
||||
@@ -262,13 +262,13 @@
|
||||
arm-*-kaos*) targ_emul=armelf ;;
|
||||
arm9e-*-elf) targ_emul=armelf ;;
|
||||
arm*b-*-linux-gnueabi) targ_emul=armelfb_linux_eabi ;;
|
||||
-arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
|
||||
+arm*b-*-linux-*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
|
||||
arm*-*-linux-gnueabi) targ_emul=armelf_linux_eabi ;;
|
||||
-arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
|
||||
+arm*-*-linux-*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
|
||||
arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
|
||||
arm-*-vxworks) targ_emul=armelf_vxworks ;;
|
||||
arm*-*-conix*) targ_emul=armelf ;;
|
||||
-thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
|
||||
+thumb-*-linux-* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
|
||||
strongarm-*-coff) targ_emul=armcoff ;;
|
||||
strongarm-*-elf) targ_emul=armelf ;;
|
||||
strongarm-*-kaos*) targ_emul=armelf ;;
|
||||
@@ -372,7 +372,7 @@
|
||||
targ_extra_emuls=m68kelf
|
||||
tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
|
||||
;;
|
||||
-m68k-*-linux-gnu*) targ_emul=m68kelf
|
||||
+m68k-*-linux-*) targ_emul=m68kelf
|
||||
targ_extra_emuls=m68klinux
|
||||
tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
|
||||
;;
|
||||
@@ -388,9 +388,9 @@
|
||||
m68*-*-psos*) targ_emul=m68kpsos ;;
|
||||
m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
|
||||
m68*-*-rtems*) targ_emul=m68kelf ;;
|
||||
-hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
|
||||
+hppa*64*-*-linux-*) targ_emul=hppa64linux ;;
|
||||
hppa*64*-*) targ_emul=elf64hppa ;;
|
||||
-hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
|
||||
+hppa*-*-linux-*) targ_emul=hppalinux ;;
|
||||
hppa*-*-*elf*) targ_emul=hppaelf ;;
|
||||
hppa*-*-lites*) targ_emul=hppaelf ;;
|
||||
hppa*-*-netbsd*) targ_emul=hppanbsd ;;
|
||||
@@ -402,7 +402,7 @@
|
||||
vax-*-netbsdaout* | vax-*-netbsd*)
|
||||
targ_emul=vaxnbsd
|
||||
targ_extra_emuls=elf32vax ;;
|
||||
-vax-*-linux-gnu*) targ_emul=elf32vax ;;
|
||||
+vax-*-linux-*) targ_emul=elf32vax ;;
|
||||
mips*-*-pe) targ_emul=mipspe ;
|
||||
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
|
||||
mips*-dec-ultrix*) targ_emul=mipslit ;;
|
||||
@@ -436,18 +436,18 @@
|
||||
mips*-*-vxworks*) targ_emul=elf32ebmip
|
||||
targ_extra_emuls="elf32elmip" ;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
|
||||
-mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
|
||||
+mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
targ_extra_libpath="elf32ltsmip elf64ltsmip"
|
||||
;;
|
||||
-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
|
||||
+mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
targ_extra_libpath="elf32btsmip elf64btsmip"
|
||||
;;
|
||||
-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
|
||||
+mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
|
||||
;;
|
||||
-mips*-*-linux-gnu*) targ_emul=elf32btsmip
|
||||
+mips*-*-linux-*) targ_emul=elf32btsmip
|
||||
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
|
||||
;;
|
||||
mips*-*-lnews*) targ_emul=mipslnews ;;
|
||||
@@ -467,7 +467,7 @@
|
||||
alpha*-*-linuxecoff*) targ_emul=alpha targ_extra_emuls=elf64alpha
|
||||
tdir_elf64alpha=`echo ${targ_alias} | sed -e 's/ecoff//'`
|
||||
;;
|
||||
-alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
|
||||
+alpha*-*-linux-*) targ_emul=elf64alpha targ_extra_emuls=alpha
|
||||
tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
|
||||
;;
|
||||
alpha*-*-osf*) targ_emul=alpha ;;
|
||||
diff -ur binutils-2.15.97.orig/ld/emultempl/elf32.em binutils-2.15.97/ld/emultempl/elf32.em
|
||||
--- binutils-2.15.97.orig/ld/emultempl/elf32.em 2005-04-29 20:48:15.000000000 -0400
|
||||
+++ binutils-2.15.97/ld/emultempl/elf32.em 2005-04-29 20:53:50.000000000 -0400
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
if [ "x${USE_LIBPATH}" = xyes ] ; then
|
||||
case ${target} in
|
||||
- *-*-linux-gnu*)
|
||||
+ *-*-linux-*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
#ifdef HAVE_GLOB
|
||||
#include <glob.h>
|
||||
@@ -350,7 +350,7 @@
|
||||
|
||||
EOF
|
||||
case ${target} in
|
||||
- *-*-linux-gnu*)
|
||||
+ *-*-linux-*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
{
|
||||
struct bfd_link_needed_list *l;
|
||||
@@ -522,7 +522,7 @@
|
||||
|
||||
EOF
|
||||
case ${target} in
|
||||
- *-*-linux-gnu*)
|
||||
+ *-*-linux-*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
/* For a native linker, check the file /etc/ld.so.conf for directories
|
||||
in which we may find shared libraries. /etc/ld.so.conf is really
|
||||
@@ -932,7 +932,7 @@
|
||||
EOF
|
||||
if [ "x${USE_LIBPATH}" = xyes ] ; then
|
||||
case ${target} in
|
||||
- *-*-linux-gnu*)
|
||||
+ *-*-linux-*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
|
||||
break;
|
||||
218
toolchain/binutils/patches/2.16.1/110-uclibc-libtool-conf.patch
Normal file
218
toolchain/binutils/patches/2.16.1/110-uclibc-libtool-conf.patch
Normal file
@@ -0,0 +1,218 @@
|
||||
diff -urN binutils-2.16.90.0.2-dist/bfd/configure binutils-2.16.90.0.2/bfd/configure
|
||||
--- binutils-2.16.90.0.2-dist/bfd/configure 2005-04-29 12:50:24.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/bfd/configure 2005-04-30 11:34:59.246377032 -0500
|
||||
@@ -3584,6 +3584,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN binutils-2.16.90.0.2-dist/binutils/configure binutils-2.16.90.0.2/binutils/configure
|
||||
--- binutils-2.16.90.0.2-dist/binutils/configure 2005-04-29 12:50:26.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/binutils/configure 2005-04-30 11:35:28.900868864 -0500
|
||||
@@ -1577,6 +1577,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN binutils-2.16.90.0.2-dist/configure binutils-2.16.90.0.2/configure
|
||||
--- binutils-2.16.90.0.2-dist/configure 2005-04-29 12:50:23.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/configure 2005-04-30 11:31:12.525843792 -0500
|
||||
@@ -1111,7 +1111,7 @@
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
diff -urN binutils-2.16.90.0.2-dist/configure.in binutils-2.16.90.0.2/configure.in
|
||||
--- binutils-2.16.90.0.2-dist/configure.in 2005-04-29 12:50:23.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/configure.in 2005-04-30 11:29:51.643139832 -0500
|
||||
@@ -328,7 +328,7 @@
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
diff -urN binutils-2.16.90.0.2-dist/gas/configure binutils-2.16.90.0.2/gas/configure
|
||||
--- binutils-2.16.90.0.2-dist/gas/configure 2005-04-29 12:50:27.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/gas/configure 2005-04-30 11:35:21.097055224 -0500
|
||||
@@ -3421,6 +3421,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN binutils-2.16.90.0.2-dist/gas/testsuite/gas/sh/basic.exp binutils-2.16.90.0.2/gas/testsuite/gas/sh/basic.exp
|
||||
--- binutils-2.16.90.0.2-dist/gas/testsuite/gas/sh/basic.exp 2005-04-09 14:03:14.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/gas/testsuite/gas/sh/basic.exp 2005-04-30 11:41:57.301822944 -0500
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
# Written by Cygnus Support.
|
||||
|
||||
-if [istarget "sh*-*-linux-gnu"] {
|
||||
+if {[istarget "sh*-*-linux-gnu"] || [istarget "sh*-*-linux-uclibc"]} {
|
||||
global ASFLAGS
|
||||
set ASFLAGS "$ASFLAGS -big"
|
||||
}
|
||||
diff -urN binutils-2.16.90.0.2-dist/gprof/configure binutils-2.16.90.0.2/gprof/configure
|
||||
--- binutils-2.16.90.0.2-dist/gprof/configure 2005-04-29 12:50:29.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/gprof/configure 2005-04-30 11:35:36.880655752 -0500
|
||||
@@ -3419,6 +3419,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN binutils-2.16.90.0.2-dist/ld/configure binutils-2.16.90.0.2/ld/configure
|
||||
--- binutils-2.16.90.0.2-dist/ld/configure 2005-04-29 12:50:30.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/ld/configure 2005-04-30 11:46:15.974498720 -0500
|
||||
@@ -1581,6 +1581,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN binutils-2.16.90.0.2-dist/ld/testsuite/ld-sh/sh.exp binutils-2.16.90.0.2/ld/testsuite/ld-sh/sh.exp
|
||||
--- binutils-2.16.90.0.2-dist/ld/testsuite/ld-sh/sh.exp 2005-04-09 14:03:29.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/ld/testsuite/ld-sh/sh.exp 2005-04-30 11:45:07.890849008 -0500
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
set testsrec "SH relaxing to S-records"
|
||||
|
||||
-if [istarget sh*-linux-gnu] {
|
||||
+if {[istarget sh*-linux-gnu] || [istarget sh*-*-linux-uclibc]} {
|
||||
# This target needs the explicit entry address.
|
||||
catch "exec $objdump -x tmpdir/sh1 | grep start\\ address | sed s/start\\ address//" entry_addr
|
||||
set srec_relax_arg "-Ttext $entry_addr -relax --oformat srec tmpdir/sh1.o"
|
||||
@@ -117,7 +117,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
-if [istarget sh*-linux-gnu] {
|
||||
+if {[istarget sh*-linux-gnu] || [istarget sh*-*-linux-uclibc]} {
|
||||
exec sed -e s/_main/main/ -e s/_trap/trap/ -e s/_stack/stack/ \
|
||||
< $srcdir/$subdir/start.s >tmpdir/start.s
|
||||
} else {
|
||||
diff -urN binutils-2.16.90.0.2-dist/ld/testsuite/ld-srec/srec.exp binutils-2.16.90.0.2/ld/testsuite/ld-srec/srec.exp
|
||||
--- binutils-2.16.90.0.2-dist/ld/testsuite/ld-srec/srec.exp 2005-04-29 12:50:30.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/ld/testsuite/ld-srec/srec.exp 2005-04-30 11:44:26.358162936 -0500
|
||||
@@ -385,7 +385,7 @@
|
||||
setup_xfail "v850*-*-elf"
|
||||
|
||||
# The S-record linker doesn't handle Alpha Elf relaxation.
|
||||
-setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*"
|
||||
+setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*" "alpha*-*-linux-uclibc*"
|
||||
setup_xfail "alpha*-*-netbsd*"
|
||||
|
||||
# The S-record linker hasn't any hope of coping with HPPA relocs.
|
||||
@@ -424,7 +424,7 @@
|
||||
setup_xfail "thumb-*-*"
|
||||
setup_xfail "powerpc*-*-eabi*"
|
||||
setup_xfail "v850*-*-elf"
|
||||
-setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*"
|
||||
+setup_xfail "alpha*-*-elf*" "alpha*-*-linux-gnu*" "alpha*-*-gnu*" "alpha*-*-linux-uclibc*"
|
||||
setup_xfail "alpha*-*-netbsd*"
|
||||
setup_xfail "hppa*-*-*"
|
||||
setup_xfail "ia64-*-*"
|
||||
diff -urN binutils-2.16.90.0.2-dist/libtool.m4 binutils-2.16.90.0.2/libtool.m4
|
||||
--- binutils-2.16.90.0.2-dist/libtool.m4 2004-07-27 23:36:06.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/libtool.m4 2005-04-30 11:35:54.062043784 -0500
|
||||
@@ -645,6 +645,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
diff -urN binutils-2.16.90.0.2-dist/ltconfig binutils-2.16.90.0.2/ltconfig
|
||||
--- binutils-2.16.90.0.2-dist/ltconfig 2004-11-22 14:33:30.000000000 -0600
|
||||
+++ binutils-2.16.90.0.2/ltconfig 2005-04-30 11:22:10.594229920 -0500
|
||||
@@ -602,6 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1270,6 +1271,23 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
diff -urN binutils-2.16.90.0.2-dist/opcodes/configure binutils-2.16.90.0.2/opcodes/configure
|
||||
--- binutils-2.16.90.0.2-dist/opcodes/configure 2005-04-29 12:50:31.000000000 -0500
|
||||
+++ binutils-2.16.90.0.2/opcodes/configure 2005-04-30 11:17:07.168357664 -0500
|
||||
@@ -3588,6 +3588,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh -e
|
||||
## 001_ld_makefile_patch.dpatch
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Description: correct where ld scripts are installed
|
||||
## DP: Author: Chris Chimelis <chris@debian.org>
|
||||
## DP: Upstream status: N/A
|
||||
## DP: Date: ??
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am
|
||||
--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100
|
||||
+++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100
|
||||
@@ -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@
|
||||
diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in
|
||||
--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100
|
||||
+++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100
|
||||
@@ -128,7 +128,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@
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh -e
|
||||
## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Specify which filename is causing an error if the filename is a
|
||||
## DP: directory. (#45832)
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
|
||||
--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
|
||||
+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
|
||||
@@ -150,6 +150,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)
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh -e
|
||||
## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
|
||||
## DP: cases where -rpath isn't specified. (#151024)
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
|
||||
--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
|
||||
+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
|
||||
@@ -692,6 +692,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, &n,
|
||||
force))
|
||||
break;
|
||||
@@ -871,6 +873,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_size_dynamic_sections
|
||||
(output_bfd, command_line.soname, rpath,
|
||||
command_line.filter_shlib,
|
||||
@@ -0,0 +1,93 @@
|
||||
Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
|
||||
Fixes
|
||||
localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
|
||||
when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
|
||||
|
||||
Paths adjusted to match crosstool's patcher.
|
||||
|
||||
Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
|
||||
From: Andreas Schwab <schwab at suse dot de>
|
||||
To: Nathan Sidwell <nathan at codesourcery dot com>
|
||||
Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
|
||||
Date: Fri, 23 Apr 2004 22:27:19 +0200
|
||||
Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
|
||||
|
||||
Nathan Sidwell <nathan@codesourcery.com> writes:
|
||||
|
||||
> Index: read.c
|
||||
> ===================================================================
|
||||
> RCS file: /cvs/src/src/gas/read.c,v
|
||||
> retrieving revision 1.76
|
||||
> diff -c -3 -p -r1.76 read.c
|
||||
> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
|
||||
> --- read.c 18 Mar 2004 09:56:05 -0000
|
||||
> *************** read_a_source_file (char *name)
|
||||
> *** 1053,1059 ****
|
||||
> #endif
|
||||
> input_line_pointer--;
|
||||
> /* Report unknown char as ignored. */
|
||||
> ! ignore_rest_of_line ();
|
||||
> }
|
||||
>
|
||||
> #ifdef md_after_pass_hook
|
||||
> --- 1053,1059 ----
|
||||
> #endif
|
||||
> input_line_pointer--;
|
||||
> /* Report unknown char as ignored. */
|
||||
> ! demand_empty_rest_of_line ();
|
||||
> }
|
||||
>
|
||||
> #ifdef md_after_pass_hook
|
||||
|
||||
This means that the unknown character is no longer ignored, despite the
|
||||
comment. As a side effect a line starting with a line comment character
|
||||
not followed by APP in NO_APP mode now triggers an error instead of just a
|
||||
warning, breaking builds of glibc on m68k-linux. Earlier in
|
||||
read_a_source_file where #APP is handled there is another comment that
|
||||
claims that unknown comments are ignored, when in fact they aren't (only
|
||||
the initial line comment character is skipped).
|
||||
|
||||
Note that the presence of #APP will mess up the line counters, but
|
||||
that appears to be difficult to fix.
|
||||
|
||||
Andreas.
|
||||
|
||||
2004-04-23 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* read.c (read_a_source_file): Ignore unknown text after line
|
||||
comment character. Fix misleading comment.
|
||||
|
||||
--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
|
||||
+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
|
||||
@@ -950,10 +950,14 @@ read_a_source_file (char *name)
|
||||
unsigned int new_length;
|
||||
char *tmp_buf = 0;
|
||||
|
||||
- bump_line_counters ();
|
||||
s = input_line_pointer;
|
||||
if (strncmp (s, "APP\n", 4))
|
||||
- continue; /* We ignore it */
|
||||
+ {
|
||||
+ /* We ignore it */
|
||||
+ ignore_rest_of_line ();
|
||||
+ continue;
|
||||
+ }
|
||||
+ bump_line_counters ();
|
||||
s += 4;
|
||||
|
||||
sb_new (&sbuf);
|
||||
@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
|
||||
continue;
|
||||
#endif
|
||||
input_line_pointer--;
|
||||
- /* Report unknown char as ignored. */
|
||||
+ /* Report unknown char as error. */
|
||||
demand_empty_rest_of_line ();
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
Andreas Schwab, SuSE Labs, schwab@suse.de
|
||||
SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
|
||||
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
|
||||
"And now for something completely different."
|
||||
139
toolchain/binutils/patches/2.17/100-uclibc-conf.patch
Normal file
139
toolchain/binutils/patches/2.17/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,139 @@
|
||||
--- binutils-2.16.91.0.7/bfd/configure
|
||||
+++ binutils-2.16.91.0.7/bfd/configure
|
||||
@@ -3576,7 +3576,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux-gnu*|linux-uclibc*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- binutils-2.16.91.0.7/binutils/configure
|
||||
+++ binutils-2.16.91.0.7/binutils/configure
|
||||
@@ -3411,7 +3411,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux-gnu*|linux-uclibc*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- binutils-2.16.91.0.7/configure
|
||||
+++ binutils-2.16.91.0.7/configure
|
||||
@@ -1270,7 +1270,7 @@
|
||||
am33_2.0-*-linux*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
|
||||
;;
|
||||
- sh-*-linux*)
|
||||
+ sh*-*-linux*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
|
||||
;;
|
||||
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
|
||||
@@ -1578,7 +1578,7 @@
|
||||
romp-*-*)
|
||||
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
|
||||
;;
|
||||
- sh-*-* | sh64-*-*)
|
||||
+ sh*-*-* | sh64-*-*)
|
||||
case "${host}" in
|
||||
i[3456789]86-*-vsta) ;; # don't add gprof back in
|
||||
i[3456789]86-*-go32*) ;; # don't add gprof back in
|
||||
--- binutils-2.16.91.0.7/configure.in
|
||||
+++ binutils-2.16.91.0.7/configure.in
|
||||
@@ -468,7 +468,7 @@
|
||||
am33_2.0-*-linux*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
|
||||
;;
|
||||
- sh-*-linux*)
|
||||
+ sh*-*-linux*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
|
||||
;;
|
||||
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
|
||||
@@ -776,7 +776,7 @@
|
||||
romp-*-*)
|
||||
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
|
||||
;;
|
||||
- sh-*-* | sh64-*-*)
|
||||
+ sh*-*-* | sh64-*-*)
|
||||
case "${host}" in
|
||||
i[[3456789]]86-*-vsta) ;; # don't add gprof back in
|
||||
i[[3456789]]86-*-go32*) ;; # don't add gprof back in
|
||||
--- binutils-2.16.91.0.7/gas/configure
|
||||
+++ binutils-2.16.91.0.7/gas/configure
|
||||
@@ -3411,7 +3411,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux-gnu*|linux-uclibc*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- binutils-2.16.91.0.7/gprof/configure
|
||||
+++ binutils-2.16.91.0.7/gprof/configure
|
||||
@@ -3419,6 +3419,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- binutils-2.16.91.0.7/ld/configure
|
||||
+++ binutils-2.16.91.0.7/ld/configure
|
||||
@@ -3413,7 +3413,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux-gnu*|linux-uclibc*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- binutils-2.16.91.0.7/libtool.m4
|
||||
+++ binutils-2.16.91.0.7/libtool.m4
|
||||
@@ -739,7 +739,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux-gnu*|linux-uclibc*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- binutils-2.16.91.0.7/ltconfig
|
||||
+++ binutils-2.16.91.0.7/ltconfig
|
||||
@@ -602,6 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1247,7 +1248,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux-gnu*|linux-uclibc*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- binutils-2.16.91.0.7/opcodes/configure
|
||||
+++ binutils-2.16.91.0.7/opcodes/configure
|
||||
@@ -3579,7 +3579,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux-gnu*|linux-uclibc*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
24
toolchain/binutils/patches/2.17/110-arm-eabi-conf.patch
Normal file
24
toolchain/binutils/patches/2.17/110-arm-eabi-conf.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
|
||||
--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
|
||||
+++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
|
||||
@@ -1299,7 +1299,7 @@
|
||||
arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
;;
|
||||
- arm*-*-linux-gnueabi)
|
||||
+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
noconfigdirs="$noconfigdirs target-libjava target-libobjc"
|
||||
;;
|
||||
diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
|
||||
--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
|
||||
+++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
|
||||
@@ -497,7 +497,7 @@
|
||||
arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
;;
|
||||
- arm*-*-linux-gnueabi)
|
||||
+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
noconfigdirs="$noconfigdirs target-libjava target-libobjc"
|
||||
;;
|
||||
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh -e
|
||||
## 001_ld_makefile_patch.dpatch
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Description: correct where ld scripts are installed
|
||||
## DP: Author: Chris Chimelis <chris@debian.org>
|
||||
## DP: Upstream status: N/A
|
||||
## DP: Date: ??
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
--- binutils-2.16.91.0.1/ld/Makefile.am
|
||||
+++ binutils-2.16.91.0.1/ld/Makefile.am
|
||||
@@ -20,7 +20,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.16.91.0.1/ld/Makefile.in
|
||||
+++ binutils-2.16.91.0.1/ld/Makefile.in
|
||||
@@ -268,7 +268,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)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh -e
|
||||
## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Specify which filename is causing an error if the filename is a
|
||||
## DP: directory. (#45832)
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
|
||||
--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
|
||||
+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
|
||||
@@ -150,6 +150,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)
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh -e
|
||||
## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
|
||||
## DP: cases where -rpath isn't specified. (#151024)
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
|
||||
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
|
||||
|
||||
case "$1" in
|
||||
-patch) patch $patch_opts -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@DPATCH@
|
||||
diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
|
||||
--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
|
||||
+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
|
||||
@@ -692,6 +692,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, &n,
|
||||
force))
|
||||
break;
|
||||
@@ -871,6 +873,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_size_dynamic_sections
|
||||
(output_bfd, command_line.soname, rpath,
|
||||
command_line.filter_shlib,
|
||||
@@ -0,0 +1,93 @@
|
||||
Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
|
||||
Fixes
|
||||
localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
|
||||
when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
|
||||
|
||||
Paths adjusted to match crosstool's patcher.
|
||||
|
||||
Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
|
||||
From: Andreas Schwab <schwab at suse dot de>
|
||||
To: Nathan Sidwell <nathan at codesourcery dot com>
|
||||
Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
|
||||
Date: Fri, 23 Apr 2004 22:27:19 +0200
|
||||
Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
|
||||
|
||||
Nathan Sidwell <nathan@codesourcery.com> writes:
|
||||
|
||||
> Index: read.c
|
||||
> ===================================================================
|
||||
> RCS file: /cvs/src/src/gas/read.c,v
|
||||
> retrieving revision 1.76
|
||||
> diff -c -3 -p -r1.76 read.c
|
||||
> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
|
||||
> --- read.c 18 Mar 2004 09:56:05 -0000
|
||||
> *************** read_a_source_file (char *name)
|
||||
> *** 1053,1059 ****
|
||||
> #endif
|
||||
> input_line_pointer--;
|
||||
> /* Report unknown char as ignored. */
|
||||
> ! ignore_rest_of_line ();
|
||||
> }
|
||||
>
|
||||
> #ifdef md_after_pass_hook
|
||||
> --- 1053,1059 ----
|
||||
> #endif
|
||||
> input_line_pointer--;
|
||||
> /* Report unknown char as ignored. */
|
||||
> ! demand_empty_rest_of_line ();
|
||||
> }
|
||||
>
|
||||
> #ifdef md_after_pass_hook
|
||||
|
||||
This means that the unknown character is no longer ignored, despite the
|
||||
comment. As a side effect a line starting with a line comment character
|
||||
not followed by APP in NO_APP mode now triggers an error instead of just a
|
||||
warning, breaking builds of glibc on m68k-linux. Earlier in
|
||||
read_a_source_file where #APP is handled there is another comment that
|
||||
claims that unknown comments are ignored, when in fact they aren't (only
|
||||
the initial line comment character is skipped).
|
||||
|
||||
Note that the presence of #APP will mess up the line counters, but
|
||||
that appears to be difficult to fix.
|
||||
|
||||
Andreas.
|
||||
|
||||
2004-04-23 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* read.c (read_a_source_file): Ignore unknown text after line
|
||||
comment character. Fix misleading comment.
|
||||
|
||||
--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
|
||||
+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
|
||||
@@ -950,10 +950,14 @@ read_a_source_file (char *name)
|
||||
unsigned int new_length;
|
||||
char *tmp_buf = 0;
|
||||
|
||||
- bump_line_counters ();
|
||||
s = input_line_pointer;
|
||||
if (strncmp (s, "APP\n", 4))
|
||||
- continue; /* We ignore it */
|
||||
+ {
|
||||
+ /* We ignore it */
|
||||
+ ignore_rest_of_line ();
|
||||
+ continue;
|
||||
+ }
|
||||
+ bump_line_counters ();
|
||||
s += 4;
|
||||
|
||||
sb_new (&sbuf);
|
||||
@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
|
||||
continue;
|
||||
#endif
|
||||
input_line_pointer--;
|
||||
- /* Report unknown char as ignored. */
|
||||
+ /* Report unknown char as error. */
|
||||
demand_empty_rest_of_line ();
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
Andreas Schwab, SuSE Labs, schwab@suse.de
|
||||
SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
|
||||
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
|
||||
"And now for something completely different."
|
||||
12
toolchain/binutils/patches/400-mips-ELF_MAXPAGESIZE-4k.patch
Normal file
12
toolchain/binutils/patches/400-mips-ELF_MAXPAGESIZE-4k.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -urN binutils-2.14.90.0.8.test/bfd/elf32-mips.c binutils-2.14.90.0.8/bfd/elf32-mips.c
|
||||
--- binutils-2.14.90.0.8.test/bfd/elf32-mips.c 2004-01-14 22:07:43.000000000 +0100
|
||||
+++ binutils-2.14.90.0.8/bfd/elf32-mips.c 2005-03-03 23:44:00.000000000 +0100
|
||||
@@ -1611,7 +1611,7 @@
|
||||
|
||||
/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
|
||||
page sizes of up to that limit, so we need to respect it. */
|
||||
-#define ELF_MAXPAGESIZE 0x10000
|
||||
+#define ELF_MAXPAGESIZE 0x1000
|
||||
#define elf32_bed elf32_tradbed
|
||||
|
||||
/* Include the target file again for this target. */
|
||||
51
toolchain/gcc/Config.in
Normal file
51
toolchain/gcc/Config.in
Normal file
@@ -0,0 +1,51 @@
|
||||
# Choose gcc version.
|
||||
|
||||
choice
|
||||
prompt "GCC compiler Version" if TOOLCHAINOPTS
|
||||
default GCC_VERSION_4_1_1 if LINUX_2_6_ARUBA
|
||||
default GCC_VERSION_3_4_6
|
||||
help
|
||||
Select the version of gcc you wish to use.
|
||||
|
||||
|
||||
config GCC_VERSION_3_4_4
|
||||
bool "gcc 3.4.4"
|
||||
|
||||
config GCC_VERSION_3_4_5
|
||||
bool "gcc 3.4.5"
|
||||
|
||||
config GCC_VERSION_3_4_6
|
||||
bool "gcc 3.4.6"
|
||||
|
||||
config GCC_VERSION_3_4_6_nonmips
|
||||
bool "gcc 3.4.6-nonmips"
|
||||
|
||||
config GCC_VERSION_4_0_2
|
||||
bool "gcc 4.0.2"
|
||||
|
||||
config GCC_VERSION_4_0_3
|
||||
bool "gcc 4.0.3"
|
||||
|
||||
config GCC_VERSION_4_1_0
|
||||
bool "gcc 4.1.0"
|
||||
|
||||
config GCC_VERSION_4_1_1
|
||||
bool "gcc 4.1.1"
|
||||
|
||||
endchoice
|
||||
|
||||
config EXTRA_GCC_CONFIG_OPTIONS
|
||||
string
|
||||
prompt "Additional gcc options" if TOOLCHAINOPTS
|
||||
default ""
|
||||
help
|
||||
Any additional gcc options you may want to include....
|
||||
|
||||
config INSTALL_LIBSTDCPP
|
||||
bool
|
||||
prompt "Build/install c++ compiler and libstdc++?" if TOOLCHAINOPTS
|
||||
default y
|
||||
help
|
||||
Build/install c++ compiler and libstdc++?
|
||||
|
||||
|
||||
20
toolchain/gcc/Config.version
Normal file
20
toolchain/gcc/Config.version
Normal file
@@ -0,0 +1,20 @@
|
||||
config GCC_VERSION
|
||||
string
|
||||
default "3.4.4" if GCC_VERSION_3_4_4
|
||||
default "3.4.5" if GCC_VERSION_3_4_5
|
||||
default "3.4.6" if GCC_VERSION_3_4_6
|
||||
default "4.0.2" if GCC_VERSION_4_0_2
|
||||
default "4.0.3" if GCC_VERSION_4_0_3
|
||||
default "4.1.0" if GCC_VERSION_4_1_0
|
||||
default "4.1.1" if GCC_VERSION_4_1_1
|
||||
default "3.4.6-nonmips" if GCC_VERSION_3_4_6_nonmips
|
||||
default "3.4.6"
|
||||
|
||||
if !TOOLCHAINOPTS
|
||||
config GCC_VERSION_4_1_1
|
||||
default y if LINUX_2_6_ARUBA || LINUX_2_6_X86
|
||||
config GCC_VERSION_4_0_3
|
||||
default y if LINUX_2_6_XSCALE
|
||||
endif
|
||||
|
||||
|
||||
143
toolchain/gcc/Makefile
Normal file
143
toolchain/gcc/Makefile
Normal file
@@ -0,0 +1,143 @@
|
||||
# Makefile for to build a gcc/uClibc toolchain
|
||||
#
|
||||
# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
|
||||
# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
|
||||
# Copyright (C) 2005-2006 Felix Fietkau <nbd@openwrt.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
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gcc
|
||||
PKG_VERSION:=$(strip $(subst ",, $(CONFIG_GCC_VERSION)))#"))
|
||||
|
||||
PKG_SOURCE:=gcc-$(PKG_VERSION).tar.bz2
|
||||
PKG_MD5SUM:=unknown
|
||||
PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \
|
||||
http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \
|
||||
ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION)
|
||||
PKG_CAT:=bzcat
|
||||
|
||||
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)
|
||||
|
||||
TARGET_LANGUAGES:=c
|
||||
ifeq ($(CONFIG_INSTALL_LIBSTDCPP),y)
|
||||
TARGET_LANGUAGES:=$(TARGET_LANGUAGES),c++
|
||||
endif
|
||||
ifeq ($(CONFIG_INSTALL_LIBGCJ),y)
|
||||
TARGET_LANGUAGES:=$(TARGET_LANGUAGES),java
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
BUILD_DIR1:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)-initial
|
||||
BUILD_DIR2:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)-final
|
||||
|
||||
override SHELL:=$(BASH)
|
||||
|
||||
define Stage1/Configure
|
||||
mkdir -p $(BUILD_DIR1)
|
||||
(cd $(BUILD_DIR1); rm -f config.cache; \
|
||||
$(PKG_BUILD_DIR)/configure \
|
||||
--prefix=$(STAGING_DIR) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--enable-languages=c \
|
||||
--disable-shared \
|
||||
--with-sysroot=$(TOOLCHAIN_BUILD_DIR)/uClibc_dev/ \
|
||||
--disable-__cxa_atexit \
|
||||
--enable-target-optspace \
|
||||
--with-gnu-ld \
|
||||
--disable-nls \
|
||||
);
|
||||
endef
|
||||
define Stage1/Compile
|
||||
$(MAKE) -C $(BUILD_DIR1) all-gcc
|
||||
endef
|
||||
define Stage1/Install
|
||||
$(MAKE) -C $(BUILD_DIR1) install-gcc
|
||||
endef
|
||||
|
||||
define Stage2/Configure
|
||||
mkdir -p $(BUILD_DIR2)
|
||||
# Important! Required for limits.h to be fixed.
|
||||
rm -rf $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
|
||||
ln -sf ../include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
|
||||
rm -rf $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
|
||||
ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
|
||||
(cd $(BUILD_DIR2); rm -f config.cache; \
|
||||
$(PKG_BUILD_DIR)/configure \
|
||||
--prefix=$(STAGING_DIR) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--enable-languages=$(TARGET_LANGUAGES) \
|
||||
--enable-shared \
|
||||
--disable-__cxa_atexit \
|
||||
--enable-target-optspace \
|
||||
--with-gnu-ld \
|
||||
--disable-nls \
|
||||
);
|
||||
endef
|
||||
define Stage2/Compile
|
||||
$(MAKE) -C $(BUILD_DIR2) all
|
||||
endef
|
||||
define Stage2/Install
|
||||
$(MAKE) -C $(BUILD_DIR2) install
|
||||
echo $(PKG_VERSION) > $(STAGING_DIR)/gcc_version
|
||||
# Set up the symlinks to enable lying about target name.
|
||||
set -e; \
|
||||
(cd $(STAGING_DIR); \
|
||||
ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
|
||||
cd bin; \
|
||||
for app in $(REAL_GNU_TARGET_NAME)-* ; do \
|
||||
ln -sf $$$${app} \
|
||||
$(GNU_TARGET_NAME)$$$${app##$(REAL_GNU_TARGET_NAME)}; \
|
||||
done; \
|
||||
);
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(SCRIPT_DIR)/patch-kernel.sh $(PKG_BUILD_DIR) ./patches/$(PKG_VERSION) \*.patch
|
||||
$(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c
|
||||
$(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(PKG_BUILD_DIR)/gcc/version.c
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Stage1/Configure)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Stage1/Compile)
|
||||
$(call Stage1/Install)
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
$(call Stage2/Configure)
|
||||
$(call Stage2/Compile)
|
||||
$(call Stage2/Install)
|
||||
endef
|
||||
|
||||
define Build/Clean
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
rm -rf $(BUILD_DIR1)
|
||||
rm -rf $(BUILD_DIR2)
|
||||
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc*
|
||||
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c*
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
442
toolchain/gcc/patches/3.4.4/100-uclibc-conf.patch
Normal file
442
toolchain/gcc/patches/3.4.4/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,442 @@
|
||||
diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure
|
||||
--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500
|
||||
+++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500
|
||||
@@ -1947,6 +1947,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig
|
||||
--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
|
||||
+++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -1981,6 +1981,23 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
|
||||
+ file_magic_cmd=/usr/bin/file
|
||||
+ file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
version_type=sunos
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -81,6 +81,18 @@
|
||||
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
||||
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
+ %{b} %{Wl,*:%*} \
|
||||
+ %{static:-Bstatic} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{symbolic:-Bsymbolic} \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||
+ -X \
|
||||
+ %{mbig-endian:-EB}" \
|
||||
+ SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#else
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} %{Wl,*:%*} \
|
||||
%{static:-Bstatic} \
|
||||
@@ -91,6 +103,7 @@
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#endif
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -79,6 +79,25 @@
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -93,6 +112,8 @@
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,3 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+TARGET_LIBGCC2_CFLAGS += -fPIC
|
||||
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -118,6 +118,15 @@
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
|
||||
%{static:-static}}}"
|
||||
#else
|
||||
+#if defined USE_UCLIBC
|
||||
+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!ibcs: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}}}"
|
||||
+#else
|
||||
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
@@ -126,6 +135,7 @@
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}}}"
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream
|
||||
FILE the assembler definition of uninitialized global DECL named
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -109,6 +109,17 @@
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC \
|
||||
+ "%(endian_spec) \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!ibcs: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}}}"
|
||||
+#else
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
@@ -118,6 +129,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
%{static:-static}}}"
|
||||
+#endif
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
#define SUBTARGET_ASM_SPEC "\
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -61,7 +61,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -947,6 +947,7 @@
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1124,6 +1125,10 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1290,6 +1295,7 @@
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -73,12 +73,21 @@
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define SUBTARGET_LINK_SPEC \
|
||||
+ "%{shared:-shared} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}"
|
||||
+#else
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}"
|
||||
+#endif
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
|
||||
+LIB1ASMFUNCS_CACHE = _ic_invalidate
|
||||
+
|
||||
+LIB2FUNCS_EXTRA=
|
||||
+
|
||||
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
|
||||
+MULTILIB_DIRNAMES=
|
||||
+MULTILIB_MATCHES =
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
+
|
||||
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
|
||||
+
|
||||
+LIB1ASMFUNCS = \
|
||||
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
|
||||
+ _shcompact_call_trampoline _shcompact_return_trampoline \
|
||||
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
|
||||
+ _push_pop_shmedia_regs \
|
||||
+ _udivdi3 _divdi3 _umoddi3 _moddi3
|
||||
+
|
||||
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
|
||||
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
|
||||
+MULTILIB_MATCHES=
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,15 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+# Compile crtbeginS.o and crtendS.o with pic.
|
||||
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
|
||||
+# Compile libgcc2.a with pic.
|
||||
+TARGET_LIBGCC2_CFLAGS = -fPIC
|
||||
+
|
||||
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
|
||||
+# the symbol versions that glibc used.
|
||||
+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
|
||||
+
|
||||
+# Use unwind-dw2-fde
|
||||
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
|
||||
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
|
||||
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-04-21 10:12:35.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-12 15:59:46.000000000 -0500
|
||||
@@ -664,6 +664,12 @@
|
||||
extra_parts=""
|
||||
use_collect2=yes
|
||||
;;
|
||||
+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
+ gnu_ld=yes
|
||||
+ ;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||
@@ -725,6 +731,10 @@
|
||||
tmake_file="cris/t-cris cris/t-elfmulti"
|
||||
gas=yes
|
||||
;;
|
||||
+cris-*-linux-uclibc*)
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
|
||||
+ ;;
|
||||
cris-*-linux*)
|
||||
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
|
||||
@@ -988,6 +998,11 @@
|
||||
thread_file='single'
|
||||
fi
|
||||
;;
|
||||
+i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
|
||||
+ # with ELF format using uClibc
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
|
||||
+ ;;
|
||||
i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
|
||||
# with ELF format using glibc 2
|
||||
# aka GNU/Linux C library 6
|
||||
@@ -1547,6 +1562,16 @@
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
;;
|
||||
+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
+ case ${target} in
|
||||
+ mipsisa32*-*)
|
||||
+ target_cpu_default="MASK_SOFT_FLOAT"
|
||||
+ tm_defines="MIPS_ISA_DEFAULT=32"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
|
||||
+ ;;
|
||||
mips*-*-linux*) # Linux MIPS, either endian.
|
||||
tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
case ${target} in
|
||||
@@ -1764,6 +1789,10 @@
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||
;;
|
||||
+powerpc-*-linux-uclibc*)
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
|
||||
+ ;;
|
||||
powerpc-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||
@@ -1916,7 +1945,7 @@
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
|
||||
;;
|
||||
sh-*-linux* | sh[2346lbe]*-*-linux*)
|
||||
- tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
|
||||
+ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver"
|
||||
case ${target} in
|
||||
sh*be-*-* | sh*eb-*-*) ;;
|
||||
*)
|
||||
@@ -1924,9 +1953,17 @@
|
||||
tmake_file="${tmake_file} sh/t-le"
|
||||
;;
|
||||
esac
|
||||
- tmake_file="${tmake_file} sh/t-linux"
|
||||
+ case ${target} in
|
||||
+ *-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;;
|
||||
+ *) tmake_file="${tmake_file} t-linux sh/t-linux" ;;
|
||||
+ esac
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
|
||||
case ${target} in
|
||||
+ sh64*-*-linux-uclibc*)
|
||||
+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
|
||||
+ tm_file="${tm_file} sh/sh64.h"
|
||||
+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
|
||||
+ ;;
|
||||
sh64*)
|
||||
tmake_file="${tmake_file} sh/t-sh64"
|
||||
tm_file="${tm_file} sh/sh64.h"
|
||||
diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4
|
||||
--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500
|
||||
+++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -689,6 +689,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig
|
||||
--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
|
||||
+++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500
|
||||
@@ -602,6 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1262,6 +1263,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
3246
toolchain/gcc/patches/3.4.4/200-uclibc-locale.patch
Normal file
3246
toolchain/gcc/patches/3.4.4/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
47
toolchain/gcc/patches/3.4.4/300-libstdc++-pic.patch
Normal file
47
toolchain/gcc/patches/3.4.4/300-libstdc++-pic.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am~ 2003-02-28 09:21:05.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am 2003-02-28 09:28:50.000000000 +0100
|
||||
@@ -224,6 +224,10 @@
|
||||
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCPP_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.in~ 2004-02-21 09:55:48.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in 2004-02-21 09:59:34.000000000 +0100
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -618,6 +618,7 @@
|
||||
distclean-tags distdir dvi dvi-am info info-am install \
|
||||
install-am install-data install-data-am install-data-local \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
+ install-exec-local \
|
||||
install-man install-strip install-toolexeclibLTLIBRARIES \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
@@ -707,6 +708,11 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
119
toolchain/gcc/patches/3.4.4/601-gcc34-arm-ldm.patch
Normal file
119
toolchain/gcc/patches/3.4.4/601-gcc34-arm-ldm.patch
Normal file
@@ -0,0 +1,119 @@
|
||||
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
|
||||
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
|
||||
@@ -8520,6 +8520,26 @@
|
||||
return_used_this_function = 0;
|
||||
}
|
||||
|
||||
+/* Return the number (counting from 0) of
|
||||
+ the least significant set bit in MASK. */
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+inline
|
||||
+#endif
|
||||
+static int
|
||||
+number_of_first_bit_set (mask)
|
||||
+ int mask;
|
||||
+{
|
||||
+ int bit;
|
||||
+
|
||||
+ for (bit = 0;
|
||||
+ (mask & (1 << bit)) == 0;
|
||||
+ ++bit)
|
||||
+ continue;
|
||||
+
|
||||
+ return bit;
|
||||
+}
|
||||
+
|
||||
const char *
|
||||
arm_output_epilogue (rtx sibling)
|
||||
{
|
||||
@@ -8753,27 +8773,47 @@
|
||||
saved_regs_mask |= (1 << PC_REGNUM);
|
||||
}
|
||||
|
||||
- /* Load the registers off the stack. If we only have one register
|
||||
- to load use the LDR instruction - it is faster. */
|
||||
- if (saved_regs_mask == (1 << LR_REGNUM))
|
||||
- {
|
||||
- /* The exception handler ignores the LR, so we do
|
||||
- not really need to load it off the stack. */
|
||||
- if (eh_ofs)
|
||||
- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
- else
|
||||
- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
|
||||
- }
|
||||
- else if (saved_regs_mask)
|
||||
+ if (saved_regs_mask)
|
||||
{
|
||||
- if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
- /* Note - write back to the stack register is not enabled
|
||||
- (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
- in the list of registers and if we add writeback the
|
||||
- instruction becomes UNPREDICTABLE. */
|
||||
- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ /* Load the registers off the stack. If we only have one register
|
||||
+ to load use the LDR instruction - it is faster. */
|
||||
+ if (bit_count (saved_regs_mask) == 1)
|
||||
+ {
|
||||
+ int reg = number_of_first_bit_set (saved_regs_mask);
|
||||
+
|
||||
+ switch (reg)
|
||||
+ {
|
||||
+ case SP_REGNUM:
|
||||
+ /* Mustn't use base writeback when loading SP. */
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+
|
||||
+ case LR_REGNUM:
|
||||
+ if (eh_ofs)
|
||||
+ {
|
||||
+ /* The exception handler ignores the LR, so we do
|
||||
+ not really need to load it off the stack. */
|
||||
+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ /* else fall through */
|
||||
+
|
||||
+ default:
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ {
|
||||
+ if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
+ /* Note - write back to the stack register is not enabled
|
||||
+ (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
+ in the list of registers and if we add writeback the
|
||||
+ instruction becomes UNPREDICTABLE. */
|
||||
+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ else
|
||||
+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (current_function_pretend_args_size)
|
||||
@@ -11401,22 +11441,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Return the number (counting from 0) of
|
||||
- the least significant set bit in MASK. */
|
||||
-
|
||||
-inline static int
|
||||
-number_of_first_bit_set (int mask)
|
||||
-{
|
||||
- int bit;
|
||||
-
|
||||
- for (bit = 0;
|
||||
- (mask & (1 << bit)) == 0;
|
||||
- ++bit)
|
||||
- continue;
|
||||
-
|
||||
- return bit;
|
||||
-}
|
||||
-
|
||||
/* Generate code to return from a thumb function.
|
||||
If 'reg_containing_return_addr' is -1, then the return address is
|
||||
actually on the stack, at the stack pointer. */
|
||||
22
toolchain/gcc/patches/3.4.4/602-sdk-libstdc++-includes.patch
Normal file
22
toolchain/gcc/patches/3.4.4/602-sdk-libstdc++-includes.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
libmath_la_SOURCES = stubs.c
|
||||
|
||||
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
|
||||
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
# Only compiling "C" sources in this directory.
|
||||
LIBTOOL = @LIBTOOL@ --tag CC
|
||||
--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
|
||||
|
||||
# -I/-D flags to pass when compiling.
|
||||
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
|
||||
|
||||
44
toolchain/gcc/patches/3.4.4/700-pr15068-fix.patch
Normal file
44
toolchain/gcc/patches/3.4.4/700-pr15068-fix.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
See http://gcc.gnu.org/PR15068
|
||||
|
||||
Fixes error
|
||||
|
||||
../sysdeps/generic/s_fmax.c: In function `__fmax':
|
||||
../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
|
||||
Please submit a full bug report,
|
||||
with preprocessed source if appropriate.
|
||||
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
|
||||
make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
|
||||
make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
|
||||
make[1]: *** [math/others] Error 2
|
||||
make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
|
||||
make: *** [all] Error 2
|
||||
|
||||
[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
|
||||
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
|
||||
|
||||
--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
|
||||
+++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
|
||||
@@ -1878,6 +1878,7 @@
|
||||
rtx set_src = SET_SRC (pc_set (BB_END (bb)));
|
||||
rtx cond_true = XEXP (set_src, 0);
|
||||
rtx reg = XEXP (cond_true, 0);
|
||||
+ enum rtx_code inv_cond;
|
||||
|
||||
if (GET_CODE (reg) == SUBREG)
|
||||
reg = SUBREG_REG (reg);
|
||||
@@ -1886,11 +1887,13 @@
|
||||
in the form of a comparison of a register against zero.
|
||||
If the condition is more complex than that, then it is safe
|
||||
not to record any information. */
|
||||
- if (GET_CODE (reg) == REG
|
||||
+ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
|
||||
+ if (inv_cond != UNKNOWN
|
||||
+ && GET_CODE (reg) == REG
|
||||
&& XEXP (cond_true, 1) == const0_rtx)
|
||||
{
|
||||
rtx cond_false
|
||||
- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
|
||||
+ = gen_rtx_fmt_ee (inv_cond,
|
||||
GET_MODE (cond_true), XEXP (cond_true, 0),
|
||||
XEXP (cond_true, 1));
|
||||
if (GET_CODE (XEXP (set_src, 1)) == PC)
|
||||
70
toolchain/gcc/patches/3.4.4/800-arm-bigendian.patch
Normal file
70
toolchain/gcc/patches/3.4.4/800-arm-bigendian.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 15:43:40.000000000 -0500
|
||||
@@ -30,17 +30,34 @@
|
||||
/* Do not assume anything about header files. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
/* Default is to use APCS-32 mode. */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_APCS_32 | \
|
||||
+ ARM_FLAG_MMU_TRAPS | \
|
||||
+ TARGET_ENDIAN_DEFAULT )
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
@@ -101,7 +118,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
#endif
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:01:25.000000000 -0500
|
||||
@@ -672,6 +672,11 @@
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
27
toolchain/gcc/patches/3.4.4/810-arm-bigendian-uclibc.patch
Normal file
27
toolchain/gcc/patches/3.4.4/810-arm-bigendian-uclibc.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:08:18.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 16:06:24.000000000 -0500
|
||||
@@ -107,7 +107,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
#else
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:08:18.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:03:25.000000000 -0500
|
||||
@@ -666,6 +666,11 @@
|
||||
;;
|
||||
arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
16
toolchain/gcc/patches/3.4.4/830-gcc-bug-num-22167.patch
Normal file
16
toolchain/gcc/patches/3.4.4/830-gcc-bug-num-22167.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
Index: gcc/gcse.c
|
||||
===================================================================
|
||||
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
|
||||
retrieving revision 1.288.2.9
|
||||
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
|
||||
--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
|
||||
+++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
|
||||
@@ -6445,7 +6445,7 @@ hoist_code (void)
|
||||
insn_inserted_p = 0;
|
||||
|
||||
/* These tests should be the same as the tests above. */
|
||||
- if (TEST_BIT (hoist_vbeout[bb->index], i))
|
||||
+ if (TEST_BIT (hoist_exprs[bb->index], i))
|
||||
{
|
||||
/* We've found a potentially hoistable expression, now
|
||||
we look at every block BB dominates to see if it
|
||||
270
toolchain/gcc/patches/3.4.4/arm-softfloat.patch.conditional
Normal file
270
toolchain/gcc/patches/3.4.4/arm-softfloat.patch.conditional
Normal file
@@ -0,0 +1,270 @@
|
||||
Note... modified my mjn3 to not conflict with the big endian arm patch.
|
||||
Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
|
||||
Also changed
|
||||
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
%{!mcpu=*:-mcpu=xscale} \
|
||||
%{mhard-float:-mfpu=fpa} \
|
||||
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
to
|
||||
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
%{mhard-float:-mfpu=fpa} \
|
||||
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
in gcc/config/arm/linux-elf.h.
|
||||
#
|
||||
# Submitted:
|
||||
#
|
||||
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
|
||||
#
|
||||
# Description:
|
||||
#
|
||||
# Nicholas Pitre released this patch for gcc soft-float support here:
|
||||
# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
|
||||
#
|
||||
# This version has been adapted to work with gcc 3.4.0.
|
||||
#
|
||||
# The original patch doesn't distinguish between softfpa and softvfp modes
|
||||
# in the way Nicholas Pitre probably meant. His description is:
|
||||
#
|
||||
# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
|
||||
# floats can be achieved with -mhard-float or with the configure
|
||||
# --with-float=hard option. If -msoft-float or --with-float=soft is used then
|
||||
# software float support will be used just like the default but with the legacy
|
||||
# big endian word ordering for double float representation instead."
|
||||
#
|
||||
# Which means the following:
|
||||
#
|
||||
# * If you compile without -mhard-float or -msoft-float, you should get
|
||||
# software floating point, using the VFP format. The produced object file
|
||||
# should have these flags in its header:
|
||||
#
|
||||
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||
#
|
||||
# * If you compile with -mhard-float, you should get hardware floating point,
|
||||
# which always uses the FPA format. Object file header flags should be:
|
||||
#
|
||||
# private flags = 0: [APCS-32] [FPA float format]
|
||||
#
|
||||
# * If you compile with -msoft-float, you should get software floating point,
|
||||
# using the FPA format. This is done for compatibility reasons with many
|
||||
# existing distributions. Object file header flags should be:
|
||||
#
|
||||
# private flags = 200: [APCS-32] [FPA float format] [software FP]
|
||||
#
|
||||
# The original patch from Nicholas Pitre contained the following constructs:
|
||||
#
|
||||
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
# %{mhard-float:-mfpu=fpa} \
|
||||
# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||
#
|
||||
# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
|
||||
# is probably the reason Robert Schwebel modified it to:
|
||||
#
|
||||
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
# %{mhard-float:-mfpu=fpa} \
|
||||
# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
|
||||
#
|
||||
# But this causes the following behaviour:
|
||||
#
|
||||
# * If you compile without -mhard-float or -msoft-float, the compiler generates
|
||||
# software floating point instructions, but *nothing* is passed to the
|
||||
# assembler, which results in an object file which has flags:
|
||||
#
|
||||
# private flags = 0: [APCS-32] [FPA float format]
|
||||
#
|
||||
# This is not correct!
|
||||
#
|
||||
# * If you compile with -mhard-float, the compiler generates hardware floating
|
||||
# point instructions, and passes "-mfpu=fpa" to the assembler, which results
|
||||
# in an object file which has the same flags as in the previous item, but now
|
||||
# those *are* correct.
|
||||
#
|
||||
# * If you compile with -msoft-float, the compiler generates software floating
|
||||
# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
|
||||
# order) to the assembler, which results in an object file with flags:
|
||||
#
|
||||
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||
#
|
||||
# This is not correct, because the last "-mfpu=" option on the assembler
|
||||
# command line determines the actual FPU convention used (which should be FPA
|
||||
# in this case).
|
||||
#
|
||||
# Therefore, I modified this patch to get the desired behaviour. Every
|
||||
# instance of the notation:
|
||||
#
|
||||
# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
|
||||
#
|
||||
# was changed to:
|
||||
#
|
||||
# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
|
||||
#
|
||||
# I also did the following:
|
||||
#
|
||||
# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
|
||||
# be consistent with Nicholas' original patch.
|
||||
# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
|
||||
# macros I could find. I think that if you compile without any options, you
|
||||
# would like to get the defaults. :)
|
||||
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
|
||||
# anymore. (The required functions are now in libgcc.)
|
||||
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -31,11 +31,16 @@
|
||||
#define TARGET_VERSION fputs (" (ARM/coff)", stderr)
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
|
||||
#endif
|
||||
|
||||
/* This is COFF, but prefer stabs. */
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -46,7 +46,9 @@
|
||||
|
||||
#ifndef SUBTARGET_ASM_FLOAT_SPEC
|
||||
#define SUBTARGET_ASM_FLOAT_SPEC "\
|
||||
-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
|
||||
+%{mapcs-float:-mfloat} \
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
#endif
|
||||
|
||||
#ifndef ASM_SPEC
|
||||
@@ -106,12 +108,17 @@
|
||||
#endif
|
||||
|
||||
#ifndef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
#endif
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||
#endif
|
||||
|
||||
#define TARGET_ASM_FILE_START_APP_OFF true
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
|
||||
@@ -44,12 +44,26 @@
|
||||
#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
#endif
|
||||
|
||||
-/* Default is to use APCS-32 mode. */
|
||||
+/*
|
||||
+ * Default is to use APCS-32 mode with soft-vfp.
|
||||
+ * The old Linux default for floats can be achieved with -mhard-float
|
||||
+ * or with the configure --with-float=hard option.
|
||||
+ * If -msoft-float or --with-float=soft is used then software float
|
||||
+ * support will be used just like the default but with the legacy
|
||||
+ * big endian word ordering for double float representation instead.
|
||||
+ */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT \
|
||||
- ( ARM_FLAG_APCS_32 | \
|
||||
- ARM_FLAG_MMU_TRAPS | \
|
||||
- TARGET_ENDIAN_DEFAULT )
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_SOFT_FLOAT \
|
||||
+ | TARGET_ENDIAN_DEFAULT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
+
|
||||
+#undef SUBTARGET_EXTRA_ASM_SPEC
|
||||
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
@@ -57,7 +71,7 @@
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
|
||||
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
@@ -72,7 +86,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
|
||||
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
|
||||
--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -4,7 +4,10 @@
|
||||
LIBGCC2_DEBUG_CFLAGS = -g0
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -30,7 +30,12 @@
|
||||
|
||||
/* Default to using APCS-32 and software floating point. */
|
||||
#ifndef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
#endif
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -49,11 +49,12 @@
|
||||
endian, regardless of the endian-ness of the memory
|
||||
system. */
|
||||
|
||||
-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
- %{mhard-float:-mfpu=fpa} \
|
||||
- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
+%{!mcpu=*:-mcpu=xscale} \
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
|
||||
+ { "mlittle-endian", "mno-thumb-interwork", "marm" }
|
||||
#endif
|
||||
462
toolchain/gcc/patches/3.4.5/100-uclibc-conf.patch
Normal file
462
toolchain/gcc/patches/3.4.5/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,462 @@
|
||||
--- gcc-3.4.1/gcc/config.gcc
|
||||
+++ gcc-3.4.1/gcc/config.gcc
|
||||
@@ -2310,10 +2310,16 @@
|
||||
*)
|
||||
echo "*** Configuration ${target} not supported" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
+
|
||||
+# Rather than hook into each target, just do it after all the linux
|
||||
+# targets have been processed
|
||||
+case ${target} in
|
||||
+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC"
|
||||
+esac
|
||||
|
||||
# Support for --with-cpu and related options (and a few unrelated options,
|
||||
# too).
|
||||
case ${with_cpu} in
|
||||
yes | no)
|
||||
--- gcc-3.4.4/gcc/config/alpha/linux-elf.h
|
||||
+++ gcc-3.4.4/gcc/config/alpha/linux-elf.h
|
||||
@@ -27,7 +27,11 @@
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
|
||||
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -80,14 +80,19 @@
|
||||
#define ENDFILE_SPEC \
|
||||
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} %{Wl,*:%*} \
|
||||
%{static:-Bstatic} \
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -79,6 +79,25 @@
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -93,6 +112,8 @@
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -110,22 +110,21 @@
|
||||
|
||||
#undef LINK_SPEC
|
||||
#ifdef USE_GNULIBC_1
|
||||
-#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
- %{!shared: \
|
||||
- %{!ibcs: \
|
||||
- %{!static: \
|
||||
- %{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
|
||||
- %{static:-static}}}"
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.1"
|
||||
+#else
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
+#endif
|
||||
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
-#endif
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream
|
||||
FILE the assembler definition of uninitialized global DECL named
|
||||
--- gcc-3.4.4/gcc/config/i386/linux64.h
|
||||
+++ gcc-3.4.4/gcc/config/i386/linux64.h
|
||||
@@ -54,14 +54,21 @@
|
||||
When the -shared link option is used a final link is not being
|
||||
done. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
|
||||
+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
|
||||
+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
|
||||
%{static:-static}}"
|
||||
|
||||
#define MULTILIB_DEFAULTS { "m64" }
|
||||
--- gcc-3.4.4/gcc/config/ia64/linux.h
|
||||
+++ gcc-3.4.4/gcc/config/ia64/linux.h
|
||||
@@ -37,13 +37,18 @@
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
|
||||
--- gcc-3.4.4/gcc/config/m68k/linux.h
|
||||
+++ gcc-3.4.4/gcc/config/m68k/linux.h
|
||||
@@ -131,12 +131,17 @@
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m m68kelf %{shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static}}"
|
||||
|
||||
/* For compatibility with linux/a.out */
|
||||
--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -109,14 +109,19 @@
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
--- gcc-3.4.4/gcc/config/pa/pa-linux.h
|
||||
+++ gcc-3.4.4/gcc/config/pa/pa-linux.h
|
||||
@@ -77,13 +77,18 @@
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
/* glibc's profiling functions don't need gcc to allocate counters. */
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -69,7 +69,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -947,6 +947,7 @@
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1125,6 +1126,10 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1291,6 +1296,7 @@
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
--- gcc-3.4.4/gcc/config/s390/linux.h
|
||||
+++ gcc-3.4.4/gcc/config/s390/linux.h
|
||||
@@ -77,6 +77,13 @@
|
||||
#define MULTILIB_DEFAULTS { "m31" }
|
||||
#endif
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
@@ -86,8 +93,8 @@
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker: \
|
||||
- %{m31:-dynamic-linker /lib/ld.so.1} \
|
||||
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
|
||||
+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
|
||||
+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
|
||||
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -73,11 +73,16 @@
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
--- gcc-3.4.4/gcc/config/sparc/linux.h
|
||||
+++ gcc-3.4.4/gcc/config/sparc/linux.h
|
||||
@@ -162,13 +162,18 @@
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
|
||||
%{static:-static}}}"
|
||||
#else
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
#endif
|
||||
|
||||
--- gcc-3.4.4/gcc/config/sparc/linux64.h
|
||||
+++ gcc-3.4.4/gcc/config/sparc/linux64.h
|
||||
@@ -167,12 +166,17 @@
|
||||
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||
{ "link_arch", LINK_ARCH_SPEC },
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}} \
|
||||
"
|
||||
|
||||
--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500
|
||||
+++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -689,6 +689,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
|
||||
+++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500
|
||||
@@ -602,6 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1262,6 +1263,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500
|
||||
+++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500
|
||||
@@ -1947,6 +1947,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
|
||||
+++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -1981,6 +1981,23 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
|
||||
+ file_magic_cmd=/usr/bin/file
|
||||
+ file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
version_type=sunos
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
3255
toolchain/gcc/patches/3.4.5/200-uclibc-locale.patch
Normal file
3255
toolchain/gcc/patches/3.4.5/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
47
toolchain/gcc/patches/3.4.5/300-libstdc++-pic.patch
Normal file
47
toolchain/gcc/patches/3.4.5/300-libstdc++-pic.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am~ 2003-02-28 09:21:05.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am 2003-02-28 09:28:50.000000000 +0100
|
||||
@@ -224,6 +224,10 @@
|
||||
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCPP_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.in~ 2004-02-21 09:55:48.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in 2004-02-21 09:59:34.000000000 +0100
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -618,6 +618,7 @@
|
||||
distclean-tags distdir dvi dvi-am info info-am install \
|
||||
install-am install-data install-data-am install-data-local \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
+ install-exec-local \
|
||||
install-man install-strip install-toolexeclibLTLIBRARIES \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
@@ -707,6 +708,11 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
65
toolchain/gcc/patches/3.4.5/600-gcc34-arm-ldm-peephole.patch
Normal file
65
toolchain/gcc/patches/3.4.5/600-gcc34-arm-ldm-peephole.patch
Normal file
@@ -0,0 +1,65 @@
|
||||
--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
|
||||
+++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
|
||||
@@ -8810,13 +8810,16 @@
|
||||
(set_attr "length" "4,8,8")]
|
||||
)
|
||||
|
||||
+; Try to convert LDR+LDR+arith into [add+]LDM+arith
|
||||
+; On XScale, LDM is always slower than two LDRs, so only do this if
|
||||
+; optimising for size.
|
||||
(define_insn "*arith_adjacentmem"
|
||||
[(set (match_operand:SI 0 "s_register_operand" "=r")
|
||||
(match_operator:SI 1 "shiftable_operator"
|
||||
[(match_operand:SI 2 "memory_operand" "m")
|
||||
(match_operand:SI 3 "memory_operand" "m")]))
|
||||
(clobber (match_scratch:SI 4 "=r"))]
|
||||
- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
|
||||
+ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
|
||||
"*
|
||||
{
|
||||
rtx ldm[3];
|
||||
@@ -8851,6 +8854,8 @@
|
||||
}
|
||||
if (val1 && val2)
|
||||
{
|
||||
+ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
|
||||
+ will prevent it from happening. */
|
||||
rtx ops[3];
|
||||
ldm[0] = ops[0] = operands[4];
|
||||
ops[1] = XEXP (XEXP (operands[2], 0), 0);
|
||||
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
|
||||
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
|
||||
@@ -4838,6 +4841,11 @@
|
||||
*load_offset = unsorted_offsets[order[0]];
|
||||
}
|
||||
|
||||
+ /* For XScale a two-word LDM is a performance loss, so only do this if
|
||||
+ size is more important. See comments in arm_gen_load_multiple. */
|
||||
+ if (nops == 2 && arm_tune_xscale && !optimize_size)
|
||||
+ return 0;
|
||||
+
|
||||
if (unsorted_offsets[order[0]] == 0)
|
||||
return 1; /* ldmia */
|
||||
|
||||
@@ -5064,6 +5072,11 @@
|
||||
*load_offset = unsorted_offsets[order[0]];
|
||||
}
|
||||
|
||||
+ /* For XScale a two-word LDM is a performance loss, so only do this if
|
||||
+ size is more important. See comments in arm_gen_load_multiple. */
|
||||
+ if (nops == 2 && arm_tune_xscale && !optimize_size)
|
||||
+ return 0;
|
||||
+
|
||||
if (unsorted_offsets[order[0]] == 0)
|
||||
return 1; /* stmia */
|
||||
|
||||
--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
|
||||
+++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
|
||||
@@ -381,6 +381,7 @@
|
||||
printf ("#include \"recog.h\"\n");
|
||||
printf ("#include \"except.h\"\n\n");
|
||||
printf ("#include \"function.h\"\n\n");
|
||||
+ printf ("#include \"flags.h\"\n\n");
|
||||
|
||||
printf ("#ifdef HAVE_peephole\n");
|
||||
printf ("extern rtx peep_operand[];\n\n");
|
||||
@@ -0,0 +1,42 @@
|
||||
The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting
|
||||
with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from
|
||||
it that was causing problems and grabbed an updated version from
|
||||
upstream cvs.
|
||||
|
||||
Index: gcc/config/arm/arm.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
|
||||
retrieving revision 1.432
|
||||
retrieving revision 1.433
|
||||
diff -u -r1.432 -r1.433
|
||||
--- gcc-3.4.4/gcc/config/arm/arm.c 29 Mar 2005 03:00:23 -0000 1.432
|
||||
+++ gcc-3.4.4/gcc/config/arm/arm.c 1 Apr 2005 11:02:22 -0000 1.433
|
||||
@@ -5139,6 +5139,10 @@
|
||||
int
|
||||
adjacent_mem_locations (rtx a, rtx b)
|
||||
{
|
||||
+ /* We don't guarantee to preserve the order of these memory refs. */
|
||||
+ if (volatile_refs_p (a) || volatile_refs_p (b))
|
||||
+ return 0;
|
||||
+
|
||||
if ((GET_CODE (XEXP (a, 0)) == REG
|
||||
|| (GET_CODE (XEXP (a, 0)) == PLUS
|
||||
&& GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT))
|
||||
@@ -5178,6 +5182,17 @@
|
||||
return 0;
|
||||
|
||||
val_diff = val1 - val0;
|
||||
+
|
||||
+ if (arm_ld_sched)
|
||||
+ {
|
||||
+ /* If the target has load delay slots, then there's no benefit
|
||||
+ to using an ldm instruction unless the offset is zero and
|
||||
+ we are optimizing for size. */
|
||||
+ return (optimize_size && (REGNO (reg0) == REGNO (reg1))
|
||||
+ && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4)
|
||||
+ && (val_diff == 4 || val_diff == -4));
|
||||
+ }
|
||||
+
|
||||
return ((REGNO (reg0) == REGNO (reg1))
|
||||
&& (val_diff == 4 || val_diff == -4));
|
||||
}
|
||||
119
toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm.patch
Normal file
119
toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm.patch
Normal file
@@ -0,0 +1,119 @@
|
||||
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
|
||||
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
|
||||
@@ -8520,6 +8520,26 @@
|
||||
return_used_this_function = 0;
|
||||
}
|
||||
|
||||
+/* Return the number (counting from 0) of
|
||||
+ the least significant set bit in MASK. */
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+inline
|
||||
+#endif
|
||||
+static int
|
||||
+number_of_first_bit_set (mask)
|
||||
+ int mask;
|
||||
+{
|
||||
+ int bit;
|
||||
+
|
||||
+ for (bit = 0;
|
||||
+ (mask & (1 << bit)) == 0;
|
||||
+ ++bit)
|
||||
+ continue;
|
||||
+
|
||||
+ return bit;
|
||||
+}
|
||||
+
|
||||
const char *
|
||||
arm_output_epilogue (rtx sibling)
|
||||
{
|
||||
@@ -8753,27 +8773,47 @@
|
||||
saved_regs_mask |= (1 << PC_REGNUM);
|
||||
}
|
||||
|
||||
- /* Load the registers off the stack. If we only have one register
|
||||
- to load use the LDR instruction - it is faster. */
|
||||
- if (saved_regs_mask == (1 << LR_REGNUM))
|
||||
- {
|
||||
- /* The exception handler ignores the LR, so we do
|
||||
- not really need to load it off the stack. */
|
||||
- if (eh_ofs)
|
||||
- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
- else
|
||||
- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
|
||||
- }
|
||||
- else if (saved_regs_mask)
|
||||
+ if (saved_regs_mask)
|
||||
{
|
||||
- if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
- /* Note - write back to the stack register is not enabled
|
||||
- (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
- in the list of registers and if we add writeback the
|
||||
- instruction becomes UNPREDICTABLE. */
|
||||
- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ /* Load the registers off the stack. If we only have one register
|
||||
+ to load use the LDR instruction - it is faster. */
|
||||
+ if (bit_count (saved_regs_mask) == 1)
|
||||
+ {
|
||||
+ int reg = number_of_first_bit_set (saved_regs_mask);
|
||||
+
|
||||
+ switch (reg)
|
||||
+ {
|
||||
+ case SP_REGNUM:
|
||||
+ /* Mustn't use base writeback when loading SP. */
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+
|
||||
+ case LR_REGNUM:
|
||||
+ if (eh_ofs)
|
||||
+ {
|
||||
+ /* The exception handler ignores the LR, so we do
|
||||
+ not really need to load it off the stack. */
|
||||
+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ /* else fall through */
|
||||
+
|
||||
+ default:
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ {
|
||||
+ if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
+ /* Note - write back to the stack register is not enabled
|
||||
+ (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
+ in the list of registers and if we add writeback the
|
||||
+ instruction becomes UNPREDICTABLE. */
|
||||
+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ else
|
||||
+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (current_function_pretend_args_size)
|
||||
@@ -11401,22 +11441,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Return the number (counting from 0) of
|
||||
- the least significant set bit in MASK. */
|
||||
-
|
||||
-inline static int
|
||||
-number_of_first_bit_set (int mask)
|
||||
-{
|
||||
- int bit;
|
||||
-
|
||||
- for (bit = 0;
|
||||
- (mask & (1 << bit)) == 0;
|
||||
- ++bit)
|
||||
- continue;
|
||||
-
|
||||
- return bit;
|
||||
-}
|
||||
-
|
||||
/* Generate code to return from a thumb function.
|
||||
If 'reg_containing_return_addr' is -1, then the return address is
|
||||
actually on the stack, at the stack pointer. */
|
||||
22
toolchain/gcc/patches/3.4.5/602-sdk-libstdc++-includes.patch
Normal file
22
toolchain/gcc/patches/3.4.5/602-sdk-libstdc++-includes.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
libmath_la_SOURCES = stubs.c
|
||||
|
||||
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
|
||||
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
# Only compiling "C" sources in this directory.
|
||||
LIBTOOL = @LIBTOOL@ --tag CC
|
||||
--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
|
||||
|
||||
# -I/-D flags to pass when compiling.
|
||||
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
|
||||
|
||||
44
toolchain/gcc/patches/3.4.5/700-pr15068-fix.patch
Normal file
44
toolchain/gcc/patches/3.4.5/700-pr15068-fix.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
See http://gcc.gnu.org/PR15068
|
||||
|
||||
Fixes error
|
||||
|
||||
../sysdeps/generic/s_fmax.c: In function `__fmax':
|
||||
../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
|
||||
Please submit a full bug report,
|
||||
with preprocessed source if appropriate.
|
||||
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
|
||||
make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
|
||||
make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
|
||||
make[1]: *** [math/others] Error 2
|
||||
make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
|
||||
make: *** [all] Error 2
|
||||
|
||||
[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
|
||||
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
|
||||
|
||||
--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
|
||||
+++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
|
||||
@@ -1878,6 +1878,7 @@
|
||||
rtx set_src = SET_SRC (pc_set (BB_END (bb)));
|
||||
rtx cond_true = XEXP (set_src, 0);
|
||||
rtx reg = XEXP (cond_true, 0);
|
||||
+ enum rtx_code inv_cond;
|
||||
|
||||
if (GET_CODE (reg) == SUBREG)
|
||||
reg = SUBREG_REG (reg);
|
||||
@@ -1886,11 +1887,13 @@
|
||||
in the form of a comparison of a register against zero.
|
||||
If the condition is more complex than that, then it is safe
|
||||
not to record any information. */
|
||||
- if (GET_CODE (reg) == REG
|
||||
+ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
|
||||
+ if (inv_cond != UNKNOWN
|
||||
+ && GET_CODE (reg) == REG
|
||||
&& XEXP (cond_true, 1) == const0_rtx)
|
||||
{
|
||||
rtx cond_false
|
||||
- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
|
||||
+ = gen_rtx_fmt_ee (inv_cond,
|
||||
GET_MODE (cond_true), XEXP (cond_true, 0),
|
||||
XEXP (cond_true, 1));
|
||||
if (GET_CODE (XEXP (set_src, 1)) == PC)
|
||||
43
toolchain/gcc/patches/3.4.5/71_all_sh-pr16665-fix.patch
Normal file
43
toolchain/gcc/patches/3.4.5/71_all_sh-pr16665-fix.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
--- gcc/gcc/config/sh/sh.c
|
||||
+++ gcc/gcc/config/sh/sh.c
|
||||
@@ -9106,6 +9106,15 @@ sh_output_mi_thunk (FILE *file, tree thu
|
||||
}
|
||||
this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
|
||||
|
||||
+ /* In PIC case, we set PIC register to compute the target address. We
|
||||
+ can use a scratch register to save and restore the original value
|
||||
+ except for SHcompact. For SHcompact, use stack. */
|
||||
+ if (flag_pic && TARGET_SHCOMPACT)
|
||||
+ {
|
||||
+ push (PIC_OFFSET_TABLE_REGNUM);
|
||||
+ emit_insn (gen_GOTaddr2picreg ());
|
||||
+ }
|
||||
+
|
||||
/* For SHcompact, we only have r0 for a scratch register: r1 is the
|
||||
static chain pointer (even if you can't have nested virtual functions
|
||||
right now, someone might implement them sometime), and the rest of the
|
||||
@@ -9188,8 +9197,24 @@ sh_output_mi_thunk (FILE *file, tree thu
|
||||
assemble_external (function);
|
||||
TREE_USED (function) = 1;
|
||||
}
|
||||
+ /* We can use scratch1 to save and restore the original value of
|
||||
+ PIC register except for SHcompact. */
|
||||
+ if (flag_pic && ! TARGET_SHCOMPACT)
|
||||
+ {
|
||||
+ emit_move_insn (scratch1,
|
||||
+ gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
|
||||
+ emit_insn (gen_GOTaddr2picreg ());
|
||||
+ }
|
||||
funexp = XEXP (DECL_RTL (function), 0);
|
||||
emit_move_insn (scratch2, funexp);
|
||||
+ if (flag_pic)
|
||||
+ {
|
||||
+ if (! TARGET_SHCOMPACT)
|
||||
+ emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
|
||||
+ scratch1);
|
||||
+ else
|
||||
+ pop (PIC_OFFSET_TABLE_REGNUM);
|
||||
+ }
|
||||
funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
|
||||
sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
|
||||
SIBLING_CALL_P (sibcall) = 1;
|
||||
@@ -0,0 +1,13 @@
|
||||
--- g/gcc/config/sh/sh.h
|
||||
+++ g/gcc/config/sh/sh.h
|
||||
@@ -422,6 +422,10 @@
|
||||
do { \
|
||||
if (LEVEL) \
|
||||
flag_omit_frame_pointer = -1; \
|
||||
+ if (LEVEL <= 2) \
|
||||
+ { \
|
||||
+ flag_reorder_blocks = 0; \
|
||||
+ } \
|
||||
if (SIZE) \
|
||||
target_flags |= SPACE_BIT; \
|
||||
if (TARGET_SHMEDIA && LEVEL > 1) \
|
||||
28
toolchain/gcc/patches/3.4.5/73_all_sh-pr20617.patch
Normal file
28
toolchain/gcc/patches/3.4.5/73_all_sh-pr20617.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
2005-03-24 J"orn Rennecke <joern.rennecke@st.com>
|
||||
|
||||
Band aid for PR target/20617:
|
||||
* config/sh/lib1funcs.asm (FUNC, ALIAS): Add .hidden directive.
|
||||
|
||||
--- g/gcc/config/sh/lib1funcs.asm
|
||||
+++ g/gcc/config/sh/lib1funcs.asm
|
||||
@@ -37,9 +37,19 @@ Boston, MA 02111-1307, USA. */
|
||||
ELF local label prefixes by J"orn Rennecke
|
||||
amylaar@cygnus.com */
|
||||
|
||||
+#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
|
||||
+
|
||||
#ifdef __ELF__
|
||||
#define LOCAL(X) .L_##X
|
||||
-#define FUNC(X) .type X,@function
|
||||
+
|
||||
+#if 1 /* ??? The export list mechanism is broken, everything that is not
|
||||
+ hidden is exported. */
|
||||
+#undef FUNC
|
||||
+#define FUNC(X) .type X,@function; .hidden X
|
||||
+#undef ALIAS
|
||||
+#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y); .hidden GLOBAL(X)
|
||||
+#endif
|
||||
+
|
||||
#define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
|
||||
#define ENDFUNC(X) ENDFUNC0(X)
|
||||
#else
|
||||
70
toolchain/gcc/patches/3.4.5/800-arm-bigendian.patch
Normal file
70
toolchain/gcc/patches/3.4.5/800-arm-bigendian.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 15:43:40.000000000 -0500
|
||||
@@ -30,17 +30,34 @@
|
||||
/* Do not assume anything about header files. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
/* Default is to use APCS-32 mode. */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_APCS_32 | \
|
||||
+ ARM_FLAG_MMU_TRAPS | \
|
||||
+ TARGET_ENDIAN_DEFAULT )
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
@@ -101,7 +118,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
#endif
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:01:25.000000000 -0500
|
||||
@@ -672,6 +672,11 @@
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
@@ -0,0 +1,15 @@
|
||||
--- gcc-3.4.4/gcc/config/rs6000/linux-unwind.h.org 2005-06-23 17:50:34.000000000 -0600
|
||||
+++ gcc-3.4.4/gcc/config/rs6000/linux-unwind.h 2005-06-23 17:52:02.000000000 -0600
|
||||
@@ -32,6 +32,7 @@
|
||||
these structs elsewhere; Many fields are missing, particularly
|
||||
from the end of the structures. */
|
||||
|
||||
+#ifndef inhibit_libc
|
||||
struct gcc_vregs
|
||||
{
|
||||
__attribute__ ((vector_size (16))) int vr[32];
|
||||
@@ -320,3 +321,4 @@
|
||||
\
|
||||
goto SUCCESS; \
|
||||
} while (0)
|
||||
+#endif
|
||||
85
toolchain/gcc/patches/3.4.6-nonmips/001-non_mips.patch
Normal file
85
toolchain/gcc/patches/3.4.6-nonmips/001-non_mips.patch
Normal file
@@ -0,0 +1,85 @@
|
||||
diff -urN gcc-3.4.6/gcc/config/mips/mips.c gcc-3.4.6-nonmips/gcc/config/mips/mips.c
|
||||
--- gcc-3.4.6/gcc/config/mips/mips.c 2005-07-31 10:35:15.000000000 +0200
|
||||
+++ gcc-3.4.6-nonmips/gcc/config/mips/mips.c 2006-07-19 20:25:03.000000000 +0200
|
||||
@@ -3466,26 +3466,26 @@
|
||||
for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
|
||||
{
|
||||
regs[i] = gen_reg_rtx (mode);
|
||||
- if (MEM_ALIGN (src) >= bits)
|
||||
+ //if (MEM_ALIGN (src) >= bits)
|
||||
emit_move_insn (regs[i], adjust_address (src, mode, offset));
|
||||
- else
|
||||
- {
|
||||
- rtx part = adjust_address (src, BLKmode, offset);
|
||||
- if (!mips_expand_unaligned_load (regs[i], part, bits, 0))
|
||||
- abort ();
|
||||
- }
|
||||
+ //else
|
||||
+ //{
|
||||
+ //rtx part = adjust_address (src, BLKmode, offset);
|
||||
+ //if (!mips_expand_unaligned_load (regs[i], part, bits, 0))
|
||||
+ //abort ();
|
||||
+ //}
|
||||
}
|
||||
|
||||
/* Copy the chunks to the destination. */
|
||||
for (offset = 0, i = 0; offset + delta <= length; offset += delta, i++)
|
||||
- if (MEM_ALIGN (dest) >= bits)
|
||||
+ //if (MEM_ALIGN (dest) >= bits)
|
||||
emit_move_insn (adjust_address (dest, mode, offset), regs[i]);
|
||||
- else
|
||||
- {
|
||||
- rtx part = adjust_address (dest, BLKmode, offset);
|
||||
- if (!mips_expand_unaligned_store (part, regs[i], bits, 0))
|
||||
- abort ();
|
||||
- }
|
||||
+ //else
|
||||
+ //{
|
||||
+ //rtx part = adjust_address (dest, BLKmode, offset);
|
||||
+ //if (!mips_expand_unaligned_store (part, regs[i], bits, 0))
|
||||
+ //abort ();
|
||||
+ //}
|
||||
|
||||
/* Mop up any left-over bytes. */
|
||||
if (offset < length)
|
||||
@@ -4488,6 +4488,7 @@
|
||||
mips_expand_unaligned_load (rtx dest, rtx src, unsigned int width, int bitpos)
|
||||
{
|
||||
rtx left, right, temp;
|
||||
+ return false;
|
||||
|
||||
/* If TARGET_64BIT, the destination of a 32-bit load will be a
|
||||
paradoxical word_mode subreg. This is the only case in which
|
||||
@@ -4514,8 +4515,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- emit_insn (gen_mov_lwl (temp, src, left));
|
||||
- emit_insn (gen_mov_lwr (dest, copy_rtx (src), right, temp));
|
||||
+ return false;
|
||||
+ //emit_insn (gen_mov_lwl (temp, src, left));
|
||||
+ //emit_insn (gen_mov_lwr (dest, copy_rtx (src), right, temp));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -4528,6 +4530,7 @@
|
||||
mips_expand_unaligned_store (rtx dest, rtx src, unsigned int width, int bitpos)
|
||||
{
|
||||
rtx left, right;
|
||||
+ return false;
|
||||
|
||||
if (!mips_get_unaligned_mem (&dest, width, bitpos, &left, &right))
|
||||
return false;
|
||||
@@ -4541,8 +4544,10 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- emit_insn (gen_mov_swl (dest, src, left));
|
||||
- emit_insn (gen_mov_swr (copy_rtx (dest), copy_rtx (src), right));
|
||||
+ /* Patented instructions */
|
||||
+ //emit_insn (gen_mov_swl (dest, src, left));
|
||||
+ //emit_insn (gen_mov_swr (copy_rtx (dest), copy_rtx (src), right));
|
||||
+ return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
442
toolchain/gcc/patches/3.4.6-nonmips/100-uclibc-conf.patch
Normal file
442
toolchain/gcc/patches/3.4.6-nonmips/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,442 @@
|
||||
diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure
|
||||
--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500
|
||||
+++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500
|
||||
@@ -1947,6 +1947,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig
|
||||
--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
|
||||
+++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -1981,6 +1981,23 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
|
||||
+ file_magic_cmd=/usr/bin/file
|
||||
+ file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
version_type=sunos
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -81,6 +81,18 @@
|
||||
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
||||
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
+ %{b} %{Wl,*:%*} \
|
||||
+ %{static:-Bstatic} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{symbolic:-Bsymbolic} \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||
+ -X \
|
||||
+ %{mbig-endian:-EB}" \
|
||||
+ SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#else
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} %{Wl,*:%*} \
|
||||
%{static:-Bstatic} \
|
||||
@@ -91,6 +103,7 @@
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#endif
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -79,6 +79,25 @@
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -93,6 +112,8 @@
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,3 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+TARGET_LIBGCC2_CFLAGS += -fPIC
|
||||
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -118,6 +118,15 @@
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
|
||||
%{static:-static}}}"
|
||||
#else
|
||||
+#if defined USE_UCLIBC
|
||||
+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!ibcs: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}}}"
|
||||
+#else
|
||||
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
@@ -126,6 +135,7 @@
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}}}"
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream
|
||||
FILE the assembler definition of uninitialized global DECL named
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -109,6 +109,17 @@
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC \
|
||||
+ "%(endian_spec) \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!ibcs: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}}}"
|
||||
+#else
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
@@ -118,6 +129,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
%{static:-static}}}"
|
||||
+#endif
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
#define SUBTARGET_ASM_SPEC "\
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -61,7 +61,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -947,6 +947,7 @@
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1124,6 +1125,10 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1290,6 +1295,7 @@
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -73,12 +73,21 @@
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define SUBTARGET_LINK_SPEC \
|
||||
+ "%{shared:-shared} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}"
|
||||
+#else
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}"
|
||||
+#endif
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
|
||||
+LIB1ASMFUNCS_CACHE = _ic_invalidate
|
||||
+
|
||||
+LIB2FUNCS_EXTRA=
|
||||
+
|
||||
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
|
||||
+MULTILIB_DIRNAMES=
|
||||
+MULTILIB_MATCHES =
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
+
|
||||
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
|
||||
+
|
||||
+LIB1ASMFUNCS = \
|
||||
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
|
||||
+ _shcompact_call_trampoline _shcompact_return_trampoline \
|
||||
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
|
||||
+ _push_pop_shmedia_regs \
|
||||
+ _udivdi3 _divdi3 _umoddi3 _moddi3
|
||||
+
|
||||
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
|
||||
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
|
||||
+MULTILIB_MATCHES=
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,15 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+# Compile crtbeginS.o and crtendS.o with pic.
|
||||
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
|
||||
+# Compile libgcc2.a with pic.
|
||||
+TARGET_LIBGCC2_CFLAGS = -fPIC
|
||||
+
|
||||
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
|
||||
+# the symbol versions that glibc used.
|
||||
+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
|
||||
+
|
||||
+# Use unwind-dw2-fde
|
||||
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
|
||||
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
|
||||
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-04-21 10:12:35.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-12 15:59:46.000000000 -0500
|
||||
@@ -664,6 +664,12 @@
|
||||
extra_parts=""
|
||||
use_collect2=yes
|
||||
;;
|
||||
+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
+ gnu_ld=yes
|
||||
+ ;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||
@@ -725,6 +731,10 @@
|
||||
tmake_file="cris/t-cris cris/t-elfmulti"
|
||||
gas=yes
|
||||
;;
|
||||
+cris-*-linux-uclibc*)
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
|
||||
+ ;;
|
||||
cris-*-linux*)
|
||||
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
|
||||
@@ -988,6 +998,11 @@
|
||||
thread_file='single'
|
||||
fi
|
||||
;;
|
||||
+i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
|
||||
+ # with ELF format using uClibc
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
|
||||
+ ;;
|
||||
i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
|
||||
# with ELF format using glibc 2
|
||||
# aka GNU/Linux C library 6
|
||||
@@ -1547,6 +1562,16 @@
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
;;
|
||||
+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
+ case ${target} in
|
||||
+ mipsisa32*-*)
|
||||
+ target_cpu_default="MASK_SOFT_FLOAT"
|
||||
+ tm_defines="MIPS_ISA_DEFAULT=32"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
|
||||
+ ;;
|
||||
mips*-*-linux*) # Linux MIPS, either endian.
|
||||
tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
case ${target} in
|
||||
@@ -1764,6 +1789,10 @@
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||
;;
|
||||
+powerpc-*-linux-uclibc*)
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
|
||||
+ ;;
|
||||
powerpc-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||
@@ -1916,7 +1945,7 @@
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
|
||||
;;
|
||||
sh-*-linux* | sh[2346lbe]*-*-linux*)
|
||||
- tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
|
||||
+ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver"
|
||||
case ${target} in
|
||||
sh*be-*-* | sh*eb-*-*) ;;
|
||||
*)
|
||||
@@ -1924,9 +1953,17 @@
|
||||
tmake_file="${tmake_file} sh/t-le"
|
||||
;;
|
||||
esac
|
||||
- tmake_file="${tmake_file} sh/t-linux"
|
||||
+ case ${target} in
|
||||
+ *-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;;
|
||||
+ *) tmake_file="${tmake_file} t-linux sh/t-linux" ;;
|
||||
+ esac
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
|
||||
case ${target} in
|
||||
+ sh64*-*-linux-uclibc*)
|
||||
+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
|
||||
+ tm_file="${tm_file} sh/sh64.h"
|
||||
+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
|
||||
+ ;;
|
||||
sh64*)
|
||||
tmake_file="${tmake_file} sh/t-sh64"
|
||||
tm_file="${tm_file} sh/sh64.h"
|
||||
diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4
|
||||
--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500
|
||||
+++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -689,6 +689,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig
|
||||
--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
|
||||
+++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500
|
||||
@@ -602,6 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1262,6 +1263,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
3246
toolchain/gcc/patches/3.4.6-nonmips/200-uclibc-locale.patch
Normal file
3246
toolchain/gcc/patches/3.4.6-nonmips/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
47
toolchain/gcc/patches/3.4.6-nonmips/300-libstdc++-pic.patch
Normal file
47
toolchain/gcc/patches/3.4.6-nonmips/300-libstdc++-pic.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am~ 2003-02-28 09:21:05.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am 2003-02-28 09:28:50.000000000 +0100
|
||||
@@ -224,6 +224,10 @@
|
||||
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCPP_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.in~ 2004-02-21 09:55:48.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in 2004-02-21 09:59:34.000000000 +0100
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -618,6 +618,7 @@
|
||||
distclean-tags distdir dvi dvi-am info info-am install \
|
||||
install-am install-data install-data-am install-data-local \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
+ install-exec-local \
|
||||
install-man install-strip install-toolexeclibLTLIBRARIES \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
@@ -707,6 +708,11 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
119
toolchain/gcc/patches/3.4.6-nonmips/601-gcc34-arm-ldm.patch
Normal file
119
toolchain/gcc/patches/3.4.6-nonmips/601-gcc34-arm-ldm.patch
Normal file
@@ -0,0 +1,119 @@
|
||||
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
|
||||
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
|
||||
@@ -8520,6 +8520,26 @@
|
||||
return_used_this_function = 0;
|
||||
}
|
||||
|
||||
+/* Return the number (counting from 0) of
|
||||
+ the least significant set bit in MASK. */
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+inline
|
||||
+#endif
|
||||
+static int
|
||||
+number_of_first_bit_set (mask)
|
||||
+ int mask;
|
||||
+{
|
||||
+ int bit;
|
||||
+
|
||||
+ for (bit = 0;
|
||||
+ (mask & (1 << bit)) == 0;
|
||||
+ ++bit)
|
||||
+ continue;
|
||||
+
|
||||
+ return bit;
|
||||
+}
|
||||
+
|
||||
const char *
|
||||
arm_output_epilogue (rtx sibling)
|
||||
{
|
||||
@@ -8753,27 +8773,47 @@
|
||||
saved_regs_mask |= (1 << PC_REGNUM);
|
||||
}
|
||||
|
||||
- /* Load the registers off the stack. If we only have one register
|
||||
- to load use the LDR instruction - it is faster. */
|
||||
- if (saved_regs_mask == (1 << LR_REGNUM))
|
||||
- {
|
||||
- /* The exception handler ignores the LR, so we do
|
||||
- not really need to load it off the stack. */
|
||||
- if (eh_ofs)
|
||||
- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
- else
|
||||
- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
|
||||
- }
|
||||
- else if (saved_regs_mask)
|
||||
+ if (saved_regs_mask)
|
||||
{
|
||||
- if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
- /* Note - write back to the stack register is not enabled
|
||||
- (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
- in the list of registers and if we add writeback the
|
||||
- instruction becomes UNPREDICTABLE. */
|
||||
- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ /* Load the registers off the stack. If we only have one register
|
||||
+ to load use the LDR instruction - it is faster. */
|
||||
+ if (bit_count (saved_regs_mask) == 1)
|
||||
+ {
|
||||
+ int reg = number_of_first_bit_set (saved_regs_mask);
|
||||
+
|
||||
+ switch (reg)
|
||||
+ {
|
||||
+ case SP_REGNUM:
|
||||
+ /* Mustn't use base writeback when loading SP. */
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+
|
||||
+ case LR_REGNUM:
|
||||
+ if (eh_ofs)
|
||||
+ {
|
||||
+ /* The exception handler ignores the LR, so we do
|
||||
+ not really need to load it off the stack. */
|
||||
+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ /* else fall through */
|
||||
+
|
||||
+ default:
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ {
|
||||
+ if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
+ /* Note - write back to the stack register is not enabled
|
||||
+ (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
+ in the list of registers and if we add writeback the
|
||||
+ instruction becomes UNPREDICTABLE. */
|
||||
+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ else
|
||||
+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (current_function_pretend_args_size)
|
||||
@@ -11401,22 +11441,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Return the number (counting from 0) of
|
||||
- the least significant set bit in MASK. */
|
||||
-
|
||||
-inline static int
|
||||
-number_of_first_bit_set (int mask)
|
||||
-{
|
||||
- int bit;
|
||||
-
|
||||
- for (bit = 0;
|
||||
- (mask & (1 << bit)) == 0;
|
||||
- ++bit)
|
||||
- continue;
|
||||
-
|
||||
- return bit;
|
||||
-}
|
||||
-
|
||||
/* Generate code to return from a thumb function.
|
||||
If 'reg_containing_return_addr' is -1, then the return address is
|
||||
actually on the stack, at the stack pointer. */
|
||||
@@ -0,0 +1,22 @@
|
||||
--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
libmath_la_SOURCES = stubs.c
|
||||
|
||||
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
|
||||
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
# Only compiling "C" sources in this directory.
|
||||
LIBTOOL = @LIBTOOL@ --tag CC
|
||||
--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
|
||||
|
||||
# -I/-D flags to pass when compiling.
|
||||
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
|
||||
|
||||
44
toolchain/gcc/patches/3.4.6-nonmips/700-pr15068-fix.patch
Normal file
44
toolchain/gcc/patches/3.4.6-nonmips/700-pr15068-fix.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
See http://gcc.gnu.org/PR15068
|
||||
|
||||
Fixes error
|
||||
|
||||
../sysdeps/generic/s_fmax.c: In function `__fmax':
|
||||
../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
|
||||
Please submit a full bug report,
|
||||
with preprocessed source if appropriate.
|
||||
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
|
||||
make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
|
||||
make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
|
||||
make[1]: *** [math/others] Error 2
|
||||
make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
|
||||
make: *** [all] Error 2
|
||||
|
||||
[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
|
||||
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
|
||||
|
||||
--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
|
||||
+++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
|
||||
@@ -1878,6 +1878,7 @@
|
||||
rtx set_src = SET_SRC (pc_set (BB_END (bb)));
|
||||
rtx cond_true = XEXP (set_src, 0);
|
||||
rtx reg = XEXP (cond_true, 0);
|
||||
+ enum rtx_code inv_cond;
|
||||
|
||||
if (GET_CODE (reg) == SUBREG)
|
||||
reg = SUBREG_REG (reg);
|
||||
@@ -1886,11 +1887,13 @@
|
||||
in the form of a comparison of a register against zero.
|
||||
If the condition is more complex than that, then it is safe
|
||||
not to record any information. */
|
||||
- if (GET_CODE (reg) == REG
|
||||
+ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
|
||||
+ if (inv_cond != UNKNOWN
|
||||
+ && GET_CODE (reg) == REG
|
||||
&& XEXP (cond_true, 1) == const0_rtx)
|
||||
{
|
||||
rtx cond_false
|
||||
- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
|
||||
+ = gen_rtx_fmt_ee (inv_cond,
|
||||
GET_MODE (cond_true), XEXP (cond_true, 0),
|
||||
XEXP (cond_true, 1));
|
||||
if (GET_CODE (XEXP (set_src, 1)) == PC)
|
||||
70
toolchain/gcc/patches/3.4.6-nonmips/800-arm-bigendian.patch
Normal file
70
toolchain/gcc/patches/3.4.6-nonmips/800-arm-bigendian.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 15:43:40.000000000 -0500
|
||||
@@ -30,17 +30,34 @@
|
||||
/* Do not assume anything about header files. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
/* Default is to use APCS-32 mode. */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_APCS_32 | \
|
||||
+ ARM_FLAG_MMU_TRAPS | \
|
||||
+ TARGET_ENDIAN_DEFAULT )
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
@@ -101,7 +118,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
#endif
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:01:25.000000000 -0500
|
||||
@@ -672,6 +672,11 @@
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
@@ -0,0 +1,27 @@
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:08:18.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 16:06:24.000000000 -0500
|
||||
@@ -107,7 +107,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
#else
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:08:18.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:03:25.000000000 -0500
|
||||
@@ -666,6 +666,11 @@
|
||||
;;
|
||||
arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
@@ -0,0 +1,270 @@
|
||||
Note... modified my mjn3 to not conflict with the big endian arm patch.
|
||||
Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
|
||||
Also changed
|
||||
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
%{!mcpu=*:-mcpu=xscale} \
|
||||
%{mhard-float:-mfpu=fpa} \
|
||||
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
to
|
||||
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
%{mhard-float:-mfpu=fpa} \
|
||||
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
in gcc/config/arm/linux-elf.h.
|
||||
#
|
||||
# Submitted:
|
||||
#
|
||||
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
|
||||
#
|
||||
# Description:
|
||||
#
|
||||
# Nicholas Pitre released this patch for gcc soft-float support here:
|
||||
# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
|
||||
#
|
||||
# This version has been adapted to work with gcc 3.4.0.
|
||||
#
|
||||
# The original patch doesn't distinguish between softfpa and softvfp modes
|
||||
# in the way Nicholas Pitre probably meant. His description is:
|
||||
#
|
||||
# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
|
||||
# floats can be achieved with -mhard-float or with the configure
|
||||
# --with-float=hard option. If -msoft-float or --with-float=soft is used then
|
||||
# software float support will be used just like the default but with the legacy
|
||||
# big endian word ordering for double float representation instead."
|
||||
#
|
||||
# Which means the following:
|
||||
#
|
||||
# * If you compile without -mhard-float or -msoft-float, you should get
|
||||
# software floating point, using the VFP format. The produced object file
|
||||
# should have these flags in its header:
|
||||
#
|
||||
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||
#
|
||||
# * If you compile with -mhard-float, you should get hardware floating point,
|
||||
# which always uses the FPA format. Object file header flags should be:
|
||||
#
|
||||
# private flags = 0: [APCS-32] [FPA float format]
|
||||
#
|
||||
# * If you compile with -msoft-float, you should get software floating point,
|
||||
# using the FPA format. This is done for compatibility reasons with many
|
||||
# existing distributions. Object file header flags should be:
|
||||
#
|
||||
# private flags = 200: [APCS-32] [FPA float format] [software FP]
|
||||
#
|
||||
# The original patch from Nicholas Pitre contained the following constructs:
|
||||
#
|
||||
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
# %{mhard-float:-mfpu=fpa} \
|
||||
# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||
#
|
||||
# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
|
||||
# is probably the reason Robert Schwebel modified it to:
|
||||
#
|
||||
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
# %{mhard-float:-mfpu=fpa} \
|
||||
# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
|
||||
#
|
||||
# But this causes the following behaviour:
|
||||
#
|
||||
# * If you compile without -mhard-float or -msoft-float, the compiler generates
|
||||
# software floating point instructions, but *nothing* is passed to the
|
||||
# assembler, which results in an object file which has flags:
|
||||
#
|
||||
# private flags = 0: [APCS-32] [FPA float format]
|
||||
#
|
||||
# This is not correct!
|
||||
#
|
||||
# * If you compile with -mhard-float, the compiler generates hardware floating
|
||||
# point instructions, and passes "-mfpu=fpa" to the assembler, which results
|
||||
# in an object file which has the same flags as in the previous item, but now
|
||||
# those *are* correct.
|
||||
#
|
||||
# * If you compile with -msoft-float, the compiler generates software floating
|
||||
# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
|
||||
# order) to the assembler, which results in an object file with flags:
|
||||
#
|
||||
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||
#
|
||||
# This is not correct, because the last "-mfpu=" option on the assembler
|
||||
# command line determines the actual FPU convention used (which should be FPA
|
||||
# in this case).
|
||||
#
|
||||
# Therefore, I modified this patch to get the desired behaviour. Every
|
||||
# instance of the notation:
|
||||
#
|
||||
# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
|
||||
#
|
||||
# was changed to:
|
||||
#
|
||||
# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
|
||||
#
|
||||
# I also did the following:
|
||||
#
|
||||
# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
|
||||
# be consistent with Nicholas' original patch.
|
||||
# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
|
||||
# macros I could find. I think that if you compile without any options, you
|
||||
# would like to get the defaults. :)
|
||||
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
|
||||
# anymore. (The required functions are now in libgcc.)
|
||||
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -31,11 +31,16 @@
|
||||
#define TARGET_VERSION fputs (" (ARM/coff)", stderr)
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
|
||||
#endif
|
||||
|
||||
/* This is COFF, but prefer stabs. */
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -46,7 +46,9 @@
|
||||
|
||||
#ifndef SUBTARGET_ASM_FLOAT_SPEC
|
||||
#define SUBTARGET_ASM_FLOAT_SPEC "\
|
||||
-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
|
||||
+%{mapcs-float:-mfloat} \
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
#endif
|
||||
|
||||
#ifndef ASM_SPEC
|
||||
@@ -106,12 +108,17 @@
|
||||
#endif
|
||||
|
||||
#ifndef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
#endif
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||
#endif
|
||||
|
||||
#define TARGET_ASM_FILE_START_APP_OFF true
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
|
||||
@@ -44,12 +44,26 @@
|
||||
#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
#endif
|
||||
|
||||
-/* Default is to use APCS-32 mode. */
|
||||
+/*
|
||||
+ * Default is to use APCS-32 mode with soft-vfp.
|
||||
+ * The old Linux default for floats can be achieved with -mhard-float
|
||||
+ * or with the configure --with-float=hard option.
|
||||
+ * If -msoft-float or --with-float=soft is used then software float
|
||||
+ * support will be used just like the default but with the legacy
|
||||
+ * big endian word ordering for double float representation instead.
|
||||
+ */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT \
|
||||
- ( ARM_FLAG_APCS_32 | \
|
||||
- ARM_FLAG_MMU_TRAPS | \
|
||||
- TARGET_ENDIAN_DEFAULT )
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_SOFT_FLOAT \
|
||||
+ | TARGET_ENDIAN_DEFAULT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
+
|
||||
+#undef SUBTARGET_EXTRA_ASM_SPEC
|
||||
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
@@ -57,7 +71,7 @@
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
|
||||
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
@@ -72,7 +86,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
|
||||
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
|
||||
--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -4,7 +4,10 @@
|
||||
LIBGCC2_DEBUG_CFLAGS = -g0
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -30,7 +30,12 @@
|
||||
|
||||
/* Default to using APCS-32 and software floating point. */
|
||||
#ifndef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
#endif
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -49,11 +49,12 @@
|
||||
endian, regardless of the endian-ness of the memory
|
||||
system. */
|
||||
|
||||
-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
- %{mhard-float:-mfpu=fpa} \
|
||||
- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
+%{!mcpu=*:-mcpu=xscale} \
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
|
||||
+ { "mlittle-endian", "mno-thumb-interwork", "marm" }
|
||||
#endif
|
||||
442
toolchain/gcc/patches/3.4.6/100-uclibc-conf.patch
Normal file
442
toolchain/gcc/patches/3.4.6/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,442 @@
|
||||
diff -urN gcc-3.4.1-dist/boehm-gc/configure gcc-3.4.1/boehm-gc/configure
|
||||
--- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500
|
||||
+++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500
|
||||
@@ -1947,6 +1947,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN gcc-3.4.1-dist/boehm-gc/ltconfig gcc-3.4.1/boehm-gc/ltconfig
|
||||
--- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
|
||||
+++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -1981,6 +1981,23 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
|
||||
+ file_magic_cmd=/usr/bin/file
|
||||
+ file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
version_type=sunos
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500
|
||||
@@ -81,6 +81,18 @@
|
||||
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
||||
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
+ %{b} %{Wl,*:%*} \
|
||||
+ %{static:-Bstatic} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{symbolic:-Bsymbolic} \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||
+ -X \
|
||||
+ %{mbig-endian:-EB}" \
|
||||
+ SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#else
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} %{Wl,*:%*} \
|
||||
%{static:-Bstatic} \
|
||||
@@ -91,6 +103,7 @@
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#endif
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/cris/linux.h gcc-3.4.1/gcc/config/cris/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -79,6 +79,25 @@
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -93,6 +112,8 @@
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc gcc-3.4.1/gcc/config/cris/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/cris/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,3 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+TARGET_LIBGCC2_CFLAGS += -fPIC
|
||||
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/i386/linux.h gcc-3.4.1/gcc/config/i386/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -118,6 +118,15 @@
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
|
||||
%{static:-static}}}"
|
||||
#else
|
||||
+#if defined USE_UCLIBC
|
||||
+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!ibcs: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}}}"
|
||||
+#else
|
||||
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
@@ -126,6 +135,7 @@
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}}}"
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* A C statement (sans semicolon) to output to the stdio stream
|
||||
FILE the assembler definition of uninitialized global DECL named
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/mips/linux.h gcc-3.4.1/gcc/config/mips/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -109,6 +109,17 @@
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC \
|
||||
+ "%(endian_spec) \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!ibcs: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}}}"
|
||||
+#else
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
@@ -118,6 +129,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
%{static:-static}}}"
|
||||
+#endif
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
#define SUBTARGET_ASM_SPEC "\
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/linux.h gcc-3.4.1/gcc/config/rs6000/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -61,7 +61,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h gcc-3.4.1/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -947,6 +947,7 @@
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1124,6 +1125,10 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1290,6 +1295,7 @@
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/linux.h gcc-3.4.1/gcc/config/sh/linux.h
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -73,12 +73,21 @@
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define SUBTARGET_LINK_SPEC \
|
||||
+ "%{shared:-shared} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}"
|
||||
+#else
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}"
|
||||
+#endif
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc gcc-3.4.1/gcc/config/sh/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
|
||||
+LIB1ASMFUNCS_CACHE = _ic_invalidate
|
||||
+
|
||||
+LIB2FUNCS_EXTRA=
|
||||
+
|
||||
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
|
||||
+MULTILIB_DIRNAMES=
|
||||
+MULTILIB_MATCHES =
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
+
|
||||
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc gcc-3.4.1/gcc/config/sh/t-sh64-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/sh/t-sh64-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
|
||||
+
|
||||
+LIB1ASMFUNCS = \
|
||||
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
|
||||
+ _shcompact_call_trampoline _shcompact_return_trampoline \
|
||||
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
|
||||
+ _push_pop_shmedia_regs \
|
||||
+ _udivdi3 _divdi3 _umoddi3 _moddi3
|
||||
+
|
||||
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
|
||||
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
|
||||
+MULTILIB_MATCHES=
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/t-linux-uclibc gcc-3.4.1/gcc/config/t-linux-uclibc
|
||||
--- gcc-3.4.1-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/t-linux-uclibc 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -0,0 +1,15 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+# Compile crtbeginS.o and crtendS.o with pic.
|
||||
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
|
||||
+# Compile libgcc2.a with pic.
|
||||
+TARGET_LIBGCC2_CFLAGS = -fPIC
|
||||
+
|
||||
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
|
||||
+# the symbol versions that glibc used.
|
||||
+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
|
||||
+
|
||||
+# Use unwind-dw2-fde
|
||||
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
|
||||
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
|
||||
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-04-21 10:12:35.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-12 15:59:46.000000000 -0500
|
||||
@@ -664,6 +664,12 @@
|
||||
extra_parts=""
|
||||
use_collect2=yes
|
||||
;;
|
||||
+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
+ gnu_ld=yes
|
||||
+ ;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||
@@ -725,6 +731,10 @@
|
||||
tmake_file="cris/t-cris cris/t-elfmulti"
|
||||
gas=yes
|
||||
;;
|
||||
+cris-*-linux-uclibc*)
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
|
||||
+ ;;
|
||||
cris-*-linux*)
|
||||
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
|
||||
@@ -988,6 +998,11 @@
|
||||
thread_file='single'
|
||||
fi
|
||||
;;
|
||||
+i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
|
||||
+ # with ELF format using uClibc
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
|
||||
+ ;;
|
||||
i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
|
||||
# with ELF format using glibc 2
|
||||
# aka GNU/Linux C library 6
|
||||
@@ -1547,6 +1562,16 @@
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
;;
|
||||
+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
+ case ${target} in
|
||||
+ mipsisa32*-*)
|
||||
+ target_cpu_default="MASK_SOFT_FLOAT"
|
||||
+ tm_defines="MIPS_ISA_DEFAULT=32"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
|
||||
+ ;;
|
||||
mips*-*-linux*) # Linux MIPS, either endian.
|
||||
tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
case ${target} in
|
||||
@@ -1764,6 +1789,10 @@
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||
;;
|
||||
+powerpc-*-linux-uclibc*)
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
|
||||
+ ;;
|
||||
powerpc-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
|
||||
@@ -1916,7 +1945,7 @@
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
|
||||
;;
|
||||
sh-*-linux* | sh[2346lbe]*-*-linux*)
|
||||
- tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
|
||||
+ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver"
|
||||
case ${target} in
|
||||
sh*be-*-* | sh*eb-*-*) ;;
|
||||
*)
|
||||
@@ -1924,9 +1953,17 @@
|
||||
tmake_file="${tmake_file} sh/t-le"
|
||||
;;
|
||||
esac
|
||||
- tmake_file="${tmake_file} sh/t-linux"
|
||||
+ case ${target} in
|
||||
+ *-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc" ;;
|
||||
+ *) tmake_file="${tmake_file} t-linux sh/t-linux" ;;
|
||||
+ esac
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
|
||||
case ${target} in
|
||||
+ sh64*-*-linux-uclibc*)
|
||||
+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
|
||||
+ tm_file="${tm_file} sh/sh64.h"
|
||||
+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
|
||||
+ ;;
|
||||
sh64*)
|
||||
tmake_file="${tmake_file} sh/t-sh64"
|
||||
tm_file="${tm_file} sh/sh64.h"
|
||||
diff -urN gcc-3.4.1-dist/libtool.m4 gcc-3.4.1/libtool.m4
|
||||
--- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500
|
||||
+++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500
|
||||
@@ -689,6 +689,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
diff -urN gcc-3.4.1-dist/ltconfig gcc-3.4.1/ltconfig
|
||||
--- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
|
||||
+++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500
|
||||
@@ -602,6 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1262,6 +1263,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
3246
toolchain/gcc/patches/3.4.6/200-uclibc-locale.patch
Normal file
3246
toolchain/gcc/patches/3.4.6/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
47
toolchain/gcc/patches/3.4.6/300-libstdc++-pic.patch
Normal file
47
toolchain/gcc/patches/3.4.6/300-libstdc++-pic.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am~ 2003-02-28 09:21:05.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am 2003-02-28 09:28:50.000000000 +0100
|
||||
@@ -224,6 +224,10 @@
|
||||
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCPP_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.in~ 2004-02-21 09:55:48.000000000 +0100
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in 2004-02-21 09:59:34.000000000 +0100
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -618,6 +618,7 @@
|
||||
distclean-tags distdir dvi dvi-am info info-am install \
|
||||
install-am install-data install-data-am install-data-local \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
+ install-exec-local \
|
||||
install-man install-strip install-toolexeclibLTLIBRARIES \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
@@ -707,6 +708,11 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
119
toolchain/gcc/patches/3.4.6/601-gcc34-arm-ldm.patch
Normal file
119
toolchain/gcc/patches/3.4.6/601-gcc34-arm-ldm.patch
Normal file
@@ -0,0 +1,119 @@
|
||||
--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
|
||||
+++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
|
||||
@@ -8520,6 +8520,26 @@
|
||||
return_used_this_function = 0;
|
||||
}
|
||||
|
||||
+/* Return the number (counting from 0) of
|
||||
+ the least significant set bit in MASK. */
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+inline
|
||||
+#endif
|
||||
+static int
|
||||
+number_of_first_bit_set (mask)
|
||||
+ int mask;
|
||||
+{
|
||||
+ int bit;
|
||||
+
|
||||
+ for (bit = 0;
|
||||
+ (mask & (1 << bit)) == 0;
|
||||
+ ++bit)
|
||||
+ continue;
|
||||
+
|
||||
+ return bit;
|
||||
+}
|
||||
+
|
||||
const char *
|
||||
arm_output_epilogue (rtx sibling)
|
||||
{
|
||||
@@ -8753,27 +8773,47 @@
|
||||
saved_regs_mask |= (1 << PC_REGNUM);
|
||||
}
|
||||
|
||||
- /* Load the registers off the stack. If we only have one register
|
||||
- to load use the LDR instruction - it is faster. */
|
||||
- if (saved_regs_mask == (1 << LR_REGNUM))
|
||||
- {
|
||||
- /* The exception handler ignores the LR, so we do
|
||||
- not really need to load it off the stack. */
|
||||
- if (eh_ofs)
|
||||
- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
- else
|
||||
- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
|
||||
- }
|
||||
- else if (saved_regs_mask)
|
||||
+ if (saved_regs_mask)
|
||||
{
|
||||
- if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
- /* Note - write back to the stack register is not enabled
|
||||
- (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
- in the list of registers and if we add writeback the
|
||||
- instruction becomes UNPREDICTABLE. */
|
||||
- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ /* Load the registers off the stack. If we only have one register
|
||||
+ to load use the LDR instruction - it is faster. */
|
||||
+ if (bit_count (saved_regs_mask) == 1)
|
||||
+ {
|
||||
+ int reg = number_of_first_bit_set (saved_regs_mask);
|
||||
+
|
||||
+ switch (reg)
|
||||
+ {
|
||||
+ case SP_REGNUM:
|
||||
+ /* Mustn't use base writeback when loading SP. */
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+
|
||||
+ case LR_REGNUM:
|
||||
+ if (eh_ofs)
|
||||
+ {
|
||||
+ /* The exception handler ignores the LR, so we do
|
||||
+ not really need to load it off the stack. */
|
||||
+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ /* else fall through */
|
||||
+
|
||||
+ default:
|
||||
+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ {
|
||||
+ if (saved_regs_mask & (1 << SP_REGNUM))
|
||||
+ /* Note - write back to the stack register is not enabled
|
||||
+ (ie "ldmfd sp!..."). We know that the stack pointer is
|
||||
+ in the list of registers and if we add writeback the
|
||||
+ instruction becomes UNPREDICTABLE. */
|
||||
+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
|
||||
+ else
|
||||
+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (current_function_pretend_args_size)
|
||||
@@ -11401,22 +11441,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-/* Return the number (counting from 0) of
|
||||
- the least significant set bit in MASK. */
|
||||
-
|
||||
-inline static int
|
||||
-number_of_first_bit_set (int mask)
|
||||
-{
|
||||
- int bit;
|
||||
-
|
||||
- for (bit = 0;
|
||||
- (mask & (1 << bit)) == 0;
|
||||
- ++bit)
|
||||
- continue;
|
||||
-
|
||||
- return bit;
|
||||
-}
|
||||
-
|
||||
/* Generate code to return from a thumb function.
|
||||
If 'reg_containing_return_addr' is -1, then the return address is
|
||||
actually on the stack, at the stack pointer. */
|
||||
22
toolchain/gcc/patches/3.4.6/602-sdk-libstdc++-includes.patch
Normal file
22
toolchain/gcc/patches/3.4.6/602-sdk-libstdc++-includes.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
libmath_la_SOURCES = stubs.c
|
||||
|
||||
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
|
||||
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
# Only compiling "C" sources in this directory.
|
||||
LIBTOOL = @LIBTOOL@ --tag CC
|
||||
--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
|
||||
+++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
|
||||
|
||||
# -I/-D flags to pass when compiling.
|
||||
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
|
||||
|
||||
44
toolchain/gcc/patches/3.4.6/700-pr15068-fix.patch
Normal file
44
toolchain/gcc/patches/3.4.6/700-pr15068-fix.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
See http://gcc.gnu.org/PR15068
|
||||
|
||||
Fixes error
|
||||
|
||||
../sysdeps/generic/s_fmax.c: In function `__fmax':
|
||||
../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
|
||||
Please submit a full bug report,
|
||||
with preprocessed source if appropriate.
|
||||
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
|
||||
make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
|
||||
make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
|
||||
make[1]: *** [math/others] Error 2
|
||||
make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
|
||||
make: *** [all] Error 2
|
||||
|
||||
[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
|
||||
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
|
||||
|
||||
--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
|
||||
+++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
|
||||
@@ -1878,6 +1878,7 @@
|
||||
rtx set_src = SET_SRC (pc_set (BB_END (bb)));
|
||||
rtx cond_true = XEXP (set_src, 0);
|
||||
rtx reg = XEXP (cond_true, 0);
|
||||
+ enum rtx_code inv_cond;
|
||||
|
||||
if (GET_CODE (reg) == SUBREG)
|
||||
reg = SUBREG_REG (reg);
|
||||
@@ -1886,11 +1887,13 @@
|
||||
in the form of a comparison of a register against zero.
|
||||
If the condition is more complex than that, then it is safe
|
||||
not to record any information. */
|
||||
- if (GET_CODE (reg) == REG
|
||||
+ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
|
||||
+ if (inv_cond != UNKNOWN
|
||||
+ && GET_CODE (reg) == REG
|
||||
&& XEXP (cond_true, 1) == const0_rtx)
|
||||
{
|
||||
rtx cond_false
|
||||
- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
|
||||
+ = gen_rtx_fmt_ee (inv_cond,
|
||||
GET_MODE (cond_true), XEXP (cond_true, 0),
|
||||
XEXP (cond_true, 1));
|
||||
if (GET_CODE (XEXP (set_src, 1)) == PC)
|
||||
70
toolchain/gcc/patches/3.4.6/800-arm-bigendian.patch
Normal file
70
toolchain/gcc/patches/3.4.6/800-arm-bigendian.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 15:43:40.000000000 -0500
|
||||
@@ -30,17 +30,34 @@
|
||||
/* Do not assume anything about header files. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
/* Default is to use APCS-32 mode. */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_APCS_32 | \
|
||||
+ ARM_FLAG_MMU_TRAPS | \
|
||||
+ TARGET_ENDIAN_DEFAULT )
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
@@ -101,7 +118,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
#endif
|
||||
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:01:50.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:01:25.000000000 -0500
|
||||
@@ -672,6 +672,11 @@
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
27
toolchain/gcc/patches/3.4.6/810-arm-bigendian-uclibc.patch
Normal file
27
toolchain/gcc/patches/3.4.6/810-arm-bigendian-uclibc.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff -urN gcc-3.4.1-dist/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-08-16 16:08:18.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-16 16:06:24.000000000 -0500
|
||||
@@ -107,7 +107,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
#else
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
diff -urN gcc-3.4.1-dist/gcc/config.gcc gcc-3.4.1/gcc/config.gcc
|
||||
--- gcc-3.4.1-dist/gcc/config.gcc 2004-08-16 16:08:18.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config.gcc 2004-08-16 16:03:25.000000000 -0500
|
||||
@@ -666,6 +666,11 @@
|
||||
;;
|
||||
arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
270
toolchain/gcc/patches/3.4.6/arm-softfloat.patch.conditional
Normal file
270
toolchain/gcc/patches/3.4.6/arm-softfloat.patch.conditional
Normal file
@@ -0,0 +1,270 @@
|
||||
Note... modified my mjn3 to not conflict with the big endian arm patch.
|
||||
Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
|
||||
Also changed
|
||||
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
%{!mcpu=*:-mcpu=xscale} \
|
||||
%{mhard-float:-mfpu=fpa} \
|
||||
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
to
|
||||
#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
%{mhard-float:-mfpu=fpa} \
|
||||
%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
in gcc/config/arm/linux-elf.h.
|
||||
#
|
||||
# Submitted:
|
||||
#
|
||||
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
|
||||
#
|
||||
# Description:
|
||||
#
|
||||
# Nicholas Pitre released this patch for gcc soft-float support here:
|
||||
# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
|
||||
#
|
||||
# This version has been adapted to work with gcc 3.4.0.
|
||||
#
|
||||
# The original patch doesn't distinguish between softfpa and softvfp modes
|
||||
# in the way Nicholas Pitre probably meant. His description is:
|
||||
#
|
||||
# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
|
||||
# floats can be achieved with -mhard-float or with the configure
|
||||
# --with-float=hard option. If -msoft-float or --with-float=soft is used then
|
||||
# software float support will be used just like the default but with the legacy
|
||||
# big endian word ordering for double float representation instead."
|
||||
#
|
||||
# Which means the following:
|
||||
#
|
||||
# * If you compile without -mhard-float or -msoft-float, you should get
|
||||
# software floating point, using the VFP format. The produced object file
|
||||
# should have these flags in its header:
|
||||
#
|
||||
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||
#
|
||||
# * If you compile with -mhard-float, you should get hardware floating point,
|
||||
# which always uses the FPA format. Object file header flags should be:
|
||||
#
|
||||
# private flags = 0: [APCS-32] [FPA float format]
|
||||
#
|
||||
# * If you compile with -msoft-float, you should get software floating point,
|
||||
# using the FPA format. This is done for compatibility reasons with many
|
||||
# existing distributions. Object file header flags should be:
|
||||
#
|
||||
# private flags = 200: [APCS-32] [FPA float format] [software FP]
|
||||
#
|
||||
# The original patch from Nicholas Pitre contained the following constructs:
|
||||
#
|
||||
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
# %{mhard-float:-mfpu=fpa} \
|
||||
# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||
#
|
||||
# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
|
||||
# is probably the reason Robert Schwebel modified it to:
|
||||
#
|
||||
# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
# %{mhard-float:-mfpu=fpa} \
|
||||
# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
|
||||
#
|
||||
# But this causes the following behaviour:
|
||||
#
|
||||
# * If you compile without -mhard-float or -msoft-float, the compiler generates
|
||||
# software floating point instructions, but *nothing* is passed to the
|
||||
# assembler, which results in an object file which has flags:
|
||||
#
|
||||
# private flags = 0: [APCS-32] [FPA float format]
|
||||
#
|
||||
# This is not correct!
|
||||
#
|
||||
# * If you compile with -mhard-float, the compiler generates hardware floating
|
||||
# point instructions, and passes "-mfpu=fpa" to the assembler, which results
|
||||
# in an object file which has the same flags as in the previous item, but now
|
||||
# those *are* correct.
|
||||
#
|
||||
# * If you compile with -msoft-float, the compiler generates software floating
|
||||
# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
|
||||
# order) to the assembler, which results in an object file with flags:
|
||||
#
|
||||
# private flags = 600: [APCS-32] [VFP float format] [software FP]
|
||||
#
|
||||
# This is not correct, because the last "-mfpu=" option on the assembler
|
||||
# command line determines the actual FPU convention used (which should be FPA
|
||||
# in this case).
|
||||
#
|
||||
# Therefore, I modified this patch to get the desired behaviour. Every
|
||||
# instance of the notation:
|
||||
#
|
||||
# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
|
||||
#
|
||||
# was changed to:
|
||||
#
|
||||
# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
|
||||
#
|
||||
# I also did the following:
|
||||
#
|
||||
# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
|
||||
# be consistent with Nicholas' original patch.
|
||||
# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
|
||||
# macros I could find. I think that if you compile without any options, you
|
||||
# would like to get the defaults. :)
|
||||
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
|
||||
# anymore. (The required functions are now in libgcc.)
|
||||
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -31,11 +31,16 @@
|
||||
#define TARGET_VERSION fputs (" (ARM/coff)", stderr)
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
|
||||
#endif
|
||||
|
||||
/* This is COFF, but prefer stabs. */
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -46,7 +46,9 @@
|
||||
|
||||
#ifndef SUBTARGET_ASM_FLOAT_SPEC
|
||||
#define SUBTARGET_ASM_FLOAT_SPEC "\
|
||||
-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
|
||||
+%{mapcs-float:-mfloat} \
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
#endif
|
||||
|
||||
#ifndef ASM_SPEC
|
||||
@@ -106,12 +108,17 @@
|
||||
#endif
|
||||
|
||||
#ifndef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
#endif
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||
+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
|
||||
#endif
|
||||
|
||||
#define TARGET_ASM_FILE_START_APP_OFF true
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
|
||||
@@ -44,12 +44,26 @@
|
||||
#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
#endif
|
||||
|
||||
-/* Default is to use APCS-32 mode. */
|
||||
+/*
|
||||
+ * Default is to use APCS-32 mode with soft-vfp.
|
||||
+ * The old Linux default for floats can be achieved with -mhard-float
|
||||
+ * or with the configure --with-float=hard option.
|
||||
+ * If -msoft-float or --with-float=soft is used then software float
|
||||
+ * support will be used just like the default but with the legacy
|
||||
+ * big endian word ordering for double float representation instead.
|
||||
+ */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT \
|
||||
- ( ARM_FLAG_APCS_32 | \
|
||||
- ARM_FLAG_MMU_TRAPS | \
|
||||
- TARGET_ENDIAN_DEFAULT )
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_SOFT_FLOAT \
|
||||
+ | TARGET_ENDIAN_DEFAULT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
+
|
||||
+#undef SUBTARGET_EXTRA_ASM_SPEC
|
||||
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
@@ -57,7 +71,7 @@
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
|
||||
|
||||
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
|
||||
|
||||
@@ -72,7 +86,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
|
||||
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
|
||||
--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -4,7 +4,10 @@
|
||||
LIBGCC2_DEBUG_CFLAGS = -g0
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
|
||||
+++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -30,7 +30,12 @@
|
||||
|
||||
/* Default to using APCS-32 and software floating point. */
|
||||
#ifndef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
|
||||
+#define TARGET_DEFAULT \
|
||||
+ ( ARM_FLAG_SOFT_FLOAT \
|
||||
+ | ARM_FLAG_VFP \
|
||||
+ | ARM_FLAG_APCS_32 \
|
||||
+ | ARM_FLAG_APCS_FRAME \
|
||||
+ | ARM_FLAG_MMU_TRAPS )
|
||||
#endif
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
|
||||
--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
|
||||
+++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
|
||||
@@ -49,11 +49,12 @@
|
||||
endian, regardless of the endian-ness of the memory
|
||||
system. */
|
||||
|
||||
-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
|
||||
- %{mhard-float:-mfpu=fpa} \
|
||||
- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
|
||||
+#define SUBTARGET_EXTRA_ASM_SPEC "\
|
||||
+%{!mcpu=*:-mcpu=xscale} \
|
||||
+%{mhard-float:-mfpu=fpa} \
|
||||
+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
|
||||
|
||||
#ifndef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
|
||||
+ { "mlittle-endian", "mno-thumb-interwork", "marm" }
|
||||
#endif
|
||||
410
toolchain/gcc/patches/4.0.2/100-uclibc-conf.patch
Normal file
410
toolchain/gcc/patches/4.0.2/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,410 @@
|
||||
diff -urN gcc-4.1.0/boehm-gc/configure gcc-4.1.0-patched/boehm-gc/configure
|
||||
--- gcc-4.1.0/boehm-gc/configure 2005-04-13 19:31:24.000000000 -0500
|
||||
+++ gcc-4.1.0-patched/boehm-gc/configure 2005-04-25 20:47:19.919723167 -0500
|
||||
@@ -4320,6 +4320,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
diff -urN gcc-4.1.0/gcc/config/arm/linux-elf.h gcc-4.1.0-patched/gcc/config/arm/linux-elf.h
|
||||
--- gcc-4.1.0/gcc/config/arm/linux-elf.h 2005-03-02 10:27:42.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/arm/linux-elf.h 2005-04-25 20:45:31.795953620 -0500
|
||||
@@ -82,6 +82,18 @@
|
||||
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
||||
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
+ %{b} %{Wl,*:%*} \
|
||||
+ %{static:-Bstatic} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{symbolic:-Bsymbolic} \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
|
||||
+ -X \
|
||||
+ %{mbig-endian:-EB}" \
|
||||
+ SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#else
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} %{Wl,*:%*} \
|
||||
%{static:-Bstatic} \
|
||||
@@ -92,6 +104,7 @@
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
+#endif
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
diff -urN gcc-4.1.0/gcc/config/cris/linux.h gcc-4.1.0-patched/gcc/config/cris/linux.h
|
||||
--- gcc-4.1.0/gcc/config/cris/linux.h 2005-04-23 23:01:27.000000000 -0500
|
||||
+++ gcc-4.1.0-patched/gcc/config/cris/linux.h 2005-04-25 20:45:31.796953451 -0500
|
||||
@@ -73,6 +73,25 @@
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -87,6 +106,8 @@
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
diff -urN gcc-4.1.0/gcc/config/cris/t-linux-uclibc gcc-4.1.0-patched/gcc/config/cris/t-linux-uclibc
|
||||
--- gcc-4.1.0/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/cris/t-linux-uclibc 2005-04-25 20:45:31.797953283 -0500
|
||||
@@ -0,0 +1,3 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+TARGET_LIBGCC2_CFLAGS += -fPIC
|
||||
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
|
||||
diff -urN gcc-4.1.0/gcc/config/i386/linux.h gcc-4.1.0-patched/gcc/config/i386/linux.h
|
||||
--- gcc-4.1.0/gcc/config/i386/linux.h 2004-11-27 10:45:14.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/i386/linux.h 2005-04-25 21:21:05.828409973 -0500
|
||||
@@ -104,8 +104,13 @@
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#if defined USE_UCLIBC
|
||||
+#define LINK_EMULATION "elf_i386"
|
||||
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define LINK_EMULATION "elf_i386"
|
||||
#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
@@ -144,6 +149,7 @@
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Handle special EH pointer encodings. Absolute, pc-relative, and
|
||||
indirect are handled automatically. */
|
||||
diff -urN gcc-4.1.0/gcc/config/mips/linux.h gcc-4.1.0-patched/gcc/config/mips/linux.h
|
||||
--- gcc-4.1.0/gcc/config/mips/linux.h 2005-01-25 20:04:46.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/mips/linux.h 2005-04-25 20:45:31.809951259 -0500
|
||||
@@ -108,6 +108,17 @@
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_SPEC \
|
||||
+ "%(endian_spec) \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ %{!ibcs: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}}}"
|
||||
+#else
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
@@ -117,6 +128,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
%{static:-static}}}"
|
||||
+#endif
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
#define SUBTARGET_ASM_SPEC "%{mabi=64: -64} %{!mno-abicalls:-KPIC}"
|
||||
diff -urN gcc-4.1.0/gcc/config/rs6000/linux.h gcc-4.1.0-patched/gcc/config/rs6000/linux.h
|
||||
--- gcc-4.1.0/gcc/config/rs6000/linux.h 2004-12-01 20:21:28.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/rs6000/linux.h 2005-04-25 20:45:31.810951091 -0500
|
||||
@@ -69,7 +69,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
diff -urN gcc-4.1.0/gcc/config/rs6000/sysv4.h gcc-4.1.0-patched/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-4.1.0/gcc/config/rs6000/sysv4.h 2005-04-13 19:26:50.000000000 -0500
|
||||
+++ gcc-4.1.0-patched/gcc/config/rs6000/sysv4.h 2005-04-25 20:45:31.812950754 -0500
|
||||
@@ -957,6 +957,7 @@
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1135,6 +1136,10 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1301,6 +1306,7 @@
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
diff -urN gcc-4.1.0/gcc/config/sh/linux.h gcc-4.1.0-patched/gcc/config/sh/linux.h
|
||||
--- gcc-4.1.0/gcc/config/sh/linux.h 2005-02-28 21:39:03.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/sh/linux.h 2005-04-25 20:45:31.814950416 -0500
|
||||
@@ -55,12 +55,21 @@
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define SUBTARGET_LINK_SPEC \
|
||||
+ "%{shared:-shared} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}"
|
||||
+#else
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}"
|
||||
+#endif
|
||||
|
||||
/* Output assembler code to STREAM to call the profiler. */
|
||||
|
||||
diff -urN gcc-4.1.0/gcc/config/sh/t-linux-uclibc gcc-4.1.0-patched/gcc/config/sh/t-linux-uclibc
|
||||
--- gcc-4.1.0/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/sh/t-linux-uclibc 2005-04-25 20:45:31.814950416 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
|
||||
+LIB1ASMFUNCS_CACHE = _ic_invalidate
|
||||
+
|
||||
+LIB2FUNCS_EXTRA=
|
||||
+
|
||||
+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
|
||||
+MULTILIB_DIRNAMES=
|
||||
+MULTILIB_MATCHES =
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
+
|
||||
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
|
||||
diff -urN gcc-4.1.0/gcc/config/sh/t-sh64-uclibc gcc-4.1.0-patched/gcc/config/sh/t-sh64-uclibc
|
||||
--- gcc-4.1.0/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/sh/t-sh64-uclibc 2005-04-25 20:45:31.815950248 -0500
|
||||
@@ -0,0 +1,13 @@
|
||||
+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
|
||||
+
|
||||
+LIB1ASMFUNCS = \
|
||||
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
|
||||
+ _shcompact_call_trampoline _shcompact_return_trampoline \
|
||||
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
|
||||
+ _push_pop_shmedia_regs \
|
||||
+ _udivdi3 _divdi3 _umoddi3 _moddi3
|
||||
+
|
||||
+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
|
||||
+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
|
||||
+MULTILIB_MATCHES=
|
||||
+MULTILIB_EXCEPTIONS=
|
||||
diff -urN gcc-4.1.0/gcc/config/t-linux-uclibc gcc-4.1.0-patched/gcc/config/t-linux-uclibc
|
||||
--- gcc-4.1.0/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/gcc/config/t-linux-uclibc 2005-04-25 20:45:31.815950248 -0500
|
||||
@@ -0,0 +1,15 @@
|
||||
+T_CFLAGS = -DUSE_UCLIBC
|
||||
+
|
||||
+# Compile crtbeginS.o and crtendS.o with pic.
|
||||
+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
|
||||
+# Compile libgcc2.a with pic.
|
||||
+TARGET_LIBGCC2_CFLAGS = -fPIC
|
||||
+
|
||||
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
|
||||
+# the symbol versions that glibc used.
|
||||
+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
|
||||
+
|
||||
+# Use unwind-dw2-fde
|
||||
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
|
||||
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
|
||||
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
|
||||
diff -urN gcc-4.1.0/gcc/config.gcc gcc-4.1.0-patched/gcc/config.gcc
|
||||
--- gcc-4.1.0/gcc/config.gcc 2005-04-23 23:01:23.000000000 -0500
|
||||
+++ gcc-4.1.0-patched/gcc/config.gcc 2005-04-25 21:12:43.375594576 -0500
|
||||
@@ -448,7 +448,14 @@
|
||||
case ${enable_threads} in
|
||||
"" | yes | posix) thread_file='posix' ;;
|
||||
esac
|
||||
- tmake_file="t-slibgcc-elf-ver t-linux"
|
||||
+ case ${target} in
|
||||
+ *-linux*uclibc*)
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux"
|
||||
+ ;;
|
||||
+ esac
|
||||
;;
|
||||
*-*-gnu*)
|
||||
# On the Hurd, the setup is just about the same on
|
||||
@@ -667,6 +674,12 @@
|
||||
extra_parts=""
|
||||
use_collect2=yes
|
||||
;;
|
||||
+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
|
||||
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
|
||||
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
+ gnu_ld=yes
|
||||
+ ;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
tmake_file="${tmake_file} arm/t-arm arm/t-linux"
|
||||
@@ -765,6 +778,10 @@
|
||||
gas=yes
|
||||
extra_options="${extra_options} cris/elf.opt"
|
||||
;;
|
||||
+cris-*-linux-uclibc*)
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
|
||||
+ ;;
|
||||
cris-*-linux*)
|
||||
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
|
||||
# We need to avoid using t-linux, so override default tmake_file
|
||||
@@ -1443,6 +1460,16 @@
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
;;
|
||||
+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
|
||||
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
+ case ${target} in
|
||||
+ mipsisa32*-*)
|
||||
+ target_cpu_default="MASK_SOFT_FLOAT"
|
||||
+ tm_defines="MIPS_ISA_DEFAULT=32"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
|
||||
+ ;;
|
||||
mips*-*-linux*) # Linux MIPS, either endian.
|
||||
tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
|
||||
case ${target} in
|
||||
@@ -1659,6 +1686,10 @@
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
|
||||
;;
|
||||
+powerpc-*-linux-uclibc*)
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
|
||||
+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
|
||||
+ ;;
|
||||
powerpc-*-linux*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
|
||||
@@ -1821,6 +1852,8 @@
|
||||
esac
|
||||
tm_file="${tm_file} sh/elf.h"
|
||||
case ${target} in
|
||||
+ sh*-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc"
|
||||
+ tm_file="${tm_file} linux.h sh/linux.h" ;;
|
||||
sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
|
||||
tm_file="${tm_file} linux.h sh/linux.h" ;;
|
||||
sh*-*-kaos*) tm_file="${tm_file} sh/embed-elf.h kaos.h sh/kaos-sh.h"
|
||||
@@ -1840,6 +1873,11 @@
|
||||
*-*-netbsd)
|
||||
tmake_file="${tmake_file} sh/t-netbsd"
|
||||
;;
|
||||
+ sh64*-*-linux-uclibc*)
|
||||
+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
|
||||
+ tm_file="${tm_file} sh/sh64.h"
|
||||
+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
|
||||
+ ;;
|
||||
sh64*-*-linux*)
|
||||
tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
|
||||
tm_file="${tm_file} sh/sh64.h"
|
||||
diff -urN gcc-4.1.0/libtool.m4 gcc-4.1.0-patched/libtool.m4
|
||||
--- gcc-4.1.0/libtool.m4 2005-04-13 19:31:24.000000000 -0500
|
||||
+++ gcc-4.1.0-patched/libtool.m4 2005-04-25 20:47:51.679369687 -0500
|
||||
@@ -743,6 +743,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
diff -urN gcc-4.1.0/ltconfig gcc-4.1.0-patched/ltconfig
|
||||
--- gcc-4.1.0/ltconfig 2004-10-02 11:33:06.000000000 -0500
|
||||
+++ gcc-4.1.0-patched/ltconfig 2005-04-25 20:45:31.836946707 -0500
|
||||
@@ -602,6 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1273,6 +1274,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
3191
toolchain/gcc/patches/4.0.2/200-uclibc-locale.patch
Normal file
3191
toolchain/gcc/patches/4.0.2/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
553
toolchain/gcc/patches/4.0.3/100-uclibc-conf.patch
Normal file
553
toolchain/gcc/patches/4.0.3/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,553 @@
|
||||
--- gcc-4.0.2/gcc/config/t-linux-uclibc
|
||||
+++ gcc-4.0.2/gcc/config/t-linux-uclibc
|
||||
@@ -0,0 +1,5 @@
|
||||
+# Remove glibc specific files added in t-linux
|
||||
+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
|
||||
+
|
||||
+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
|
||||
+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
|
||||
--- gcc-4.0.2/gcc/config.gcc
|
||||
+++ gcc-4.0.2/gcc/config.gcc
|
||||
@@ -1778,7 +1778,7 @@
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
||||
@@ -2234,10 +2234,16 @@
|
||||
*)
|
||||
echo "*** Configuration ${target} not supported" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
+
|
||||
+# Rather than hook into each target, just do it after all the linux
|
||||
+# targets have been processed
|
||||
+case ${target} in
|
||||
+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
|
||||
+esac
|
||||
|
||||
case ${target} in
|
||||
i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
|
||||
tmake_file="${tmake_file} i386/t-gmm_malloc"
|
||||
;;
|
||||
--- gcc-4.0.2/gcc/config/alpha/linux-elf.h
|
||||
+++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
|
||||
@@ -27,7 +27,11 @@
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
|
||||
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
--- gcc-4.0.2/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.0.2/gcc/config/arm/linux-elf.h
|
||||
@@ -81,14 +81,19 @@
|
||||
#define ENDFILE_SPEC \
|
||||
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} %{Wl,*:%*} \
|
||||
%{static:-Bstatic} \
|
||||
%{shared:-shared} \
|
||||
%{symbolic:-Bsymbolic} \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
%{mbig-endian:-EB}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
--- gcc-4.0.2/gcc/config/cris/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/cris/linux.h
|
||||
@@ -79,6 +79,25 @@
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -93,6 +112,8 @@
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
--- gcc-4.0.2/gcc/config/i386/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/i386/linux.h
|
||||
@@ -107,6 +107,11 @@
|
||||
#define LINK_EMULATION "elf_i386"
|
||||
#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#undef DYNAMIC_LINKER
|
||||
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#endif
|
||||
+
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "link_emulation", LINK_EMULATION },\
|
||||
--- gcc-4.0.2/gcc/config/i386/linux64.h
|
||||
+++ gcc-4.0.2/gcc/config/i386/linux64.h
|
||||
@@ -54,14 +54,21 @@
|
||||
When the -shared link option is used a final link is not being
|
||||
done. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
|
||||
+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
|
||||
+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
|
||||
%{static:-static}}"
|
||||
|
||||
#define MULTILIB_DEFAULTS { "m64" }
|
||||
--- gcc-4.0.2/gcc/config/ia64/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/ia64/linux.h
|
||||
@@ -37,13 +37,18 @@
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
|
||||
--- gcc-4.0.2/gcc/config/m68k/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/m68k/linux.h
|
||||
@@ -127,12 +127,17 @@
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m m68kelf %{shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static}}"
|
||||
|
||||
/* For compatibility with linux/a.out */
|
||||
--- gcc-4.0.2/gcc/config/mips/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/mips/linux.h
|
||||
@@ -108,14 +108,19 @@
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
--- gcc-4.0.2/gcc/config/pa/pa-linux.h
|
||||
+++ gcc-4.0.2/gcc/config/pa/pa-linux.h
|
||||
@@ -82,13 +82,18 @@
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
/* glibc's profiling functions don't need gcc to allocate counters. */
|
||||
--- gcc-4.0.2/gcc/config/rs6000/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/rs6000/linux.h
|
||||
@@ -69,7 +69,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
--- gcc-4.0.2/gcc/config/rs6000/sysv4.h
|
||||
+++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
|
||||
@@ -949,6 +949,7 @@
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1127,6 +1128,10 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1293,6 +1298,7 @@
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
--- gcc-4.0.2/gcc/config/s390/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/s390/linux.h
|
||||
@@ -77,6 +77,13 @@
|
||||
#define MULTILIB_DEFAULTS { "m31" }
|
||||
#endif
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
@@ -86,8 +93,8 @@
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker: \
|
||||
- %{m31:-dynamic-linker /lib/ld.so.1} \
|
||||
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
|
||||
+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
|
||||
+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
|
||||
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
--- gcc-4.0.2/gcc/config/sh/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/sh/linux.h
|
||||
@@ -67,11 +67,16 @@
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}"
|
||||
|
||||
#undef LIB_SPEC
|
||||
--- gcc-4.0.2/gcc/config/sparc/linux.h
|
||||
+++ gcc-4.0.2/gcc/config/sparc/linux.h
|
||||
@@ -130,14 +130,19 @@
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
|
||||
--- gcc-4.0.2/gcc/config/sparc/linux64.h
|
||||
+++ gcc-4.0.2/gcc/config/sparc/linux64.h
|
||||
@@ -167,12 +166,17 @@
|
||||
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||
{ "link_arch", LINK_ARCH_SPEC },
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}} \
|
||||
"
|
||||
|
||||
--- gcc-4.0.2/libtool.m4
|
||||
+++ gcc-4.0.2/libtool.m4
|
||||
@@ -682,6 +682,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
--- gcc-4.0.2/ltconfig
|
||||
+++ gcc-4.0.2/ltconfig
|
||||
@@ -603,6 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1274,6 +1275,23 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc-4.0.2/libffi/configure
|
||||
+++ gcc-4.0.2/libffi/configure
|
||||
@@ -3457,6 +3457,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.0.2/libgfortran/configure
|
||||
+++ gcc-4.0.2/libgfortran/configure
|
||||
@@ -3681,6 +3681,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.0.2/libjava/configure
|
||||
+++ gcc-4.0.2/libjava/configure
|
||||
@@ -4351,6 +4351,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.0.2/libmudflap/configure
|
||||
+++ gcc-4.0.2/libmudflap/configure
|
||||
@@ -5380,6 +5380,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.0.2/libobjc/configure
|
||||
+++ gcc-4.0.2/libobjc/configure
|
||||
@@ -3283,6 +3283,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.0.2/boehm-gc/configure
|
||||
+++ gcc-4.0.2/boehm-gc/configure
|
||||
@@ -4320,6 +4320,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.0.2/configure
|
||||
+++ gcc-4.0.2/configure
|
||||
@@ -1141,7 +1141,7 @@
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
--- gcc-4.0.2/configure.in
|
||||
+++ gcc-4.0.2/configure.in
|
||||
@@ -350,7 +350,7 @@
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
--- gcc-4.0.2/contrib/regression/objs-gcc.sh
|
||||
+++ gcc-4.0.2/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc-4.0.2/zlib/configure
|
||||
+++ gcc-4.0.2/zlib/configure
|
||||
@@ -3426,6 +3426,11 @@
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
3237
toolchain/gcc/patches/4.0.3/200-uclibc-locale.patch
Normal file
3237
toolchain/gcc/patches/4.0.3/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
47
toolchain/gcc/patches/4.0.3/300-libstdc++-pic.patch
Normal file
47
toolchain/gcc/patches/4.0.3/300-libstdc++-pic.patch
Normal file
@@ -0,0 +1,47 @@
|
||||
diff -urN gcc-4.0.0-200/libstdc++-v3/src/Makefile.am gcc-4.0.0/libstdc++-v3/src/Makefile.am
|
||||
--- gcc-4.0.0-200/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600
|
||||
+++ gcc-4.0.0/libstdc++-v3/src/Makefile.am 2005-04-28 21:42:18.614344056 -0500
|
||||
@@ -214,6 +214,10 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
diff -urN gcc-4.0.0-200/libstdc++-v3/src/Makefile.in gcc-4.0.0/libstdc++-v3/src/Makefile.in
|
||||
--- gcc-4.0.0-200/libstdc++-v3/src/Makefile.in 2005-02-01 00:56:27.000000000 -0600
|
||||
+++ gcc-4.0.0/libstdc++-v3/src/Makefile.in 2005-04-28 21:44:20.868758560 -0500
|
||||
@@ -625,7 +625,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -664,7 +664,7 @@
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
- uninstall-toolexeclibLTLIBRARIES
|
||||
+ uninstall-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
|
||||
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
|
||||
@@ -743,6 +743,11 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
11
toolchain/gcc/patches/4.0.3/301-missing-execinfo_h.patch
Normal file
11
toolchain/gcc/patches/4.0.3/301-missing-execinfo_h.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
||||
11
toolchain/gcc/patches/4.0.3/302-c99-snprintf.patch
Normal file
11
toolchain/gcc/patches/4.0.3/302-c99-snprintf.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
|
||||
@@ -142,7 +142,7 @@
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
||||
12
toolchain/gcc/patches/4.0.3/303-c99-complex-ugly-hack.patch
Normal file
12
toolchain/gcc/patches/4.0.3/303-c99-complex-ugly-hack.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
|
||||
@@ -7194,6 +7194,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
22
toolchain/gcc/patches/4.0.3/602-sdk-libstdc++-includes.patch
Normal file
22
toolchain/gcc/patches/4.0.3/602-sdk-libstdc++-includes.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
|
||||
--- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
|
||||
@@ -18,5 +18,5 @@
|
||||
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
|
||||
|
||||
# -I/-D flags to pass when compiling.
|
||||
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
|
||||
--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
libmath_la_SOURCES = stubs.c
|
||||
|
||||
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
|
||||
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
# Only compiling "C" sources in this directory.
|
||||
LIBTOOL = @LIBTOOL@ --tag CC
|
||||
67
toolchain/gcc/patches/4.0.3/800-arm-bigendian.patch
Normal file
67
toolchain/gcc/patches/4.0.3/800-arm-bigendian.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
--- gcc-4.0.3/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.0.3/gcc/config/arm/linux-elf.h
|
||||
@@ -31,19 +31,33 @@
|
||||
/* Do not assume anything about header files. */
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
#undef TARGET_DEFAULT_FLOAT_ABI
|
||||
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (0)
|
||||
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
|
||||
|
||||
/* The GNU C++ standard library requires that these macros be defined. */
|
||||
#undef CPLUSPLUS_CPP_SPEC
|
||||
@@ -90,7 +104,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
--- gcc-4.0.3/gcc/config.gcc
|
||||
+++ gcc-4.0.3/gcc/config.gcc
|
||||
@@ -672,6 +672,11 @@
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="${tmake_file} arm/t-arm arm/t-linux"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
544
toolchain/gcc/patches/4.1.0/100-uclibc-conf.patch
Normal file
544
toolchain/gcc/patches/4.1.0/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,544 @@
|
||||
--- gcc-4.1.0/gcc/config/t-linux-uclibc
|
||||
+++ gcc-4.1.0/gcc/config/t-linux-uclibc
|
||||
@@ -0,0 +1,5 @@
|
||||
+# Remove glibc specific files added in t-linux
|
||||
+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
|
||||
+
|
||||
+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
|
||||
+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
|
||||
--- gcc-4.1.0/gcc/config.gcc
|
||||
+++ gcc-4.1.0/gcc/config.gcc
|
||||
@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*)
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
||||
@@ -2341,6 +2341,12 @@ m32c-*-elf*)
|
||||
;;
|
||||
esac
|
||||
|
||||
+# Rather than hook into each target, just do it after all the linux
|
||||
+# targets have been processed
|
||||
+case ${target} in
|
||||
+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
|
||||
+esac
|
||||
+
|
||||
case ${target} in
|
||||
i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
|
||||
tmake_file="${tmake_file} i386/t-gmm_malloc"
|
||||
--- gcc-4.1.0/boehm-gc/configure
|
||||
+++ gcc-4.1.0/boehm-gc/configure
|
||||
@@ -4320,6 +4320,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/configure
|
||||
+++ gcc-4.1.0/configure
|
||||
@@ -1133,7 +1133,7 @@ no)
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
--- gcc-4.1.0/configure.in
|
||||
+++ gcc-4.1.0/configure.in
|
||||
@@ -341,7 +341,7 @@ no)
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
--- gcc-4.1.0/contrib/regression/objs-gcc.sh
|
||||
+++ gcc-4.1.0/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc-4.1.0/gcc/config/alpha/linux-elf.h
|
||||
+++ gcc-4.1.0/gcc/config/alpha/linux-elf.h
|
||||
@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
|
||||
|
||||
+#if defined USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
|
||||
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
@@ -51,7 +51,11 @@
|
||||
|
||||
#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
|
||||
#define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} \
|
||||
--- gcc-4.1.0/gcc/config/cris/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/cris/linux.h
|
||||
@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
--- gcc-4.1.0/gcc/config/i386/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/i386/linux.h
|
||||
@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */
|
||||
#define LINK_EMULATION "elf_i386"
|
||||
#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
+#if defined USE_UCLIBC
|
||||
+#undef DYNAMIC_LINKER
|
||||
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#endif
|
||||
+
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "link_emulation", LINK_EMULATION },\
|
||||
--- gcc-4.1.0/gcc/config/i386/linux64.h
|
||||
+++ gcc-4.1.0/gcc/config/i386/linux64.h
|
||||
@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */
|
||||
When the -shared link option is used a final link is not being
|
||||
done. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
|
||||
+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
|
||||
+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
|
||||
%{static:-static}}"
|
||||
|
||||
/* Similar to standard Linux, but adding -ffast-math support. */
|
||||
--- gcc-4.1.0/gcc/config/ia64/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/ia64/linux.h
|
||||
@@ -37,13 +37,18 @@ do { \
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
|
||||
--- gcc-4.1.0/gcc/config/m68k/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/m68k/linux.h
|
||||
@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m m68kelf %{shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static}}"
|
||||
|
||||
/* For compatibility with linux/a.out */
|
||||
--- gcc-4.1.0/gcc/config/mips/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/mips/linux.h
|
||||
@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
--- gcc-4.1.0/gcc/config/pa/pa-linux.h
|
||||
+++ gcc-4.1.0/gcc/config/pa/pa-linux.h
|
||||
@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
/* glibc's profiling functions don't need gcc to allocate counters. */
|
||||
--- gcc-4.1.0/gcc/config/rs6000/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/rs6000/linux.h
|
||||
@@ -72,7 +72,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
--- gcc-4.1.0/gcc/config/rs6000/sysv4.h
|
||||
+++ gcc-4.1.0/gcc/config/rs6000/sysv4.h
|
||||
@@ -866,6 +866,7 @@ extern int fixuplabelno;
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1043,6 +1044,10 @@ extern int fixuplabelno;
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1209,6 +1214,7 @@ ncrtn.o%s"
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
--- gcc-4.1.0/gcc/config/s390/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/s390/linux.h
|
||||
@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street,
|
||||
#define MULTILIB_DEFAULTS { "m31" }
|
||||
#endif
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street,
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker: \
|
||||
- %{m31:-dynamic-linker /lib/ld.so.1} \
|
||||
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
|
||||
+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
|
||||
+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
|
||||
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
--- gcc-4.1.0/gcc/config/sh/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/sh/linux.h
|
||||
@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define SUBTARGET_LINK_SPEC \
|
||||
+ "%{shared:-shared} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}"
|
||||
+#else
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}"
|
||||
+#endif
|
||||
|
||||
/* Output assembler code to STREAM to call the profiler. */
|
||||
|
||||
--- gcc-4.1.0/gcc/config/sparc/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/sparc/linux.h
|
||||
@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
||||
@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
|
||||
--- gcc-4.1.0/gcc/config/sparc/linux64.h
|
||||
+++ gcc-4.1.0/gcc/config/sparc/linux64.h
|
||||
@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */
|
||||
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||
{ "link_arch", LINK_ARCH_SPEC },
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}} \
|
||||
"
|
||||
|
||||
--- gcc-4.1.0/libffi/configure
|
||||
+++ gcc-4.1.0/libffi/configure
|
||||
@@ -3457,6 +3457,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libgfortran/configure
|
||||
+++ gcc-4.1.0/libgfortran/configure
|
||||
@@ -3699,6 +3699,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libjava/configure
|
||||
+++ gcc-4.1.0/libjava/configure
|
||||
@@ -5137,6 +5137,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libmudflap/configure
|
||||
+++ gcc-4.1.0/libmudflap/configure
|
||||
@@ -5382,6 +5382,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libobjc/configure
|
||||
+++ gcc-4.1.0/libobjc/configure
|
||||
@@ -3312,6 +3312,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libtool.m4
|
||||
+++ gcc-4.1.0/libtool.m4
|
||||
@@ -743,6 +743,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
--- gcc-4.1.0/ltconfig
|
||||
+++ gcc-4.1.0/ltconfig
|
||||
@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1274,6 +1275,23 @@ linux-gnu*)
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc-4.1.0/zlib/configure
|
||||
+++ gcc-4.1.0/zlib/configure
|
||||
@@ -3426,6 +3426,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
27
toolchain/gcc/patches/4.1.0/110-arm-eabi.patch
Normal file
27
toolchain/gcc/patches/4.1.0/110-arm-eabi.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
|
||||
+++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
|
||||
@@ -674,7 +674,7 @@
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
- arm*-*-linux-gnueabi)
|
||||
+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
|
||||
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
|
||||
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
|
||||
# The BPABI long long divmod functions return a 128-bit value in
|
||||
|
||||
diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
|
||||
--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
|
||||
+++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
|
||||
@@ -53,7 +53,11 @@
|
||||
/* Use ld-linux.so.3 so that it will be possible to run "classic"
|
||||
GNU/Linux binaries on an EABI system. */
|
||||
#undef LINUX_TARGET_INTERPRETER
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
|
||||
+#endif
|
||||
|
||||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
|
||||
use the GNU/Linux version, not the generic BPABI version. */
|
||||
3246
toolchain/gcc/patches/4.1.0/200-uclibc-locale.patch
Normal file
3246
toolchain/gcc/patches/4.1.0/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
46
toolchain/gcc/patches/4.1.0/300-libstdc++-pic.patch
Normal file
46
toolchain/gcc/patches/4.1.0/300-libstdc++-pic.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500
|
||||
@@ -214,6 +214,10 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500
|
||||
+++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500
|
||||
@@ -627,7 +627,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -660,6 +660,7 @@
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-data-local install-exec \
|
||||
+ install-exec-local \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip install-toolexeclibLTLIBRARIES installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
@@ -745,6 +746,11 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
11
toolchain/gcc/patches/4.1.0/301-missing-execinfo_h.patch
Normal file
11
toolchain/gcc/patches/4.1.0/301-missing-execinfo_h.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
||||
11
toolchain/gcc/patches/4.1.0/302-c99-snprintf.patch
Normal file
11
toolchain/gcc/patches/4.1.0/302-c99-snprintf.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
|
||||
@@ -142,7 +142,7 @@
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
||||
12
toolchain/gcc/patches/4.1.0/303-c99-complex-ugly-hack.patch
Normal file
12
toolchain/gcc/patches/4.1.0/303-c99-complex-ugly-hack.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
|
||||
@@ -7194,6 +7194,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
20
toolchain/gcc/patches/4.1.0/602-sdk-libstdc++-includes.patch
Normal file
20
toolchain/gcc/patches/4.1.0/602-sdk-libstdc++-includes.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
|
||||
@@ -21,5 +21,5 @@
|
||||
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
|
||||
|
||||
# -I/-D flags to pass when compiling.
|
||||
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
|
||||
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
|
||||
+++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
libmath_la_SOURCES = stubs.c
|
||||
|
||||
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
|
||||
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
|
||||
|
||||
# Only compiling "C" sources in this directory.
|
||||
LIBTOOL = @LIBTOOL@ --tag CC
|
||||
25
toolchain/gcc/patches/4.1.0/740-sh-pr24836.patch
Normal file
25
toolchain/gcc/patches/4.1.0/740-sh-pr24836.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
|
||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
|
||||
|
||||
--- gcc/gcc/configure.ac (revision 106699)
|
||||
+++ gcc/gcc/configure.ac (working copy)
|
||||
@@ -2446,7 +2446,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
--- gcc/gcc/configure
|
||||
+++ gcc/gcc/configure
|
||||
@@ -14846,7 +14846,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
67
toolchain/gcc/patches/4.1.0/800-arm-bigendian.patch
Normal file
67
toolchain/gcc/patches/4.1.0/800-arm-bigendian.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
@@ -28,19 +28,33 @@
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
#undef TARGET_DEFAULT_FLOAT_ABI
|
||||
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (0)
|
||||
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
#undef LIB_SPEC
|
||||
@@ -61,7 +75,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
--- gcc-4.1.0/gcc/config.gcc
|
||||
+++ gcc-4.1.0/gcc/config.gcc
|
||||
@@ -672,6 +672,11 @@
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
arm*-*-linux-gnueabi)
|
||||
544
toolchain/gcc/patches/4.1.1/100-uclibc-conf.patch
Normal file
544
toolchain/gcc/patches/4.1.1/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,544 @@
|
||||
--- gcc-4.1.0/gcc/config/t-linux-uclibc
|
||||
+++ gcc-4.1.0/gcc/config/t-linux-uclibc
|
||||
@@ -0,0 +1,5 @@
|
||||
+# Remove glibc specific files added in t-linux
|
||||
+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
|
||||
+
|
||||
+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
|
||||
+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
|
||||
--- gcc-4.1.0/gcc/config.gcc
|
||||
+++ gcc-4.1.0/gcc/config.gcc
|
||||
@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*)
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
||||
@@ -2341,6 +2341,12 @@ m32c-*-elf*)
|
||||
;;
|
||||
esac
|
||||
|
||||
+# Rather than hook into each target, just do it after all the linux
|
||||
+# targets have been processed
|
||||
+case ${target} in
|
||||
+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
|
||||
+esac
|
||||
+
|
||||
case ${target} in
|
||||
i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
|
||||
tmake_file="${tmake_file} i386/t-gmm_malloc"
|
||||
--- gcc-4.1.0/boehm-gc/configure
|
||||
+++ gcc-4.1.0/boehm-gc/configure
|
||||
@@ -4320,6 +4320,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/configure
|
||||
+++ gcc-4.1.0/configure
|
||||
@@ -1133,7 +1133,7 @@ no)
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
--- gcc-4.1.0/configure.in
|
||||
+++ gcc-4.1.0/configure.in
|
||||
@@ -341,7 +341,7 @@ no)
|
||||
;;
|
||||
"")
|
||||
case "${target}" in
|
||||
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
|
||||
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
|
||||
# Enable libmudflap by default in GNU and friends.
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
--- gcc-4.1.0/contrib/regression/objs-gcc.sh
|
||||
+++ gcc-4.1.0/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc-4.1.0/gcc/config/alpha/linux-elf.h
|
||||
+++ gcc-4.1.0/gcc/config/alpha/linux-elf.h
|
||||
@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
|
||||
|
||||
+#if defined USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
|
||||
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
|
||||
%{O*:-O3} %{!O*:-O1} \
|
||||
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
@@ -51,7 +51,11 @@
|
||||
|
||||
#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
|
||||
#define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
|
||||
%{b} \
|
||||
--- gcc-4.1.0/gcc/config/cris/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/cris/linux.h
|
||||
@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */
|
||||
#undef CRIS_DEFAULT_CPU_VERSION
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+
|
||||
+#undef CRIS_SUBTARGET_VERSION
|
||||
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+
|
||||
+#undef CRIS_LINK_SUBTARGET_SPEC
|
||||
+#define CRIS_LINK_SUBTARGET_SPEC \
|
||||
+ "-mcrislinux\
|
||||
+ -rpath-link include/asm/../..%s\
|
||||
+ %{shared} %{static}\
|
||||
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
|
||||
+ %{!shared: \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
|
||||
+ %{!r:%{O2|O3: --gc-sections}}"
|
||||
+
|
||||
+#else /* USE_UCLIBC */
|
||||
+
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
|
||||
@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */
|
||||
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
|
||||
%{!r:%{O2|O3: --gc-sections}}"
|
||||
|
||||
+#endif /* USE_UCLIBC */
|
||||
+
|
||||
|
||||
/* Node: Run-time Target */
|
||||
|
||||
--- gcc-4.1.0/gcc/config/i386/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/i386/linux.h
|
||||
@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */
|
||||
#define LINK_EMULATION "elf_i386"
|
||||
#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
||||
+#if defined USE_UCLIBC
|
||||
+#undef DYNAMIC_LINKER
|
||||
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#endif
|
||||
+
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "link_emulation", LINK_EMULATION },\
|
||||
--- gcc-4.1.0/gcc/config/i386/linux64.h
|
||||
+++ gcc-4.1.0/gcc/config/i386/linux64.h
|
||||
@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */
|
||||
When the -shared link option is used a final link is not being
|
||||
done. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
|
||||
+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
|
||||
+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
|
||||
%{static:-static}}"
|
||||
|
||||
/* Similar to standard Linux, but adding -ffast-math support. */
|
||||
--- gcc-4.1.0/gcc/config/ia64/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/ia64/linux.h
|
||||
@@ -37,13 +37,18 @@ do { \
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
|
||||
--- gcc-4.1.0/gcc/config/m68k/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/m68k/linux.h
|
||||
@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m m68kelf %{shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static}}"
|
||||
|
||||
/* For compatibility with linux/a.out */
|
||||
--- gcc-4.1.0/gcc/config/mips/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/mips/linux.h
|
||||
@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Borrowed from sparc/linux.h */
|
||||
#undef LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#define LINK_SPEC \
|
||||
"%(endian_spec) \
|
||||
%{shared:-shared} \
|
||||
@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
#undef SUBTARGET_ASM_SPEC
|
||||
--- gcc-4.1.0/gcc/config/pa/pa-linux.h
|
||||
+++ gcc-4.1.0/gcc/config/pa/pa-linux.h
|
||||
@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */
|
||||
/* Define this for shared library support because it isn't in the main
|
||||
linux.h file. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}"
|
||||
|
||||
/* glibc's profiling functions don't need gcc to allocate counters. */
|
||||
--- gcc-4.1.0/gcc/config/rs6000/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/rs6000/linux.h
|
||||
@@ -72,7 +72,11 @@
|
||||
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
|
||||
|
||||
#undef LINK_OS_DEFAULT_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
|
||||
+#else
|
||||
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
|
||||
+#endif
|
||||
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
|
||||
--- gcc-4.1.0/gcc/config/rs6000/sysv4.h
|
||||
+++ gcc-4.1.0/gcc/config/rs6000/sysv4.h
|
||||
@@ -866,6 +866,7 @@ extern int fixuplabelno;
|
||||
mcall-linux : %(link_os_linux) ; \
|
||||
mcall-gnu : %(link_os_gnu) ; \
|
||||
mcall-netbsd : %(link_os_netbsd) ; \
|
||||
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
|
||||
mcall-openbsd: %(link_os_openbsd) ; \
|
||||
: %(link_os_default) }"
|
||||
|
||||
@@ -1043,6 +1044,10 @@ extern int fixuplabelno;
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
|
||||
|
||||
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
|
||||
+
|
||||
#if defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
|
||||
#endif
|
||||
@@ -1209,6 +1214,7 @@ ncrtn.o%s"
|
||||
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
||||
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
|
||||
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
||||
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
|
||||
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
|
||||
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
|
||||
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
||||
--- gcc-4.1.0/gcc/config/s390/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/s390/linux.h
|
||||
@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street,
|
||||
#define MULTILIB_DEFAULTS { "m31" }
|
||||
#endif
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
|
||||
@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street,
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker: \
|
||||
- %{m31:-dynamic-linker /lib/ld.so.1} \
|
||||
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
|
||||
+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
|
||||
+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
|
||||
|
||||
|
||||
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
--- gcc-4.1.0/gcc/config/sh/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/sh/linux.h
|
||||
@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
#undef SUBTARGET_LINK_SPEC
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define SUBTARGET_LINK_SPEC \
|
||||
+ "%{shared:-shared} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
|
||||
+ %{static:-static}"
|
||||
+#else
|
||||
#define SUBTARGET_LINK_SPEC \
|
||||
"%{shared:-shared} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
%{static:-static}"
|
||||
+#endif
|
||||
|
||||
/* Output assembler code to STREAM to call the profiler. */
|
||||
|
||||
--- gcc-4.1.0/gcc/config/sparc/linux.h
|
||||
+++ gcc-4.1.0/gcc/config/sparc/linux.h
|
||||
@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* If ELF is the default format, we should not use /lib/elf. */
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
||||
@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}}"
|
||||
|
||||
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
|
||||
--- gcc-4.1.0/gcc/config/sparc/linux64.h
|
||||
+++ gcc-4.1.0/gcc/config/sparc/linux64.h
|
||||
@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */
|
||||
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||
{ "link_arch", LINK_ARCH_SPEC },
|
||||
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
+#endif
|
||||
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
|
||||
%{!shared: \
|
||||
%{!ibcs: \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
|
||||
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
|
||||
%{static:-static}}} \
|
||||
"
|
||||
|
||||
--- gcc-4.1.0/libffi/configure
|
||||
+++ gcc-4.1.0/libffi/configure
|
||||
@@ -3457,6 +3457,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libgfortran/configure
|
||||
+++ gcc-4.1.0/libgfortran/configure
|
||||
@@ -3699,6 +3699,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libjava/configure
|
||||
+++ gcc-4.1.0/libjava/configure
|
||||
@@ -5137,6 +5137,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libmudflap/configure
|
||||
+++ gcc-4.1.0/libmudflap/configure
|
||||
@@ -5382,6 +5382,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libobjc/configure
|
||||
+++ gcc-4.1.0/libobjc/configure
|
||||
@@ -3312,6 +3312,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
--- gcc-4.1.0/libtool.m4
|
||||
+++ gcc-4.1.0/libtool.m4
|
||||
@@ -743,6 +743,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
|
||||
--- gcc-4.1.0/ltconfig
|
||||
+++ gcc-4.1.0/ltconfig
|
||||
@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
+linux-uclibc*) ;;
|
||||
linux-gnu*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
@@ -1274,6 +1275,23 @@ linux-gnu*)
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc-4.1.0/zlib/configure
|
||||
+++ gcc-4.1.0/zlib/configure
|
||||
@@ -3426,6 +3426,11 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
27
toolchain/gcc/patches/4.1.1/110-arm-eabi.patch
Normal file
27
toolchain/gcc/patches/4.1.1/110-arm-eabi.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
|
||||
+++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
|
||||
@@ -674,7 +674,7 @@
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
- arm*-*-linux-gnueabi)
|
||||
+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
|
||||
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
|
||||
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
|
||||
# The BPABI long long divmod functions return a 128-bit value in
|
||||
|
||||
diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
|
||||
--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
|
||||
+++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
|
||||
@@ -53,7 +53,11 @@
|
||||
/* Use ld-linux.so.3 so that it will be possible to run "classic"
|
||||
GNU/Linux binaries on an EABI system. */
|
||||
#undef LINUX_TARGET_INTERPRETER
|
||||
+#ifdef USE_UCLIBC
|
||||
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
|
||||
+#else
|
||||
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
|
||||
+#endif
|
||||
|
||||
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
|
||||
use the GNU/Linux version, not the generic BPABI version. */
|
||||
3239
toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch
Normal file
3239
toolchain/gcc/patches/4.1.1/200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
50
toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch
Normal file
50
toolchain/gcc/patches/4.1.1/300-libstdc++-pic.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am
|
||||
@@ -214,6 +214,12 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
--- gcc/libstdc++-v3/src/Makefile.in
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in
|
||||
@@ -627,7 +627,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -660,6 +660,7 @@
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-data-local install-exec \
|
||||
+ install-exec-local \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip install-toolexeclibLTLIBRARIES installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
@@ -743,6 +743,13 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
11
toolchain/gcc/patches/4.1.1/301-missing-execinfo_h.patch
Normal file
11
toolchain/gcc/patches/4.1.1/301-missing-execinfo_h.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
||||
11
toolchain/gcc/patches/4.1.1/302-c99-snprintf.patch
Normal file
11
toolchain/gcc/patches/4.1.1/302-c99-snprintf.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
|
||||
@@ -142,7 +142,7 @@
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
||||
12
toolchain/gcc/patches/4.1.1/303-c99-complex-ugly-hack.patch
Normal file
12
toolchain/gcc/patches/4.1.1/303-c99-complex-ugly-hack.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
|
||||
@@ -7194,6 +7194,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
24
toolchain/gcc/patches/4.1.1/304-index_macro.patch
Normal file
24
toolchain/gcc/patches/4.1.1/304-index_macro.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
|
||||
@@ -59,6 +59,9 @@
|
||||
#include <bits/allocator.h>
|
||||
#include <ext/hash_fun.h>
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
# ifdef __GC
|
||||
# define __GC_CONST const
|
||||
# else
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
|
||||
@@ -53,6 +53,9 @@
|
||||
#include <ext/memory> // For uninitialized_copy_n
|
||||
#include <ext/numeric> // For power
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using std::size_t;
|
||||
25
toolchain/gcc/patches/4.1.1/740-sh-pr24836.patch
Normal file
25
toolchain/gcc/patches/4.1.1/740-sh-pr24836.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
|
||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
|
||||
|
||||
--- gcc/gcc/configure.ac (revision 106699)
|
||||
+++ gcc/gcc/configure.ac (working copy)
|
||||
@@ -2446,7 +2446,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
--- gcc/gcc/configure
|
||||
+++ gcc/gcc/configure
|
||||
@@ -14846,7 +14846,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
67
toolchain/gcc/patches/4.1.1/800-arm-bigendian.patch
Normal file
67
toolchain/gcc/patches/4.1.1/800-arm-bigendian.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
|
||||
@@ -28,19 +28,33 @@
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
#undef TARGET_DEFAULT_FLOAT_ABI
|
||||
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (0)
|
||||
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
#undef LIB_SPEC
|
||||
@@ -61,7 +75,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
--- gcc-4.1.0/gcc/config.gcc
|
||||
+++ gcc-4.1.0/gcc/config.gcc
|
||||
@@ -672,6 +672,11 @@
|
||||
;;
|
||||
arm*-*-linux*) # ARM GNU/Linux with ELF
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
+ case $target in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
+ ;;
|
||||
+ esac
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
arm*-*-linux-gnueabi)
|
||||
37
toolchain/gcc/patches/4.1.1/900-c++_fixes.patch
Normal file
37
toolchain/gcc/patches/4.1.1/900-c++_fixes.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
diff -ur gcc.old/libstdc++-v3/configure gcc.dev/libstdc++-v3/configure
|
||||
--- gcc.old/libstdc++-v3/configure 2006-06-29 23:26:47.000000000 +0200
|
||||
+++ gcc.dev/libstdc++-v3/configure 2006-06-05 15:48:03.000000000 +0200
|
||||
@@ -5745,7 +5745,7 @@
|
||||
enableval="$enable_clocale"
|
||||
|
||||
case "$enableval" in
|
||||
- generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
|
||||
+ generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
|
||||
*) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
|
||||
echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
|
||||
{ (exit 1); exit 1; }; } ;;
|
||||
@@ -6524,23 +6525,6 @@
|
||||
echo "${ECHO_T}$enable_long_long" >&6
|
||||
|
||||
|
||||
-
|
||||
- # Check whether --enable-wchar_t or --disable-wchar_t was given.
|
||||
-if test "${enable_wchar_t+set}" = set; then
|
||||
- enableval="$enable_wchar_t"
|
||||
-
|
||||
- case "$enableval" in
|
||||
- yes|no) ;;
|
||||
- *) { { echo "$as_me:$LINENO: error: Argument to enable/disable wchar_t must be yes or no" >&5
|
||||
-echo "$as_me: error: Argument to enable/disable wchar_t must be yes or no" >&2;}
|
||||
- { (exit 1); exit 1; }; } ;;
|
||||
- esac
|
||||
-
|
||||
-else
|
||||
- enable_wchar_t=yes
|
||||
-fi;
|
||||
-
|
||||
-
|
||||
# Test wchar.h for mbstate_t, which is needed for char_traits and fpos.
|
||||
|
||||
for ac_header in wchar.h
|
||||
|
||||
8
toolchain/gdb/Config.in
Normal file
8
toolchain/gdb/Config.in
Normal file
@@ -0,0 +1,8 @@
|
||||
comment "Gdb Options"
|
||||
|
||||
config PACKAGE_GDB_CLIENT
|
||||
bool "Build gdb client for the Host"
|
||||
default n
|
||||
help
|
||||
Build gdb to run on the host to debug programs running on the target.
|
||||
|
||||
55
toolchain/gdb/Makefile
Normal file
55
toolchain/gdb/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gdb
|
||||
PKG_VERSION:=6.3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_MD5SUM:=05b928f41fa5b482e49ca2c24762a0ae
|
||||
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/gdb
|
||||
PKG_CAT:=bzcat
|
||||
|
||||
PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); \
|
||||
gdb_cv_func_sigsetjmp=yes \
|
||||
$(PKG_BUILD_DIR)/configure \
|
||||
--prefix=$(STAGING_DIR) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
$(DISABLE_NLS) \
|
||||
--without-uiout --disable-gdbmi \
|
||||
--disable-tui --disable-gdbtk --without-x \
|
||||
--without-included-gettext \
|
||||
--enable-threads \
|
||||
);
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||
strip $(PKG_BUILD_DIR)/gdb/gdb
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
(cd $(STAGING_DIR)/bin; \
|
||||
install -c $(PKG_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb; \
|
||||
ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb; \
|
||||
);
|
||||
endef
|
||||
|
||||
define Build/Clean
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
rm -f $(STAGING_DIR)/bin/$(TARGET_CROSS)gdb
|
||||
rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gdb
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
280
toolchain/gdb/patches/100-uclibc-conf.patch
Normal file
280
toolchain/gdb/patches/100-uclibc-conf.patch
Normal file
@@ -0,0 +1,280 @@
|
||||
--- gdb-6.3/bfd/config.bfd.orig Fri Oct 15 07:47:11 2004
|
||||
+++ gdb-6.3/bfd/config.bfd Mon Feb 28 00:04:43 2005
|
||||
@@ -129,7 +129,7 @@
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
targ_selvecs=bfd_elf64_alpha_vec
|
||||
;;
|
||||
- alpha*-*-linux-gnu* | alpha*-*-elf*)
|
||||
+ alpha*-*-linux-* | alpha*-*-elf*)
|
||||
targ_defvec=bfd_elf64_alpha_vec
|
||||
targ_selvecs=ecoffalpha_little_vec
|
||||
;;
|
||||
@@ -139,7 +139,7 @@
|
||||
alpha*-*-*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
;;
|
||||
- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
|
||||
+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
|
||||
targ_defvec=bfd_elf64_ia64_little_vec
|
||||
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
|
||||
;;
|
||||
@@ -216,7 +216,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- armeb-*-elf | arm*b-*-linux-gnu*)
|
||||
+ armeb-*-elf | arm*b-*-linux-*)
|
||||
targ_defvec=bfd_elf32_bigarm_vec
|
||||
targ_selvecs=bfd_elf32_littlearm_vec
|
||||
;;
|
||||
@@ -224,7 +224,7 @@
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
|
||||
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
|
||||
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
|
||||
arm*-*-eabi* )
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
@@ -378,7 +378,7 @@
|
||||
;;
|
||||
|
||||
#ifdef BFD64
|
||||
- hppa*64*-*-linux-gnu*)
|
||||
+ hppa*64*-*-linux-*)
|
||||
targ_defvec=bfd_elf64_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf64_hppa_vec
|
||||
;;
|
||||
@@ -389,7 +389,7 @@
|
||||
;;
|
||||
#endif
|
||||
|
||||
- hppa*-*-linux-gnu*)
|
||||
+ hppa*-*-linux-*)
|
||||
targ_defvec=bfd_elf32_hppa_linux_vec
|
||||
targ_selvecs=bfd_elf32_hppa_vec
|
||||
;;
|
||||
@@ -522,7 +522,7 @@
|
||||
targ_selvecs=bfd_elf32_i386_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
targ_defvec=bfd_elf32_i386_vec
|
||||
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
|
||||
targ64_selvecs=bfd_elf64_x86_64_vec
|
||||
@@ -536,7 +536,7 @@
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
- x86_64-*-linux-gnu*)
|
||||
+ x86_64-*-linux-*)
|
||||
targ_defvec=bfd_elf64_x86_64_vec
|
||||
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
|
||||
;;
|
||||
@@ -706,7 +706,7 @@
|
||||
targ_defvec=hp300hpux_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- m68*-*-linux*aout*)
|
||||
+ m68*-*-linux*aout* | m68*-*-linux-uclibc*)
|
||||
targ_defvec=m68klinux_vec
|
||||
targ_selvecs=bfd_elf32_m68k_vec
|
||||
targ_underscore=yes
|
||||
@@ -987,7 +987,7 @@
|
||||
;;
|
||||
#endif
|
||||
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
|
||||
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
|
||||
+ powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
|
||||
powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
|
||||
targ_defvec=bfd_elf32_powerpc_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
|
||||
@@ -1024,7 +1024,7 @@
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
;;
|
||||
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
|
||||
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
|
||||
+ powerpcle-*-solaris2* | powerpcle-*-linux-* | powerpcle-*-vxworks* |\
|
||||
powerpcle-*-rtems*)
|
||||
targ_defvec=bfd_elf32_powerpcle_vec
|
||||
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
|
||||
@@ -1192,7 +1192,7 @@
|
||||
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc-*-linux-gnu*)
|
||||
+ sparc-*-linux-*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1239,7 +1239,7 @@
|
||||
targ_defvec=sunos_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
- sparc64-*-linux-gnu*)
|
||||
+ sparc64-*-linux-*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
|
||||
;;
|
||||
@@ -1308,7 +1308,7 @@
|
||||
targ_underscore=yes
|
||||
;;
|
||||
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
targ_defvec=bfd_elf32_vax_vec
|
||||
;;
|
||||
|
||||
--- gdb-6.3/bfd/configure.orig Fri Oct 8 16:53:56 2004
|
||||
+++ gdb-6.3/bfd/configure Sun Feb 27 18:32:58 2005
|
||||
@@ -3583,6 +3583,11 @@
|
||||
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
@@ -9914,7 +9919,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -9978,7 +9983,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
;;
|
||||
@@ -10016,7 +10021,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -10150,7 +10155,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
--- gdb-6.3/bfd/configure.in.orig Fri Oct 8 16:53:59 2004
|
||||
+++ gdb-6.3/bfd/configure.in Sun Feb 27 18:14:41 2005
|
||||
@@ -163,7 +163,7 @@
|
||||
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
|
||||
COREFILE=''
|
||||
;;
|
||||
- alpha*-*-linux-gnu*)
|
||||
+ alpha*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/alphalinux.h"'
|
||||
;;
|
||||
@@ -248,7 +248,7 @@
|
||||
TRAD_HEADER='"hosts/i386mach3.h"'
|
||||
;;
|
||||
changequote(,)dnl
|
||||
- i[3-7]86-*-linux-gnu*)
|
||||
+ i[3-7]86-*-linux-*)
|
||||
changequote([,])dnl
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i386linux.h"'
|
||||
@@ -289,7 +289,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/hp300bsd.h"'
|
||||
;;
|
||||
- m68*-*-linux-gnu*)
|
||||
+ m68*-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/m68klinux.h"'
|
||||
;;
|
||||
@@ -375,7 +375,7 @@
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxult2.h"'
|
||||
;;
|
||||
- vax-*-linux-gnu*)
|
||||
+ vax-*-linux-*)
|
||||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/vaxlinux.h"'
|
||||
;;
|
||||
--- gdb-6.3/libtool.m4.orig Wed Jul 21 21:21:41 2004
|
||||
+++ gdb-6.3/libtool.m4 Mon Feb 28 00:08:11 2005
|
||||
@@ -653,6 +653,11 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
newsos6)
|
||||
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
--- gdb-6.3/ltconfig.orig Tue Oct 5 15:34:42 2004
|
||||
+++ gdb-6.3/ltconfig Sun Feb 27 18:14:41 2005
|
||||
@@ -602,7 +602,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1270,6 +1270,24 @@
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ version_type=linux
|
||||
+ need_lib_prefix=no
|
||||
+ need_version=no
|
||||
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
|
||||
+ soname_spec='${libname}${release}.so$major'
|
||||
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ shlibpath_var=LD_LIBRARY_PATH
|
||||
+ shlibpath_overrides_runpath=no
|
||||
+ # This implies no fast_install, which is unacceptable.
|
||||
+ # Some rework will be needed to allow for fast_install
|
||||
+ # before this can be enabled.
|
||||
+ # Note: copied from linux-gnu, and may not be appropriate.
|
||||
+ hardcode_into_libs=yes
|
||||
+ # Assume using the uClibc dynamic linker.
|
||||
+ dynamic_linker="uClibc ld.so"
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gdb-6.3/opcodes/configure.orig Fri Sep 17 08:13:38 2004
|
||||
+++ gdb-6.3/opcodes/configure Mon Feb 28 00:09:42 2005
|
||||
@@ -3595,6 +3595,11 @@
|
||||
fi
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
newsos6)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
15
toolchain/gdb/patches/200-uclibc-readline-conf.patch
Normal file
15
toolchain/gdb/patches/200-uclibc-readline-conf.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- gdb-6.1.1-dist/readline/configure 2003-05-27 18:29:47.000000000 -0500
|
||||
+++ gdb-6.1.1/readline/configure 2004-08-09 14:20:23.000000000 -0500
|
||||
@@ -6249,7 +6249,12 @@
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for mbstate_t" >&5
|
||||
+echo $ECHO_N "bash_cv_have_mbstate_t=$bash_cv_have_mbstate_t" >&6
|
||||
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
|
||||
+if test "${bash_cv_have_mbstate_t+set}" != set; then
|
||||
+ bash_cv_have_mbstate_t=yes
|
||||
+ echo $ECHO_N "WARNING!! forcing to yes!!! $ECHO_C" >&6
|
||||
+fi
|
||||
if test "${bash_cv_have_mbstate_t+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
28
toolchain/gdb/patches/400-mips-coredump.patch
Normal file
28
toolchain/gdb/patches/400-mips-coredump.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
|
||||
coredump handling by gdb for current kernels. Update the hardcoded constants
|
||||
to reflect the change.
|
||||
--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
|
||||
+++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
|
||||
@@ -53,12 +53,22 @@
|
||||
|
||||
#define EF_REG0 6
|
||||
#define EF_REG31 37
|
||||
+
|
||||
+#if 0
|
||||
#define EF_LO 38
|
||||
#define EF_HI 39
|
||||
#define EF_CP0_EPC 40
|
||||
#define EF_CP0_BADVADDR 41
|
||||
#define EF_CP0_STATUS 42
|
||||
#define EF_CP0_CAUSE 43
|
||||
+#else
|
||||
+#define EF_CP0_STATUS 38
|
||||
+#define EF_LO 39
|
||||
+#define EF_HI 40
|
||||
+#define EF_CP0_BADVADDR 41
|
||||
+#define EF_CP0_CAUSE 42
|
||||
+#define EF_CP0_EPC 43
|
||||
+#endif
|
||||
|
||||
#define EF_SIZE 180
|
||||
|
||||
34
toolchain/gdb/patches/500-thread-timeout.patch
Normal file
34
toolchain/gdb/patches/500-thread-timeout.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
|
||||
+++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
|
||||
@@ -21,6 +21,7 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
+#include <unistd.h>
|
||||
#include "server.h"
|
||||
|
||||
#include "linux-low.h"
|
||||
@@ -142,6 +143,7 @@
|
||||
td_event_msg_t msg;
|
||||
td_err_e err;
|
||||
struct inferior_linux_data *tdata;
|
||||
+ int timeout;
|
||||
|
||||
if (debug_threads)
|
||||
fprintf (stderr, "Thread creation event.\n");
|
||||
@@ -152,7 +154,13 @@
|
||||
In the LinuxThreads implementation, this is safe,
|
||||
because all events come from the manager thread
|
||||
(except for its own creation, of course). */
|
||||
- err = td_ta_event_getmsg (thread_agent, &msg);
|
||||
+ for (timeout = 0; timeout < 50000; timeout++)
|
||||
+ {
|
||||
+ err = td_ta_event_getmsg (thread_agent, &msg);
|
||||
+ if (err != TD_NOMSG)
|
||||
+ break;
|
||||
+ usleep(1000);
|
||||
+ }
|
||||
if (err != TD_OK)
|
||||
fprintf (stderr, "thread getmsg err: %s\n",
|
||||
thread_db_err_str (err));
|
||||
|
||||
552
toolchain/gdb/patches/600-debian_10.selected-frame.patch
Normal file
552
toolchain/gdb/patches/600-debian_10.selected-frame.patch
Normal file
@@ -0,0 +1,552 @@
|
||||
2004-10-11
|
||||
|
||||
This patch is not submitted. Many of these functions should be passing
|
||||
a frame around rather than calling get_selected_frame, but at least it
|
||||
is an improvement over deprecated_selected_frame.
|
||||
|
||||
Index: gdb-6.3/gdb/breakpoint.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/breakpoint.c 2004-10-08 13:30:46.000000000 -0400
|
||||
+++ gdb-6.3/gdb/breakpoint.c 2004-11-09 22:55:11.231620957 -0500
|
||||
@@ -922,7 +922,7 @@ insert_bp_location (struct bp_location *
|
||||
/* FIXME drow/2003-09-09: It would be nice if evaluate_expression
|
||||
took a frame parameter, so that we didn't have to change the
|
||||
selected frame. */
|
||||
- saved_frame_id = get_frame_id (deprecated_selected_frame);
|
||||
+ saved_frame_id = get_frame_id (get_selected_frame ());
|
||||
|
||||
/* Determine if the watchpoint is within scope. */
|
||||
if (bpt->owner->exp_valid_block == NULL)
|
||||
@@ -5464,14 +5464,9 @@ break_at_finish_at_depth_command_1 (char
|
||||
|
||||
if (default_breakpoint_valid)
|
||||
{
|
||||
- if (deprecated_selected_frame)
|
||||
- {
|
||||
- selected_pc = get_frame_pc (deprecated_selected_frame);
|
||||
- if (arg)
|
||||
- if_arg = 1;
|
||||
- }
|
||||
- else
|
||||
- error ("No selected frame.");
|
||||
+ selected_pc = get_frame_pc (get_selected_frame ());
|
||||
+ if (arg)
|
||||
+ if_arg = 1;
|
||||
}
|
||||
else
|
||||
error ("No default breakpoint address now.");
|
||||
@@ -5542,15 +5537,10 @@ break_at_finish_command_1 (char *arg, in
|
||||
{
|
||||
if (default_breakpoint_valid)
|
||||
{
|
||||
- if (deprecated_selected_frame)
|
||||
- {
|
||||
- addr_string = xstrprintf ("*0x%s",
|
||||
- paddr_nz (get_frame_pc (deprecated_selected_frame)));
|
||||
- if (arg)
|
||||
- if_arg = 1;
|
||||
- }
|
||||
- else
|
||||
- error ("No selected frame.");
|
||||
+ addr_string = xstrprintf ("*0x%s",
|
||||
+ paddr_nz (get_frame_pc (get_selected_frame ())));
|
||||
+ if (arg)
|
||||
+ if_arg = 1;
|
||||
}
|
||||
else
|
||||
error ("No default breakpoint address now.");
|
||||
@@ -6082,7 +6072,7 @@ until_break_command (char *arg, int from
|
||||
{
|
||||
struct symtabs_and_lines sals;
|
||||
struct symtab_and_line sal;
|
||||
- struct frame_info *prev_frame = get_prev_frame (deprecated_selected_frame);
|
||||
+ struct frame_info *prev_frame = get_prev_frame (get_selected_frame ());
|
||||
struct breakpoint *breakpoint;
|
||||
struct cleanup *old_chain;
|
||||
struct continuation_arg *arg1;
|
||||
@@ -6119,7 +6109,7 @@ until_break_command (char *arg, int from
|
||||
/* Otherwise, specify the current frame, because we want to stop only
|
||||
at the very same frame. */
|
||||
breakpoint = set_momentary_breakpoint (sal,
|
||||
- get_frame_id (deprecated_selected_frame),
|
||||
+ get_frame_id (get_selected_frame ()),
|
||||
bp_until);
|
||||
|
||||
if (!target_can_async_p ())
|
||||
Index: gdb-6.3/gdb/cli/cli-cmds.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/cli/cli-cmds.c 2004-09-11 06:24:53.000000000 -0400
|
||||
+++ gdb-6.3/gdb/cli/cli-cmds.c 2004-11-09 22:51:07.323246218 -0500
|
||||
@@ -845,10 +845,7 @@ disassemble_command (char *arg, int from
|
||||
name = NULL;
|
||||
if (!arg)
|
||||
{
|
||||
- if (!deprecated_selected_frame)
|
||||
- error ("No frame selected.\n");
|
||||
-
|
||||
- pc = get_frame_pc (deprecated_selected_frame);
|
||||
+ pc = get_frame_pc (get_selected_frame ());
|
||||
if (find_pc_partial_function (pc, &name, &low, &high) == 0)
|
||||
error ("No function contains program counter for selected frame.\n");
|
||||
#if defined(TUI)
|
||||
Index: gdb-6.3/gdb/f-valprint.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/f-valprint.c 2003-10-14 02:51:14.000000000 -0400
|
||||
+++ gdb-6.3/gdb/f-valprint.c 2004-11-09 22:51:07.326245632 -0500
|
||||
@@ -76,7 +76,7 @@ f77_get_dynamic_lowerbound (struct type
|
||||
switch (TYPE_ARRAY_LOWER_BOUND_TYPE (type))
|
||||
{
|
||||
case BOUND_BY_VALUE_ON_STACK:
|
||||
- current_frame_addr = get_frame_base (deprecated_selected_frame);
|
||||
+ current_frame_addr = get_frame_base (get_selected_frame ());
|
||||
if (current_frame_addr > 0)
|
||||
{
|
||||
*lower_bound =
|
||||
@@ -100,7 +100,7 @@ f77_get_dynamic_lowerbound (struct type
|
||||
break;
|
||||
|
||||
case BOUND_BY_REF_ON_STACK:
|
||||
- current_frame_addr = get_frame_base (deprecated_selected_frame);
|
||||
+ current_frame_addr = get_frame_base (get_selected_frame ());
|
||||
if (current_frame_addr > 0)
|
||||
{
|
||||
ptr_to_lower_bound =
|
||||
@@ -134,7 +134,7 @@ f77_get_dynamic_upperbound (struct type
|
||||
switch (TYPE_ARRAY_UPPER_BOUND_TYPE (type))
|
||||
{
|
||||
case BOUND_BY_VALUE_ON_STACK:
|
||||
- current_frame_addr = get_frame_base (deprecated_selected_frame);
|
||||
+ current_frame_addr = get_frame_base (get_selected_frame ());
|
||||
if (current_frame_addr > 0)
|
||||
{
|
||||
*upper_bound =
|
||||
@@ -163,7 +163,7 @@ f77_get_dynamic_upperbound (struct type
|
||||
break;
|
||||
|
||||
case BOUND_BY_REF_ON_STACK:
|
||||
- current_frame_addr = get_frame_base (deprecated_selected_frame);
|
||||
+ current_frame_addr = get_frame_base (get_selected_frame ());
|
||||
if (current_frame_addr > 0)
|
||||
{
|
||||
ptr_to_upper_bound =
|
||||
@@ -630,10 +630,7 @@ info_common_command (char *comname, int
|
||||
first make sure that it is visible and if so, let
|
||||
us display its contents */
|
||||
|
||||
- fi = deprecated_selected_frame;
|
||||
-
|
||||
- if (fi == NULL)
|
||||
- error ("No frame selected");
|
||||
+ fi = get_selected_frame ();
|
||||
|
||||
/* The following is generally ripped off from stack.c's routine
|
||||
print_frame_info() */
|
||||
@@ -722,10 +719,7 @@ there_is_a_visible_common_named (char *c
|
||||
if (comname == NULL)
|
||||
error ("Cannot deal with NULL common name!");
|
||||
|
||||
- fi = deprecated_selected_frame;
|
||||
-
|
||||
- if (fi == NULL)
|
||||
- error ("No frame selected");
|
||||
+ fi = get_selected_frame ();
|
||||
|
||||
/* The following is generally ripped off from stack.c's routine
|
||||
print_frame_info() */
|
||||
Index: gdb-6.3/gdb/infcmd.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/infcmd.c 2004-09-13 14:26:28.000000000 -0400
|
||||
+++ gdb-6.3/gdb/infcmd.c 2004-11-09 22:57:37.274099559 -0500
|
||||
@@ -1214,10 +1214,8 @@ finish_command (char *arg, int from_tty)
|
||||
error ("The \"finish\" command does not take any arguments.");
|
||||
if (!target_has_execution)
|
||||
error ("The program is not running.");
|
||||
- if (deprecated_selected_frame == NULL)
|
||||
- error ("No selected frame.");
|
||||
|
||||
- frame = get_prev_frame (deprecated_selected_frame);
|
||||
+ frame = get_prev_frame (get_selected_frame ());
|
||||
if (frame == 0)
|
||||
error ("\"finish\" not meaningful in the outermost frame.");
|
||||
|
||||
@@ -1235,7 +1233,7 @@ finish_command (char *arg, int from_tty)
|
||||
|
||||
/* Find the function we will return from. */
|
||||
|
||||
- function = find_pc_function (get_frame_pc (deprecated_selected_frame));
|
||||
+ function = find_pc_function (get_frame_pc (get_selected_frame ()));
|
||||
|
||||
/* Print info on the selected frame, including level number but not
|
||||
source. */
|
||||
@@ -1600,13 +1598,11 @@ registers_info (char *addr_exp, int fpre
|
||||
|
||||
if (!target_has_registers)
|
||||
error ("The program has no registers now.");
|
||||
- if (deprecated_selected_frame == NULL)
|
||||
- error ("No selected frame.");
|
||||
|
||||
if (!addr_exp)
|
||||
{
|
||||
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
|
||||
- deprecated_selected_frame, -1, fpregs);
|
||||
+ get_selected_frame (), -1, fpregs);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1644,7 +1640,7 @@ registers_info (char *addr_exp, int fpre
|
||||
if (regnum >= 0)
|
||||
{
|
||||
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
|
||||
- deprecated_selected_frame, regnum, fpregs);
|
||||
+ get_selected_frame (), regnum, fpregs);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1658,7 +1654,7 @@ registers_info (char *addr_exp, int fpre
|
||||
&& regnum < NUM_REGS + NUM_PSEUDO_REGS)
|
||||
{
|
||||
gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
|
||||
- deprecated_selected_frame, regnum, fpregs);
|
||||
+ get_selected_frame (), regnum, fpregs);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1684,7 +1680,7 @@ registers_info (char *addr_exp, int fpre
|
||||
if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
|
||||
group))
|
||||
gdbarch_print_registers_info (current_gdbarch,
|
||||
- gdb_stdout, deprecated_selected_frame,
|
||||
+ gdb_stdout, get_selected_frame (),
|
||||
regnum, fpregs);
|
||||
}
|
||||
continue;
|
||||
@@ -1714,8 +1710,6 @@ print_vector_info (struct gdbarch *gdbar
|
||||
{
|
||||
if (!target_has_registers)
|
||||
error ("The program has no registers now.");
|
||||
- if (deprecated_selected_frame == NULL)
|
||||
- error ("No selected frame.");
|
||||
|
||||
if (gdbarch_print_vector_info_p (gdbarch))
|
||||
gdbarch_print_vector_info (gdbarch, file, frame, args);
|
||||
@@ -1740,7 +1734,7 @@ print_vector_info (struct gdbarch *gdbar
|
||||
static void
|
||||
vector_info (char *args, int from_tty)
|
||||
{
|
||||
- print_vector_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
|
||||
+ print_vector_info (current_gdbarch, gdb_stdout, get_selected_frame (), args);
|
||||
}
|
||||
|
||||
|
||||
@@ -1910,8 +1904,6 @@ print_float_info (struct gdbarch *gdbarc
|
||||
{
|
||||
if (!target_has_registers)
|
||||
error ("The program has no registers now.");
|
||||
- if (deprecated_selected_frame == NULL)
|
||||
- error ("No selected frame.");
|
||||
|
||||
if (gdbarch_print_float_info_p (gdbarch))
|
||||
gdbarch_print_float_info (gdbarch, file, frame, args);
|
||||
@@ -1937,7 +1929,7 @@ No floating-point info available for thi
|
||||
static void
|
||||
float_info (char *args, int from_tty)
|
||||
{
|
||||
- print_float_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
|
||||
+ print_float_info (current_gdbarch, gdb_stdout, get_selected_frame (), args);
|
||||
}
|
||||
|
||||
static void
|
||||
Index: gdb-6.3/gdb/inflow.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/inflow.c 2004-08-11 05:00:57.000000000 -0400
|
||||
+++ gdb-6.3/gdb/inflow.c 2004-11-09 22:58:37.488338883 -0500
|
||||
@@ -591,10 +591,7 @@ kill_command (char *arg, int from_tty)
|
||||
if (target_has_stack)
|
||||
{
|
||||
printf_filtered ("In %s,\n", target_longname);
|
||||
- if (deprecated_selected_frame == NULL)
|
||||
- fputs_filtered ("No selected stack frame.\n", gdb_stdout);
|
||||
- else
|
||||
- print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
|
||||
+ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
|
||||
}
|
||||
bfd_cache_close_all ();
|
||||
}
|
||||
Index: gdb-6.3/gdb/infrun.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/infrun.c 2004-09-27 13:58:08.000000000 -0400
|
||||
+++ gdb-6.3/gdb/infrun.c 2004-11-09 22:51:07.351240752 -0500
|
||||
@@ -3485,7 +3485,7 @@ save_inferior_status (int restore_stack_
|
||||
|
||||
inf_status->registers = regcache_dup (current_regcache);
|
||||
|
||||
- inf_status->selected_frame_id = get_frame_id (deprecated_selected_frame);
|
||||
+ inf_status->selected_frame_id = get_frame_id (get_selected_frame ());
|
||||
return inf_status;
|
||||
}
|
||||
|
||||
Index: gdb-6.3/gdb/mi/mi-main.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/mi/mi-main.c 2004-09-12 11:00:42.000000000 -0400
|
||||
+++ gdb-6.3/gdb/mi/mi-main.c 2004-11-09 22:53:29.998389013 -0500
|
||||
@@ -388,7 +388,7 @@ register_changed_p (int regnum)
|
||||
{
|
||||
char raw_buffer[MAX_REGISTER_SIZE];
|
||||
|
||||
- if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
|
||||
+ if (! frame_register_read (get_selected_frame (), regnum, raw_buffer))
|
||||
return -1;
|
||||
|
||||
if (memcmp (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
|
||||
@@ -509,7 +509,7 @@ get_register (int regnum, int format)
|
||||
if (format == 'N')
|
||||
format = 0;
|
||||
|
||||
- frame_register (deprecated_selected_frame, regnum, &optim, &lval, &addr,
|
||||
+ frame_register (get_selected_frame (), regnum, &optim, &lval, &addr,
|
||||
&realnum, buffer);
|
||||
|
||||
if (optim)
|
||||
Index: gdb-6.3/gdb/mn10300-tdep.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/mn10300-tdep.c 2004-08-02 22:02:22.000000000 -0400
|
||||
+++ gdb-6.3/gdb/mn10300-tdep.c 2004-11-09 22:51:07.356239776 -0500
|
||||
@@ -1154,7 +1154,7 @@ mn10300_print_register (const char *name
|
||||
printf_filtered ("%s: ", name);
|
||||
|
||||
/* Get the data */
|
||||
- if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
|
||||
+ if (!frame_register_read (get_selected_frame (), regnum, raw_buffer))
|
||||
{
|
||||
printf_filtered ("[invalid]");
|
||||
return;
|
||||
Index: gdb-6.3/gdb/stack.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/stack.c 2004-08-02 20:57:26.000000000 -0400
|
||||
+++ gdb-6.3/gdb/stack.c 2004-11-09 22:51:07.361238800 -0500
|
||||
@@ -758,9 +758,7 @@ parse_frame_specification (char *frame_e
|
||||
switch (numargs)
|
||||
{
|
||||
case 0:
|
||||
- if (deprecated_selected_frame == NULL)
|
||||
- error ("No selected frame.");
|
||||
- return deprecated_selected_frame;
|
||||
+ return get_selected_frame ();
|
||||
/* NOTREACHED */
|
||||
case 1:
|
||||
{
|
||||
@@ -902,10 +900,10 @@ frame_info (char *addr_exp, int from_tty
|
||||
}
|
||||
calling_frame_info = get_prev_frame (fi);
|
||||
|
||||
- if (!addr_exp && frame_relative_level (deprecated_selected_frame) >= 0)
|
||||
+ if (!addr_exp && frame_relative_level (get_selected_frame ()) >= 0)
|
||||
{
|
||||
printf_filtered ("Stack level %d, frame at ",
|
||||
- frame_relative_level (deprecated_selected_frame));
|
||||
+ frame_relative_level (get_selected_frame ()));
|
||||
print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
|
||||
printf_filtered (":\n");
|
||||
}
|
||||
@@ -1445,9 +1443,7 @@ print_frame_label_vars (struct frame_inf
|
||||
void
|
||||
locals_info (char *args, int from_tty)
|
||||
{
|
||||
- if (!deprecated_selected_frame)
|
||||
- error ("No frame selected.");
|
||||
- print_frame_local_vars (deprecated_selected_frame, 0, gdb_stdout);
|
||||
+ print_frame_local_vars (get_selected_frame (), 0, gdb_stdout);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1470,7 +1466,7 @@ catch_info (char *ignore, int from_tty)
|
||||
if (!deprecated_selected_frame)
|
||||
error ("No frame selected.");
|
||||
|
||||
- print_frame_label_vars (deprecated_selected_frame, 0, gdb_stdout);
|
||||
+ print_frame_label_vars (get_selected_frame (), 0, gdb_stdout);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1537,9 +1533,7 @@ print_frame_arg_vars (struct frame_info
|
||||
void
|
||||
args_info (char *ignore, int from_tty)
|
||||
{
|
||||
- if (!deprecated_selected_frame)
|
||||
- error ("No frame selected.");
|
||||
- print_frame_arg_vars (deprecated_selected_frame, gdb_stdout);
|
||||
+ print_frame_arg_vars (get_selected_frame (), gdb_stdout);
|
||||
}
|
||||
|
||||
|
||||
@@ -1724,7 +1718,7 @@ down_silently_base (char *count_exp)
|
||||
if (target_has_stack == 0 || deprecated_selected_frame == 0)
|
||||
error ("No stack.");
|
||||
|
||||
- frame = find_relative_frame (deprecated_selected_frame, &count1);
|
||||
+ frame = find_relative_frame (get_selected_frame (), &count1);
|
||||
if (count1 != 0 && count_exp == 0)
|
||||
{
|
||||
|
||||
@@ -1944,7 +1938,7 @@ func_command (char *arg, int from_tty)
|
||||
|
||||
if (!found)
|
||||
printf_filtered ("'%s' not within current stack frame.\n", arg);
|
||||
- else if (fp != deprecated_selected_frame)
|
||||
+ else if (fp != get_selected_frame ())
|
||||
select_and_print_frame (fp);
|
||||
}
|
||||
|
||||
@@ -1965,7 +1959,7 @@ get_frame_language (void)
|
||||
instruction of another function. So we rely on
|
||||
get_frame_address_in_block(), it provides us with a PC which is
|
||||
guaranteed to be inside the frame's code block. */
|
||||
- s = find_pc_symtab (get_frame_address_in_block (deprecated_selected_frame));
|
||||
+ s = find_pc_symtab (get_frame_address_in_block (get_selected_frame ()));
|
||||
if (s)
|
||||
flang = s->language;
|
||||
else
|
||||
Index: gdb-6.3/gdb/tui/tui-disasm.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/tui/tui-disasm.c 2004-02-24 20:10:01.000000000 -0500
|
||||
+++ gdb-6.3/gdb/tui/tui-disasm.c 2004-11-09 22:51:07.370237044 -0500
|
||||
@@ -382,7 +382,7 @@ tui_vertical_disassem_scroll (enum tui_s
|
||||
|
||||
content = (tui_win_content) TUI_DISASM_WIN->generic.content;
|
||||
if (cursal.symtab == (struct symtab *) NULL)
|
||||
- s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
|
||||
+ s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
|
||||
else
|
||||
s = cursal.symtab;
|
||||
|
||||
Index: gdb-6.3/gdb/tui/tui-source.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/tui/tui-source.c 2004-02-16 16:05:09.000000000 -0500
|
||||
+++ gdb-6.3/gdb/tui/tui-source.c 2004-11-09 22:51:07.370237044 -0500
|
||||
@@ -326,7 +326,7 @@ tui_vertical_source_scroll (enum tui_scr
|
||||
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
|
||||
|
||||
if (cursal.symtab == (struct symtab *) NULL)
|
||||
- s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
|
||||
+ s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
|
||||
else
|
||||
s = cursal.symtab;
|
||||
|
||||
Index: gdb-6.3/gdb/tui/tui-winsource.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/tui/tui-winsource.c 2004-02-16 16:05:09.000000000 -0500
|
||||
+++ gdb-6.3/gdb/tui/tui-winsource.c 2004-11-09 22:51:07.371236848 -0500
|
||||
@@ -311,7 +311,7 @@ tui_horizontal_source_scroll (struct tui
|
||||
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
|
||||
|
||||
if (cursal.symtab == (struct symtab *) NULL)
|
||||
- s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
|
||||
+ s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
|
||||
else
|
||||
s = cursal.symtab;
|
||||
|
||||
Index: gdb-6.3/gdb/valops.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/valops.c 2004-09-13 23:01:48.000000000 -0400
|
||||
+++ gdb-6.3/gdb/valops.c 2004-11-09 22:51:07.374236263 -0500
|
||||
@@ -2663,15 +2663,10 @@ value_of_local (const char *name, int co
|
||||
struct block *b;
|
||||
struct value * ret;
|
||||
|
||||
- if (deprecated_selected_frame == 0)
|
||||
- {
|
||||
- if (complain)
|
||||
- error ("no frame selected");
|
||||
- else
|
||||
- return 0;
|
||||
- }
|
||||
+ if (!complain && deprecated_selected_frame == 0)
|
||||
+ return 0;
|
||||
|
||||
- func = get_frame_function (deprecated_selected_frame);
|
||||
+ func = get_frame_function (get_selected_frame ());
|
||||
if (!func)
|
||||
{
|
||||
if (complain)
|
||||
@@ -2700,7 +2695,7 @@ value_of_local (const char *name, int co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- ret = read_var_value (sym, deprecated_selected_frame);
|
||||
+ ret = read_var_value (sym, get_selected_frame ());
|
||||
if (ret == 0 && complain)
|
||||
error ("`%s' argument unreadable", name);
|
||||
return ret;
|
||||
Index: gdb-6.3/gdb/varobj.c
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/varobj.c 2004-07-26 10:53:06.000000000 -0400
|
||||
+++ gdb-6.3/gdb/varobj.c 2004-11-09 22:51:07.377235677 -0500
|
||||
@@ -488,7 +488,7 @@ varobj_create (char *objname,
|
||||
if (fi != NULL)
|
||||
{
|
||||
var->root->frame = get_frame_id (fi);
|
||||
- old_fi = deprecated_selected_frame;
|
||||
+ old_fi = get_selected_frame ();
|
||||
select_frame (fi);
|
||||
}
|
||||
|
||||
Index: gdb-6.3/gdb/testsuite/gdb.base/default.exp
|
||||
===================================================================
|
||||
--- gdb-6.3.orig/gdb/testsuite/gdb.base/default.exp 2003-03-20 09:45:50.000000000 -0500
|
||||
+++ gdb-6.3/gdb/testsuite/gdb.base/default.exp 2004-11-09 22:51:07.379235287 -0500
|
||||
@@ -167,7 +167,7 @@ gdb_test "disable breakpoints" "" "disab
|
||||
#test disable display
|
||||
gdb_test "disable display" "" "disable display"
|
||||
#test disassemble
|
||||
-gdb_test "disassemble" "No frame selected." "disassemble"
|
||||
+gdb_test "disassemble" "No (frame selected|registers)." "disassemble"
|
||||
#test display
|
||||
gdb_test "display" "" "display"
|
||||
#test do
|
||||
@@ -229,9 +229,9 @@ gdb_expect {
|
||||
}
|
||||
|
||||
#test frame "f" abbreviation
|
||||
-gdb_test "f" "No stack." "frame \"f\" abbreviation"
|
||||
+gdb_test "f" "No (stack|registers)." "frame \"f\" abbreviation"
|
||||
#test frame
|
||||
-gdb_test "frame" "No stack." "frame"
|
||||
+gdb_test "frame" "No (stack|registers)." "frame"
|
||||
#test fg
|
||||
gdb_test "fg" "The program is not being run." "fg"
|
||||
# FIXME: fg kills the udi connection
|
||||
@@ -294,9 +294,9 @@ gdb_test "ignore" "Argument required .a
|
||||
#test info address
|
||||
gdb_test "info address" "Argument required." "info address"
|
||||
#test info all-registers
|
||||
-gdb_test "info all-registers" "The program has no registers now." "info all-registers"
|
||||
+gdb_test "info all-registers" "(The program has no registers now|No registers)." "info all-registers"
|
||||
#test info args
|
||||
-gdb_test "info args" "No frame selected." "info args"
|
||||
+gdb_test "info args" "No (frame selected|registers)." "info args"
|
||||
#test info bogus-gdb-command
|
||||
gdb_test "info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\". Try \"help info\".*" "info bogus-gdb-command"
|
||||
#test info breakpoints
|
||||
@@ -320,11 +320,11 @@ gdb_test "info frame" "No stack.|No sele
|
||||
#test info files
|
||||
gdb_test "info files" "" "info files"
|
||||
#test info float
|
||||
-gdb_test "info float" "The program has no registers now." "info float"
|
||||
+gdb_test "info float" "(The program has no registers now|No registers)." "info float"
|
||||
#test info functions
|
||||
gdb_test "info functions" "All defined functions:" "info functions"
|
||||
#test info locals
|
||||
-gdb_test "info locals" "No frame selected." "info locals"
|
||||
+gdb_test "info locals" "(No frame selected|No registers)." "info locals"
|
||||
#test info program
|
||||
gdb_test "info program" "The program being debugged is not being run." "info program"
|
||||
#test info registers
|
||||
@@ -352,7 +352,7 @@ gdb_test "info types" "All defined types
|
||||
#test info variables
|
||||
gdb_test "info variables" "All defined variables:" "info variables"
|
||||
#test info vector
|
||||
-gdb_test "info vector" "The program has no registers now." "info vector"
|
||||
+gdb_test "info vector" "(The program has no registers now|No registers)." "info vector"
|
||||
#test info warranty
|
||||
gdb_test "info warranty" "NO WARRANTY(\[^\r\n\]*\[\r\n\])+ *11. *BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY(\[^\r\n\]*\[\r\n\])+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN(\[^\r\n\]*\[\r\n\])+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES(\[^\r\n\]*\[\r\n\])+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED(\[^\r\n\]*\[\r\n\])+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF(\[^\r\n\]*\[\r\n\])+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS(\[^\r\n\]*\[\r\n\])+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE(\[^\r\n\]*\[\r\n\])+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,(\[^\r\n\]*\[\r\n\])+REPAIR OR CORRECTION.(\[^\r\n\]*\[\r\n\])+ *12. *IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING(\[^\r\n\]*\[\r\n\])+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR(\[^\r\n\]*\[\r\n\])+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,(\[^\r\n\]*\[\r\n\])+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING(\[^\r\n\]*\[\r\n\])+OUT OF THE USE OR INABILITY TO USE THE PROGRAM .INCLUDING BUT NOT LIMITED(\[^\r\n\]*\[\r\n\])+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY(\[^\r\n\]*\[\r\n\])+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER(\[^\r\n\]*\[\r\n\])+PROGRAMS., EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE(\[^\r\n\]*\[\r\n\])+POSSIBILITY OF SUCH DAMAGES.*" "info warranty"
|
||||
#test info watchpoints
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user