mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-24 06:56:40 +00:00
gcc: Support only the latest branch releases of gcc
This change, as per #222, reduces the number of supported releases of gcc to the latest branch releases. I noticed while doing this work that gcc-4.5.4 was never added, so I moved patches for gcc-4.5.3 to 4.5.4 and updated the bfin-unknown-linux-uclibc example. Also, 120-siginfo.patch was fixed upstream in the 4.5.4 release, so this patch is omitted. I also bumped the avr sample to 4.9.3 from 4.9.2. With the addition of gcc-5.x, the gcc release team now releases the major.minor.0 versions, while updates to the branch are available in svn/git. We'll address that when we get to issue #219. This change just removes CC_GCC_5_1 and moves CC_GCC_5_2 to CC_GCC_5, and removes CC_GCC_5_1_or_later and moves CC_GCC_5_2_or_later to CC_GCC_5_or_later. This is the first of two part changes, as mentioned in #222. This change is slated for release in 1.22.0. The next change will be slated for 1.23.0, and will limit gcc versions to what is on https://gcc.gnu.org under "Release Series and Status", which is currently 4.9.3 and 5.2.0, although I will also support the previous supported version. In this example that would be 4.8.5. Last, but not least, this change also retires AVR32 support. Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
This commit is contained in:
parent
55d8497fea
commit
1a25115a18
1
TODO
1
TODO
@ -10,7 +10,6 @@ Recurring tasks:
|
||||
Non-recurring tasks:
|
||||
|
||||
- update newlib (for enhanced bare metal)
|
||||
- confirm existing implementation on targets other than AVR32
|
||||
- try to make it generic, will help for uClibc++
|
||||
|
||||
- multilib
|
||||
|
@ -1,13 +0,0 @@
|
||||
# AVR32 specific configuration file
|
||||
|
||||
## select ARCH_SUPPORTS_32
|
||||
## select ARCH_DEFAULT_32
|
||||
## select ARCH_USE_MMU
|
||||
## select ARCH_DEFAULT_BE
|
||||
## select ARCH_SUPPORTS_WITH_ARCH
|
||||
## select ARCH_SUPPORTS_WITH_CPU
|
||||
## select ARCH_SUPPORTS_WITH_TUNE
|
||||
## select ARCH_SUPPORTS_WITH_FPU
|
||||
##
|
||||
## help The AVR32 architecture, as defined by:
|
||||
## help http://www.atmel.com/products/avr32
|
256
config/cc/gcc.in
256
config/cc/gcc.in
@ -40,12 +40,7 @@ choice
|
||||
config CC_GCC_V_5_2_0
|
||||
bool
|
||||
prompt "5.2.0"
|
||||
select CC_GCC_5_2
|
||||
|
||||
config CC_GCC_V_5_1_0
|
||||
bool
|
||||
prompt "5.1.0"
|
||||
select CC_GCC_5_1
|
||||
select CC_GCC_5
|
||||
|
||||
config CC_GCC_V_linaro_4_9
|
||||
bool
|
||||
@ -58,21 +53,6 @@ config CC_GCC_V_4_9_3
|
||||
prompt "4.9.3"
|
||||
select CC_GCC_4_9
|
||||
|
||||
config CC_GCC_V_4_9_2
|
||||
bool
|
||||
prompt "4.9.2"
|
||||
select CC_GCC_4_9
|
||||
|
||||
config CC_GCC_V_4_9_1
|
||||
bool
|
||||
prompt "4.9.1"
|
||||
select CC_GCC_4_9
|
||||
|
||||
config CC_GCC_V_4_9_0
|
||||
bool
|
||||
prompt "4.9.0"
|
||||
select CC_GCC_4_9
|
||||
|
||||
config CC_GCC_V_linaro_4_8
|
||||
bool
|
||||
prompt "linaro-4.8-2015.06"
|
||||
@ -84,31 +64,6 @@ config CC_GCC_V_4_8_5
|
||||
prompt "4.8.5"
|
||||
select CC_GCC_4_8
|
||||
|
||||
config CC_GCC_V_4_8_4
|
||||
bool
|
||||
prompt "4.8.4"
|
||||
select CC_GCC_4_8
|
||||
|
||||
config CC_GCC_V_4_8_3
|
||||
bool
|
||||
prompt "4.8.3"
|
||||
select CC_GCC_4_8
|
||||
|
||||
config CC_GCC_V_4_8_2
|
||||
bool
|
||||
prompt "4.8.2"
|
||||
select CC_GCC_4_8
|
||||
|
||||
config CC_GCC_V_4_8_1
|
||||
bool
|
||||
prompt "4.8.1"
|
||||
select CC_GCC_4_8
|
||||
|
||||
config CC_GCC_V_4_8_0
|
||||
bool
|
||||
prompt "4.8.0"
|
||||
select CC_GCC_4_8
|
||||
|
||||
config CC_GCC_V_linaro_4_7
|
||||
bool
|
||||
prompt "linaro-4.7-2014.06"
|
||||
@ -120,26 +75,6 @@ config CC_GCC_V_4_7_4
|
||||
prompt "4.7.4"
|
||||
select CC_GCC_4_7
|
||||
|
||||
config CC_GCC_V_4_7_3
|
||||
bool
|
||||
prompt "4.7.3"
|
||||
select CC_GCC_4_7
|
||||
|
||||
config CC_GCC_V_4_7_2
|
||||
bool
|
||||
prompt "4.7.2"
|
||||
select CC_GCC_4_7
|
||||
|
||||
config CC_GCC_V_4_7_1
|
||||
bool
|
||||
prompt "4.7.1"
|
||||
select CC_GCC_4_7
|
||||
|
||||
config CC_GCC_V_4_7_0
|
||||
bool
|
||||
prompt "4.7.0"
|
||||
select CC_GCC_4_7
|
||||
|
||||
config CC_GCC_V_linaro_4_6
|
||||
bool
|
||||
prompt "linaro-4.6-2013.05"
|
||||
@ -151,50 +86,15 @@ config CC_GCC_V_4_6_4
|
||||
prompt "4.6.4"
|
||||
select CC_GCC_4_6
|
||||
|
||||
config CC_GCC_V_4_6_3
|
||||
bool
|
||||
prompt "4.6.3"
|
||||
select CC_GCC_4_6
|
||||
|
||||
config CC_GCC_V_4_6_2
|
||||
bool
|
||||
prompt "4.6.2"
|
||||
select CC_GCC_4_6
|
||||
|
||||
config CC_GCC_V_4_6_1
|
||||
bool
|
||||
prompt "4.6.1"
|
||||
select CC_GCC_4_6
|
||||
|
||||
config CC_GCC_V_4_6_0
|
||||
bool
|
||||
prompt "4.6.0"
|
||||
select CC_GCC_4_6
|
||||
|
||||
config CC_GCC_V_linaro_4_5
|
||||
bool
|
||||
prompt "linaro-4.5-2012.03"
|
||||
depends on CC_GCC_SHOW_LINARO
|
||||
select CC_GCC_4_5
|
||||
|
||||
config CC_GCC_V_4_5_3
|
||||
config CC_GCC_V_4_5_4
|
||||
bool
|
||||
prompt "4.5.3"
|
||||
select CC_GCC_4_5
|
||||
|
||||
config CC_GCC_V_4_5_2
|
||||
bool
|
||||
prompt "4.5.2"
|
||||
select CC_GCC_4_5
|
||||
|
||||
config CC_GCC_V_4_5_1
|
||||
bool
|
||||
prompt "4.5.1"
|
||||
select CC_GCC_4_5
|
||||
|
||||
config CC_GCC_V_4_5_0
|
||||
bool
|
||||
prompt "4.5.0"
|
||||
prompt "4.5.4"
|
||||
select CC_GCC_4_5
|
||||
|
||||
config CC_GCC_V_linaro_4_4
|
||||
@ -208,98 +108,16 @@ config CC_GCC_V_4_4_7
|
||||
prompt "4.4.7"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_4_6
|
||||
bool
|
||||
prompt "4.4.6"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_4_5
|
||||
bool
|
||||
prompt "4.4.5"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_4_4
|
||||
bool
|
||||
prompt "4.4.4"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_4_3
|
||||
bool
|
||||
prompt "4.4.3"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_4_2
|
||||
bool
|
||||
prompt "4.4.2"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_4_1
|
||||
bool
|
||||
prompt "4.4.1"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_4_0
|
||||
bool
|
||||
prompt "4.4.0"
|
||||
select CC_GCC_4_4
|
||||
|
||||
config CC_GCC_V_4_3_6
|
||||
bool
|
||||
prompt "4.3.6"
|
||||
select CC_GCC_4_3
|
||||
|
||||
config CC_GCC_V_4_3_5
|
||||
bool
|
||||
prompt "4.3.5"
|
||||
select CC_GCC_4_3
|
||||
|
||||
config CC_GCC_V_4_3_4
|
||||
bool
|
||||
prompt "4.3.4"
|
||||
select CC_GCC_4_3
|
||||
|
||||
config CC_GCC_V_4_3_3
|
||||
bool
|
||||
prompt "4.3.3"
|
||||
select CC_GCC_4_3
|
||||
|
||||
config CC_GCC_V_4_3_2
|
||||
bool
|
||||
prompt "4.3.2"
|
||||
select CC_GCC_4_3
|
||||
|
||||
config CC_GCC_V_4_3_1
|
||||
bool
|
||||
prompt "4.3.1"
|
||||
select CC_GCC_4_3
|
||||
|
||||
config CC_GCC_V_4_2_4
|
||||
bool
|
||||
prompt "4.2.4"
|
||||
select CC_GCC_4_2
|
||||
|
||||
# We need that one, it's the only version with avr32 support
|
||||
# because we have a patch for it
|
||||
config CC_GCC_V_4_2_2
|
||||
bool
|
||||
prompt "4.2.2"
|
||||
select CC_GCC_4_2
|
||||
|
||||
config CC_GCC_V_4_1_2
|
||||
bool
|
||||
prompt "4.1.2 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config CC_GCC_V_4_0_4
|
||||
bool
|
||||
prompt "4.0.4 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
config CC_GCC_V_3_4_6
|
||||
bool
|
||||
prompt "3.4.6 (OBSOLETE)"
|
||||
depends on OBSOLETE
|
||||
|
||||
endchoice
|
||||
|
||||
config CC_GCC_CUSTOM
|
||||
@ -431,9 +249,9 @@ config CC_GCC_4_9_or_later
|
||||
bool
|
||||
select CC_GCC_4_8_or_later
|
||||
|
||||
config CC_GCC_5_2
|
||||
config CC_GCC_5
|
||||
bool
|
||||
select CC_GCC_5_2_or_later
|
||||
select CC_GCC_5_or_later
|
||||
select CC_GCC_USE_GMP_MPFR
|
||||
select CC_GCC_USE_MPC
|
||||
select CC_GCC_HAS_GRAPHITE
|
||||
@ -445,31 +263,14 @@ config CC_GCC_5_2
|
||||
select CC_GCC_HAS_LIBSANITIZER
|
||||
select CC_SUPPORT_GOLANG
|
||||
|
||||
config CC_GCC_5_2_or_later
|
||||
bool
|
||||
select CC_GCC_5_1_or_later
|
||||
|
||||
config CC_GCC_5_1
|
||||
bool
|
||||
select CC_GCC_5_1_or_later
|
||||
select CC_GCC_USE_GMP_MPFR
|
||||
select CC_GCC_USE_MPC
|
||||
select CC_GCC_HAS_GRAPHITE
|
||||
select CC_GCC_HAS_LTO
|
||||
select CC_GCC_HAS_PKGVERSION_BUGURL
|
||||
select CC_GCC_HAS_BUILD_ID
|
||||
select CC_GCC_HAS_LNK_HASH_STYLE
|
||||
select CC_GCC_HAS_LIBQUADMATH
|
||||
select CC_GCC_HAS_LIBSANITIZER
|
||||
select CC_SUPPORT_GOLANG
|
||||
|
||||
config CC_GCC_5_1_or_later
|
||||
config CC_GCC_5_or_later
|
||||
bool
|
||||
select CC_GCC_4_9_or_later
|
||||
|
||||
|
||||
config CC_GCC_latest
|
||||
bool
|
||||
select CC_GCC_5_1_or_later
|
||||
select CC_GCC_5_or_later
|
||||
select CC_GCC_USE_GMP_MPFR
|
||||
select CC_GCC_USE_MPC
|
||||
select CC_GCC_HAS_GRAPHITE
|
||||
@ -489,7 +290,7 @@ config CC_GCC_USE_GRAPHITE
|
||||
bool
|
||||
default y
|
||||
depends on CC_GCC_HAS_GRAPHITE
|
||||
select CLOOG_NEEDED if !CC_GCC_5_1_or_later
|
||||
select CLOOG_NEEDED if !CC_GCC_5_or_later
|
||||
select PPL_NEEDED if !CC_GCC_4_8_or_later
|
||||
select ISL_NEEDED if CC_GCC_4_8_or_later
|
||||
help
|
||||
@ -567,57 +368,20 @@ config CC_GCC_VERSION
|
||||
# Don't remove next line
|
||||
# CT_INSERT_VERSION_STRING_BELOW
|
||||
default "5.2.0" if CC_GCC_V_5_2_0
|
||||
default "5.1.0" if CC_GCC_V_5_1_0
|
||||
default "linaro-4.9-2015.06" if CC_GCC_V_linaro_4_9
|
||||
default "4.9.3" if CC_GCC_V_4_9_3
|
||||
default "4.9.2" if CC_GCC_V_4_9_2
|
||||
default "4.9.1" if CC_GCC_V_4_9_1
|
||||
default "4.9.0" if CC_GCC_V_4_9_0
|
||||
default "linaro-4.8-2015.06" if CC_GCC_V_linaro_4_8
|
||||
default "4.8.5" if CC_GCC_V_4_8_5
|
||||
default "4.8.4" if CC_GCC_V_4_8_4
|
||||
default "4.8.3" if CC_GCC_V_4_8_3
|
||||
default "4.8.2" if CC_GCC_V_4_8_2
|
||||
default "4.8.1" if CC_GCC_V_4_8_1
|
||||
default "4.8.0" if CC_GCC_V_4_8_0
|
||||
default "linaro-4.7-2014.06" if CC_GCC_V_linaro_4_7
|
||||
default "4.7.4" if CC_GCC_V_4_7_4
|
||||
default "4.7.3" if CC_GCC_V_4_7_3
|
||||
default "4.7.2" if CC_GCC_V_4_7_2
|
||||
default "4.7.1" if CC_GCC_V_4_7_1
|
||||
default "4.7.0" if CC_GCC_V_4_7_0
|
||||
default "linaro-4.6-2013.05" if CC_GCC_V_linaro_4_6
|
||||
default "4.6.4" if CC_GCC_V_4_6_4
|
||||
default "4.6.3" if CC_GCC_V_4_6_3
|
||||
default "4.6.2" if CC_GCC_V_4_6_2
|
||||
default "4.6.1" if CC_GCC_V_4_6_1
|
||||
default "4.6.0" if CC_GCC_V_4_6_0
|
||||
default "linaro-4.5-2012.03" if CC_GCC_V_linaro_4_5
|
||||
default "4.5.3" if CC_GCC_V_4_5_3
|
||||
default "4.5.2" if CC_GCC_V_4_5_2
|
||||
default "4.5.1" if CC_GCC_V_4_5_1
|
||||
default "4.5.0" if CC_GCC_V_4_5_0
|
||||
default "4.5.4" if CC_GCC_V_4_5_4
|
||||
default "linaro-4.4-2011.02-0" if CC_GCC_V_linaro_4_4
|
||||
default "4.4.7" if CC_GCC_V_4_4_7
|
||||
default "4.4.6" if CC_GCC_V_4_4_6
|
||||
default "4.4.5" if CC_GCC_V_4_4_5
|
||||
default "4.4.4" if CC_GCC_V_4_4_4
|
||||
default "4.4.3" if CC_GCC_V_4_4_3
|
||||
default "4.4.2" if CC_GCC_V_4_4_2
|
||||
default "4.4.1" if CC_GCC_V_4_4_1
|
||||
default "4.4.0" if CC_GCC_V_4_4_0
|
||||
default "4.3.6" if CC_GCC_V_4_3_6
|
||||
default "4.3.5" if CC_GCC_V_4_3_5
|
||||
default "4.3.4" if CC_GCC_V_4_3_4
|
||||
default "4.3.3" if CC_GCC_V_4_3_3
|
||||
default "4.3.2" if CC_GCC_V_4_3_2
|
||||
default "4.3.1" if CC_GCC_V_4_3_1
|
||||
default "4.3.0" if CC_GCC_V_4_3_0
|
||||
default "4.2.4" if CC_GCC_V_4_2_4
|
||||
default "4.2.2" if CC_GCC_V_4_2_2
|
||||
default "4.1.2" if CC_GCC_V_4_1_2
|
||||
default "4.0.4" if CC_GCC_V_4_0_4
|
||||
default "3.4.6" if CC_GCC_V_3_4_6
|
||||
|
||||
config CC_LANG_JAVA_USE_ECJ
|
||||
bool
|
||||
|
@ -9,20 +9,20 @@ choice
|
||||
config ISL_V_0_14
|
||||
bool
|
||||
prompt "0.14"
|
||||
depends on CLOOG_0_18_4_or_later || CC_GCC_5_1_or_later
|
||||
depends on CLOOG_0_18_4_or_later || CC_GCC_5_or_later
|
||||
select ISL_V_0_14_or_later
|
||||
|
||||
config ISL_V_0_12_2
|
||||
bool
|
||||
prompt "0.12.2"
|
||||
depends on ! CLOOG_0_18_4_or_later || CC_GCC_5_1_or_later
|
||||
depends on ! CLOOG_0_18_4_or_later || CC_GCC_5_or_later
|
||||
select ISL_V_0_12_or_later
|
||||
|
||||
config ISL_V_0_11_1
|
||||
bool
|
||||
prompt "0.11.1"
|
||||
depends on ! CLOOG_0_18_4_or_later
|
||||
depends on ! CC_GCC_5_1_or_later
|
||||
depends on ! CC_GCC_5_or_later
|
||||
|
||||
endchoice
|
||||
|
||||
|
@ -157,16 +157,3 @@ config LIBC_NEWLIB_TARGET_CFLAGS
|
||||
to compile the libraries.
|
||||
|
||||
Leave blank if you don't know better.
|
||||
|
||||
comment "Architecture specific options"
|
||||
|
||||
config ATMEL_AVR32_HEADERS
|
||||
bool
|
||||
prompt "Install Atmel AVR32 headers"
|
||||
depends on ARCH_avr32
|
||||
default y
|
||||
help
|
||||
Install Atmel AVR32 headers for native AVR32 development. Most
|
||||
AVR32 MCU devices are supported.
|
||||
|
||||
If you do native AVR32 development you want to say 'Y' here.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,536 +0,0 @@
|
||||
From 55e9a09c2249f3d5bbc09d718679365604436aac Mon Sep 17 00:00:00 2001
|
||||
From: Erico Nunes <nunes.erico@gmail.com>
|
||||
Date: Sat, 13 Jun 2015 00:53:25 -0300
|
||||
Subject: [PATCH] AVR only; support -C for AVR memory usage
|
||||
|
||||
Source: http://git.makehackvoid.com/cgi-bin/gitweb.cgi?p=mhvavrtools.git;a=blob_plain;f=mhvavrtools/patches/binutils-001-avr-size.patch;h=e80d28eae46217551d996a2253256c97d10aa4b5;hb=refs/heads/master
|
||||
|
||||
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
|
||||
---
|
||||
binutils/size.c | 414 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 394 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/binutils/size.c b/binutils/size.c
|
||||
index 0937de5..486ddde 100644
|
||||
--- a/binutils/size.c
|
||||
+++ b/binutils/size.c
|
||||
@@ -36,10 +36,31 @@
|
||||
#include "getopt.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
-#ifndef BSD_DEFAULT
|
||||
-#define BSD_DEFAULT 1
|
||||
+typedef enum
|
||||
+{
|
||||
+ format_sysv = 0,
|
||||
+ format_bsd = 1,
|
||||
+ format_avr = 2,
|
||||
+} format_type_t;
|
||||
+
|
||||
+
|
||||
+/* Set the default format. */
|
||||
+#define FORMAT_DEFAULT_SYSV 0
|
||||
+#define FORMAT_DEFAULT_BSD 1
|
||||
+#define FORMAT_DEFAULT_AVR 0
|
||||
+
|
||||
+#if FORMAT_DEFAULT_SYSV
|
||||
+ #define FORMAT_DEFAULT format_sysv
|
||||
+ #define FORMAT_NAME "sysv"
|
||||
+#elif FORMAT_DEFAULT_BSD
|
||||
+ #define FORMAT_DEFAULT format_bsd
|
||||
+ #define FORMAT_NAME "berkeley"
|
||||
+#elif FORMAT_DEFAULT_AVR
|
||||
+ #define FORMAT_DEFAULT format_avr
|
||||
+ #define FORMAT_NAME "avr"
|
||||
#endif
|
||||
|
||||
+
|
||||
/* Program options. */
|
||||
|
||||
static enum
|
||||
@@ -48,9 +69,8 @@ static enum
|
||||
}
|
||||
radix = decimal;
|
||||
|
||||
-/* 0 means use AT&T-style output. */
|
||||
-static int berkeley_format = BSD_DEFAULT;
|
||||
|
||||
+format_type_t format = FORMAT_DEFAULT;
|
||||
static int show_version = 0;
|
||||
static int show_help = 0;
|
||||
static int show_totals = 0;
|
||||
@@ -64,6 +84,246 @@ static bfd_size_type total_textsize;
|
||||
/* Program exit status. */
|
||||
static int return_code = 0;
|
||||
|
||||
+
|
||||
+/* AVR Size specific stuff */
|
||||
+
|
||||
+#define AVR64 64UL
|
||||
+#define AVR128 128UL
|
||||
+#define AVR256 256UL
|
||||
+#define AVR512 512UL
|
||||
+#define AVR1K 1024UL
|
||||
+#define AVR2K 2048UL
|
||||
+#define AVR4K 4096UL
|
||||
+#define AVR8K 8192UL
|
||||
+#define AVR16K 16384UL
|
||||
+#define AVR20K 20480UL
|
||||
+#define AVR24K 24576UL
|
||||
+#define AVR32K 32768UL
|
||||
+#define AVR36K 36864UL
|
||||
+#define AVR40K 40960UL
|
||||
+#define AVR64K 65536UL
|
||||
+#define AVR68K 69632UL
|
||||
+#define AVR128K 131072UL
|
||||
+#define AVR136K 139264UL
|
||||
+#define AVR200K 204800UL
|
||||
+#define AVR256K 262144UL
|
||||
+#define AVR264K 270336UL
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ char *name;
|
||||
+ long flash;
|
||||
+ long ram;
|
||||
+ long eeprom;
|
||||
+} avr_device_t;
|
||||
+
|
||||
+avr_device_t avr[] =
|
||||
+{
|
||||
+ {"atxmega256a3", AVR264K, AVR16K, AVR4K},
|
||||
+ {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
|
||||
+ {"atxmega256d3", AVR264K, AVR16K, AVR4K},
|
||||
+
|
||||
+ {"atmega2560", AVR256K, AVR8K, AVR4K},
|
||||
+ {"atmega2561", AVR256K, AVR8K, AVR4K},
|
||||
+
|
||||
+ {"atxmega192a3", AVR200K, AVR16K, AVR2K},
|
||||
+ {"atxmega192d3", AVR200K, AVR16K, AVR2K},
|
||||
+
|
||||
+ {"atxmega128a1", AVR136K, AVR8K, AVR2K},
|
||||
+ {"atxmega128a1u", AVR136K, AVR8K, AVR2K},
|
||||
+ {"atxmega128a3", AVR136K, AVR8K, AVR2K},
|
||||
+ {"atxmega128d3", AVR136K, AVR8K, AVR2K},
|
||||
+
|
||||
+ {"at43usb320", AVR128K, 608UL, 0UL},
|
||||
+ {"at90can128", AVR128K, AVR4K, AVR4K},
|
||||
+ {"at90usb1286", AVR128K, AVR8K, AVR4K},
|
||||
+ {"at90usb1287", AVR128K, AVR8K, AVR4K},
|
||||
+ {"atmega128", AVR128K, AVR4K, AVR4K},
|
||||
+ {"atmega1280", AVR128K, AVR8K, AVR4K},
|
||||
+ {"atmega1281", AVR128K, AVR8K, AVR4K},
|
||||
+ {"atmega1284p", AVR128K, AVR16K, AVR4K},
|
||||
+ {"atmega128rfa1", AVR128K, AVR16K, AVR4K},
|
||||
+ {"atmega103", AVR128K, 4000UL, AVR4K},
|
||||
+
|
||||
+ {"atxmega64a1", AVR68K, AVR4K, AVR2K},
|
||||
+ {"atxmega64a1u", AVR68K, AVR4K, AVR2K},
|
||||
+ {"atxmega64a3", AVR68K, AVR4K, AVR2K},
|
||||
+ {"atxmega64d3", AVR68K, AVR4K, AVR2K},
|
||||
+
|
||||
+ {"at90can64", AVR64K, AVR4K, AVR2K},
|
||||
+ {"at90scr100", AVR64K, AVR4K, AVR2K},
|
||||
+ {"at90usb646", AVR64K, AVR4K, AVR2K},
|
||||
+ {"at90usb647", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega64", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega640", AVR64K, AVR8K, AVR4K},
|
||||
+ {"atmega644", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega644a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega644p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega644pa", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega645", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega645a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega645p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6450", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6450a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6450p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega649", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega649a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega649p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6490", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6490a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6490p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega64c1", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega64hve", AVR64K, AVR4K, AVR1K},
|
||||
+ {"atmega64m1", AVR64K, AVR4K, AVR2K},
|
||||
+ {"m3000", AVR64K, AVR4K, 0UL},
|
||||
+
|
||||
+ {"atmega406", AVR40K, AVR2K, AVR512},
|
||||
+
|
||||
+ {"atxmega32a4", AVR36K, AVR4K, AVR1K},
|
||||
+ {"atxmega32d4", AVR36K, AVR4K, AVR1K},
|
||||
+
|
||||
+ {"at90can32", AVR32K, AVR2K, AVR1K},
|
||||
+ {"at94k", AVR32K, AVR4K, 0UL},
|
||||
+ {"atmega32", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega323", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega324a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega324p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega324pa", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega325", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega325a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega325p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3250", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3250a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3250p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega328", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega328p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329pa", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3290", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3290a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3290p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32hvb", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32c1", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32hvb", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32m1", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32u2", AVR32K, AVR1K, AVR1K},
|
||||
+ {"atmega32u4", AVR32K, 2560UL, AVR1K},
|
||||
+ {"atmega32u6", AVR32K, 2560UL, AVR1K},
|
||||
+
|
||||
+ {"at43usb355", AVR24K, 1120UL, 0UL},
|
||||
+
|
||||
+ {"atxmega16a4", AVR20K, AVR2K, AVR1K},
|
||||
+ {"atxmega16d4", AVR20K, AVR2K, AVR1K},
|
||||
+
|
||||
+ {"at76c711", AVR16K, AVR2K, 0UL},
|
||||
+ {"at90pwm216", AVR16K, AVR1K, AVR512},
|
||||
+ {"at90pwm316", AVR16K, AVR1K, AVR512},
|
||||
+ {"at90usb162", AVR16K, AVR512, AVR512},
|
||||
+ {"atmega16", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega161", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega162", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega163", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega164", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega164a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega164p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega165a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega165", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega165p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega168", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega168a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega168p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169pa", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16hva", AVR16K, 768UL, AVR256},
|
||||
+ {"atmega16hva2", AVR16K, AVR1K, AVR256},
|
||||
+ {"atmega16hvb", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16m1", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16u2", AVR16K, AVR512, AVR512},
|
||||
+ {"atmega16u4", AVR16K, 1280UL, AVR512},
|
||||
+ {"attiny167", AVR16K, AVR512, AVR512},
|
||||
+
|
||||
+ {"at90c8534", AVR8K, 352UL, AVR512},
|
||||
+ {"at90pwm1", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm2", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm2b", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm3", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm3b", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm81", AVR8K, AVR256, AVR512},
|
||||
+ {"at90s8515", AVR8K, AVR512, AVR512},
|
||||
+ {"at90s8535", AVR8K, AVR512, AVR512},
|
||||
+ {"at90usb82", AVR8K, AVR512, AVR512},
|
||||
+ {"ata6289", AVR8K, AVR512, 320UL},
|
||||
+ {"atmega8", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega8515", AVR8K, AVR512, AVR512},
|
||||
+ {"atmega8535", AVR8K, AVR512, AVR512},
|
||||
+ {"atmega88", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega88a", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega88p", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega88pa", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega8hva", AVR8K, 768UL, AVR256},
|
||||
+ {"atmega8u2", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny84", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny84a", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny85", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny861", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny861a", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny87", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny88", AVR8K, AVR512, AVR64},
|
||||
+
|
||||
+ {"at90s4414", AVR4K, 352UL, AVR256},
|
||||
+ {"at90s4433", AVR4K, AVR128, AVR256},
|
||||
+ {"at90s4434", AVR4K, 352UL, AVR256},
|
||||
+ {"atmega48", AVR4K, AVR512, AVR256},
|
||||
+ {"atmega48a", AVR4K, AVR512, AVR256},
|
||||
+ {"atmega48p", AVR4K, AVR512, AVR256},
|
||||
+ {"attiny4313", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny43u", AVR4K, AVR256, AVR64},
|
||||
+ {"attiny44", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny44a", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny45", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny461", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny461a", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny48", AVR4K, AVR256, AVR64},
|
||||
+
|
||||
+ {"at86rf401", AVR2K, 224UL, AVR128},
|
||||
+ {"at90s2313", AVR2K, AVR128, AVR128},
|
||||
+ {"at90s2323", AVR2K, AVR128, AVR128},
|
||||
+ {"at90s2333", AVR2K, 224UL, AVR128},
|
||||
+ {"at90s2343", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny20", AVR2K, AVR128, 0UL},
|
||||
+ {"attiny22", AVR2K, 224UL, AVR128},
|
||||
+ {"attiny2313", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny2313a", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny24", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny24a", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny25", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny26", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny261", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny261a", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny28", AVR2K, 0UL, 0UL},
|
||||
+ {"attiny40", AVR2K, AVR256, 0UL},
|
||||
+
|
||||
+ {"at90s1200", AVR1K, 0UL, AVR64},
|
||||
+ {"attiny9", AVR1K, 32UL, 0UL},
|
||||
+ {"attiny10", AVR1K, 32UL, 0UL},
|
||||
+ {"attiny11", AVR1K, 0UL, AVR64},
|
||||
+ {"attiny12", AVR1K, 0UL, AVR64},
|
||||
+ {"attiny13", AVR1K, AVR64, AVR64},
|
||||
+ {"attiny13a", AVR1K, AVR64, AVR64},
|
||||
+ {"attiny15", AVR1K, 0UL, AVR64},
|
||||
+
|
||||
+ {"attiny4", AVR512, 32UL, 0UL},
|
||||
+ {"attiny5", AVR512, 32UL, 0UL},
|
||||
+};
|
||||
+
|
||||
+static char *avrmcu = NULL;
|
||||
+
|
||||
+
|
||||
static char *target = NULL;
|
||||
|
||||
/* Forward declarations. */
|
||||
@@ -79,7 +339,8 @@ usage (FILE *stream, int status)
|
||||
fprintf (stream, _(" Displays the sizes of sections inside binary files\n"));
|
||||
fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n"));
|
||||
fprintf (stream, _(" The options are:\n\
|
||||
- -A|-B --format={sysv|berkeley} Select output style (default is %s)\n\
|
||||
+ -A|-B|-C --format={sysv|berkeley|avr} Select output style (default is %s)\n\
|
||||
+ --mcu=<avrmcu> MCU name for AVR format only\n\
|
||||
-o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\
|
||||
-t --totals Display the total sizes (Berkeley only)\n\
|
||||
--common Display total size for *COM* syms\n\
|
||||
@@ -88,11 +349,7 @@ usage (FILE *stream, int status)
|
||||
-h --help Display this information\n\
|
||||
-v --version Display the program's version\n\
|
||||
\n"),
|
||||
-#if BSD_DEFAULT
|
||||
- "berkeley"
|
||||
-#else
|
||||
- "sysv"
|
||||
-#endif
|
||||
+FORMAT_NAME
|
||||
);
|
||||
list_supported_targets (program_name, stream);
|
||||
if (REPORT_BUGS_TO[0] && status == 0)
|
||||
@@ -103,6 +360,7 @@ usage (FILE *stream, int status)
|
||||
#define OPTION_FORMAT (200)
|
||||
#define OPTION_RADIX (OPTION_FORMAT + 1)
|
||||
#define OPTION_TARGET (OPTION_RADIX + 1)
|
||||
+#define OPTION_MCU (OPTION_TARGET + 1)
|
||||
|
||||
static struct option long_options[] =
|
||||
{
|
||||
@@ -110,6 +368,7 @@ static struct option long_options[] =
|
||||
{"format", required_argument, 0, OPTION_FORMAT},
|
||||
{"radix", required_argument, 0, OPTION_RADIX},
|
||||
{"target", required_argument, 0, OPTION_TARGET},
|
||||
+ {"mcu", required_argument, 0, 203},
|
||||
{"totals", no_argument, &show_totals, 1},
|
||||
{"version", no_argument, &show_version, 1},
|
||||
{"help", no_argument, &show_help, 1},
|
||||
@@ -141,7 +400,7 @@ main (int argc, char **argv)
|
||||
bfd_init ();
|
||||
set_default_bfd_target ();
|
||||
|
||||
- while ((c = getopt_long (argc, argv, "ABHhVvdfotx", long_options,
|
||||
+ while ((c = getopt_long (argc, argv, "ABCHhVvdfotx", long_options,
|
||||
(int *) 0)) != EOF)
|
||||
switch (c)
|
||||
{
|
||||
@@ -150,11 +409,15 @@ main (int argc, char **argv)
|
||||
{
|
||||
case 'B':
|
||||
case 'b':
|
||||
- berkeley_format = 1;
|
||||
+ format = format_bsd;
|
||||
break;
|
||||
case 'S':
|
||||
case 's':
|
||||
- berkeley_format = 0;
|
||||
+ format = format_sysv;
|
||||
+ break;
|
||||
+ case 'A':
|
||||
+ case 'a':
|
||||
+ format = format_avr;
|
||||
break;
|
||||
default:
|
||||
non_fatal (_("invalid argument to --format: %s"), optarg);
|
||||
@@ -162,6 +425,10 @@ main (int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
|
||||
+ case OPTION_MCU:
|
||||
+ avrmcu = optarg;
|
||||
+ break;
|
||||
+
|
||||
case OPTION_TARGET:
|
||||
target = optarg;
|
||||
break;
|
||||
@@ -190,11 +457,14 @@ main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
- berkeley_format = 0;
|
||||
+ format = format_sysv;
|
||||
break;
|
||||
case 'B':
|
||||
- berkeley_format = 1;
|
||||
+ format = format_bsd;
|
||||
break;
|
||||
+ case 'C':
|
||||
+ format = format_avr;
|
||||
+ break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
show_version = 1;
|
||||
@@ -240,7 +510,7 @@ main (int argc, char **argv)
|
||||
for (; optind < argc;)
|
||||
display_file (argv[optind++]);
|
||||
|
||||
- if (show_totals && berkeley_format)
|
||||
+ if (show_totals && format == format_bsd)
|
||||
{
|
||||
bfd_size_type total = total_textsize + total_datasize + total_bsssize;
|
||||
|
||||
@@ -599,13 +869,117 @@ print_sysv_format (bfd *file)
|
||||
printf ("\n\n");
|
||||
}
|
||||
|
||||
+
|
||||
+static avr_device_t *
|
||||
+avr_find_device (void)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+ if (avrmcu != NULL)
|
||||
+ {
|
||||
+ for (i = 0; i < sizeof(avr) / sizeof(avr[0]); i++)
|
||||
+ {
|
||||
+ if (strcmp(avr[i].name, avrmcu) == 0)
|
||||
+ {
|
||||
+ /* Match found */
|
||||
+ return (&avr[i]);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return (NULL);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+static void
|
||||
+print_avr_format (bfd *file)
|
||||
+{
|
||||
+ char *avr_name = "Unknown";
|
||||
+ int flashmax = 0;
|
||||
+ int rammax = 0;
|
||||
+ int eeprommax = 0;
|
||||
+ asection *section;
|
||||
+ bfd_size_type my_datasize = 0;
|
||||
+ bfd_size_type my_textsize = 0;
|
||||
+ bfd_size_type my_bsssize = 0;
|
||||
+ bfd_size_type bootloadersize = 0;
|
||||
+ bfd_size_type noinitsize = 0;
|
||||
+ bfd_size_type eepromsize = 0;
|
||||
+
|
||||
+ avr_device_t *avrdevice = avr_find_device();
|
||||
+ if (avrdevice != NULL)
|
||||
+ {
|
||||
+ avr_name = avrdevice->name;
|
||||
+ flashmax = avrdevice->flash;
|
||||
+ rammax = avrdevice->ram;
|
||||
+ eeprommax = avrdevice->eeprom;
|
||||
+ }
|
||||
+
|
||||
+ if ((section = bfd_get_section_by_name (file, ".data")) != NULL)
|
||||
+ my_datasize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".text")) != NULL)
|
||||
+ my_textsize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".bss")) != NULL)
|
||||
+ my_bsssize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".bootloader")) != NULL)
|
||||
+ bootloadersize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".noinit")) != NULL)
|
||||
+ noinitsize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".eeprom")) != NULL)
|
||||
+ eepromsize = bfd_section_size (file, section);
|
||||
+
|
||||
+ bfd_size_type text = my_textsize + my_datasize + bootloadersize;
|
||||
+ bfd_size_type data = my_datasize + my_bsssize + noinitsize;
|
||||
+ bfd_size_type eeprom = eepromsize;
|
||||
+
|
||||
+ printf ("AVR Memory Usage\n"
|
||||
+ "----------------\n"
|
||||
+ "Device: %s\n\n", avr_name);
|
||||
+
|
||||
+ /* Text size */
|
||||
+ printf ("Program:%8ld bytes", text);
|
||||
+ if (flashmax > 0)
|
||||
+ {
|
||||
+ printf (" (%2.1f%% Full)", ((float)text / flashmax) * 100);
|
||||
+ }
|
||||
+ printf ("\n(.text + .data + .bootloader)\n\n");
|
||||
+
|
||||
+ /* Data size */
|
||||
+ printf ("Data: %8ld bytes", data);
|
||||
+ if (rammax > 0)
|
||||
+ {
|
||||
+ printf (" (%2.1f%% Full)", ((float)data / rammax) * 100);
|
||||
+ }
|
||||
+ printf ("\n(.data + .bss + .noinit)\n\n");
|
||||
+
|
||||
+ /* EEPROM size */
|
||||
+ if (eeprom > 0)
|
||||
+ {
|
||||
+ printf ("EEPROM: %8ld bytes", eeprom);
|
||||
+ if (eeprommax > 0)
|
||||
+ {
|
||||
+ printf (" (%2.1f%% Full)", ((float)eeprom / eeprommax) * 100);
|
||||
+ }
|
||||
+ printf ("\n(.eeprom)\n\n");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void
|
||||
print_sizes (bfd *file)
|
||||
{
|
||||
if (show_common)
|
||||
calculate_common_size (file);
|
||||
- if (berkeley_format)
|
||||
- print_berkeley_format (file);
|
||||
- else
|
||||
- print_sysv_format (file);
|
||||
+ switch (format)
|
||||
+ {
|
||||
+ case format_sysv:
|
||||
+ print_sysv_format (file);
|
||||
+ break;
|
||||
+ case format_bsd:
|
||||
+ print_berkeley_format (file);
|
||||
+ break;
|
||||
+ case format_avr:
|
||||
+ default:
|
||||
+ print_avr_format (file);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.4.1
|
||||
|
@ -1,536 +0,0 @@
|
||||
From 55e9a09c2249f3d5bbc09d718679365604436aac Mon Sep 17 00:00:00 2001
|
||||
From: Erico Nunes <nunes.erico@gmail.com>
|
||||
Date: Sat, 13 Jun 2015 00:53:25 -0300
|
||||
Subject: [PATCH] AVR only; support -C for AVR memory usage
|
||||
|
||||
Source: http://git.makehackvoid.com/cgi-bin/gitweb.cgi?p=mhvavrtools.git;a=blob_plain;f=mhvavrtools/patches/binutils-001-avr-size.patch;h=e80d28eae46217551d996a2253256c97d10aa4b5;hb=refs/heads/master
|
||||
|
||||
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
|
||||
---
|
||||
binutils/size.c | 414 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 394 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/binutils/size.c b/binutils/size.c
|
||||
index 0937de5..486ddde 100644
|
||||
--- a/binutils/size.c
|
||||
+++ b/binutils/size.c
|
||||
@@ -36,10 +36,31 @@
|
||||
#include "getopt.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
-#ifndef BSD_DEFAULT
|
||||
-#define BSD_DEFAULT 1
|
||||
+typedef enum
|
||||
+{
|
||||
+ format_sysv = 0,
|
||||
+ format_bsd = 1,
|
||||
+ format_avr = 2,
|
||||
+} format_type_t;
|
||||
+
|
||||
+
|
||||
+/* Set the default format. */
|
||||
+#define FORMAT_DEFAULT_SYSV 0
|
||||
+#define FORMAT_DEFAULT_BSD 1
|
||||
+#define FORMAT_DEFAULT_AVR 0
|
||||
+
|
||||
+#if FORMAT_DEFAULT_SYSV
|
||||
+ #define FORMAT_DEFAULT format_sysv
|
||||
+ #define FORMAT_NAME "sysv"
|
||||
+#elif FORMAT_DEFAULT_BSD
|
||||
+ #define FORMAT_DEFAULT format_bsd
|
||||
+ #define FORMAT_NAME "berkeley"
|
||||
+#elif FORMAT_DEFAULT_AVR
|
||||
+ #define FORMAT_DEFAULT format_avr
|
||||
+ #define FORMAT_NAME "avr"
|
||||
#endif
|
||||
|
||||
+
|
||||
/* Program options. */
|
||||
|
||||
static enum
|
||||
@@ -48,9 +69,8 @@ static enum
|
||||
}
|
||||
radix = decimal;
|
||||
|
||||
-/* 0 means use AT&T-style output. */
|
||||
-static int berkeley_format = BSD_DEFAULT;
|
||||
|
||||
+format_type_t format = FORMAT_DEFAULT;
|
||||
static int show_version = 0;
|
||||
static int show_help = 0;
|
||||
static int show_totals = 0;
|
||||
@@ -64,6 +84,246 @@ static bfd_size_type total_textsize;
|
||||
/* Program exit status. */
|
||||
static int return_code = 0;
|
||||
|
||||
+
|
||||
+/* AVR Size specific stuff */
|
||||
+
|
||||
+#define AVR64 64UL
|
||||
+#define AVR128 128UL
|
||||
+#define AVR256 256UL
|
||||
+#define AVR512 512UL
|
||||
+#define AVR1K 1024UL
|
||||
+#define AVR2K 2048UL
|
||||
+#define AVR4K 4096UL
|
||||
+#define AVR8K 8192UL
|
||||
+#define AVR16K 16384UL
|
||||
+#define AVR20K 20480UL
|
||||
+#define AVR24K 24576UL
|
||||
+#define AVR32K 32768UL
|
||||
+#define AVR36K 36864UL
|
||||
+#define AVR40K 40960UL
|
||||
+#define AVR64K 65536UL
|
||||
+#define AVR68K 69632UL
|
||||
+#define AVR128K 131072UL
|
||||
+#define AVR136K 139264UL
|
||||
+#define AVR200K 204800UL
|
||||
+#define AVR256K 262144UL
|
||||
+#define AVR264K 270336UL
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ char *name;
|
||||
+ long flash;
|
||||
+ long ram;
|
||||
+ long eeprom;
|
||||
+} avr_device_t;
|
||||
+
|
||||
+avr_device_t avr[] =
|
||||
+{
|
||||
+ {"atxmega256a3", AVR264K, AVR16K, AVR4K},
|
||||
+ {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
|
||||
+ {"atxmega256d3", AVR264K, AVR16K, AVR4K},
|
||||
+
|
||||
+ {"atmega2560", AVR256K, AVR8K, AVR4K},
|
||||
+ {"atmega2561", AVR256K, AVR8K, AVR4K},
|
||||
+
|
||||
+ {"atxmega192a3", AVR200K, AVR16K, AVR2K},
|
||||
+ {"atxmega192d3", AVR200K, AVR16K, AVR2K},
|
||||
+
|
||||
+ {"atxmega128a1", AVR136K, AVR8K, AVR2K},
|
||||
+ {"atxmega128a1u", AVR136K, AVR8K, AVR2K},
|
||||
+ {"atxmega128a3", AVR136K, AVR8K, AVR2K},
|
||||
+ {"atxmega128d3", AVR136K, AVR8K, AVR2K},
|
||||
+
|
||||
+ {"at43usb320", AVR128K, 608UL, 0UL},
|
||||
+ {"at90can128", AVR128K, AVR4K, AVR4K},
|
||||
+ {"at90usb1286", AVR128K, AVR8K, AVR4K},
|
||||
+ {"at90usb1287", AVR128K, AVR8K, AVR4K},
|
||||
+ {"atmega128", AVR128K, AVR4K, AVR4K},
|
||||
+ {"atmega1280", AVR128K, AVR8K, AVR4K},
|
||||
+ {"atmega1281", AVR128K, AVR8K, AVR4K},
|
||||
+ {"atmega1284p", AVR128K, AVR16K, AVR4K},
|
||||
+ {"atmega128rfa1", AVR128K, AVR16K, AVR4K},
|
||||
+ {"atmega103", AVR128K, 4000UL, AVR4K},
|
||||
+
|
||||
+ {"atxmega64a1", AVR68K, AVR4K, AVR2K},
|
||||
+ {"atxmega64a1u", AVR68K, AVR4K, AVR2K},
|
||||
+ {"atxmega64a3", AVR68K, AVR4K, AVR2K},
|
||||
+ {"atxmega64d3", AVR68K, AVR4K, AVR2K},
|
||||
+
|
||||
+ {"at90can64", AVR64K, AVR4K, AVR2K},
|
||||
+ {"at90scr100", AVR64K, AVR4K, AVR2K},
|
||||
+ {"at90usb646", AVR64K, AVR4K, AVR2K},
|
||||
+ {"at90usb647", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega64", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega640", AVR64K, AVR8K, AVR4K},
|
||||
+ {"atmega644", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega644a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega644p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega644pa", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega645", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega645a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega645p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6450", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6450a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6450p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega649", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega649a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega649p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6490", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6490a", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega6490p", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega64c1", AVR64K, AVR4K, AVR2K},
|
||||
+ {"atmega64hve", AVR64K, AVR4K, AVR1K},
|
||||
+ {"atmega64m1", AVR64K, AVR4K, AVR2K},
|
||||
+ {"m3000", AVR64K, AVR4K, 0UL},
|
||||
+
|
||||
+ {"atmega406", AVR40K, AVR2K, AVR512},
|
||||
+
|
||||
+ {"atxmega32a4", AVR36K, AVR4K, AVR1K},
|
||||
+ {"atxmega32d4", AVR36K, AVR4K, AVR1K},
|
||||
+
|
||||
+ {"at90can32", AVR32K, AVR2K, AVR1K},
|
||||
+ {"at94k", AVR32K, AVR4K, 0UL},
|
||||
+ {"atmega32", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega323", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega324a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega324p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega324pa", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega325", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega325a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega325p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3250", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3250a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3250p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega328", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega328p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega329pa", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3290", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3290a", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega3290p", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32hvb", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32c1", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32hvb", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32m1", AVR32K, AVR2K, AVR1K},
|
||||
+ {"atmega32u2", AVR32K, AVR1K, AVR1K},
|
||||
+ {"atmega32u4", AVR32K, 2560UL, AVR1K},
|
||||
+ {"atmega32u6", AVR32K, 2560UL, AVR1K},
|
||||
+
|
||||
+ {"at43usb355", AVR24K, 1120UL, 0UL},
|
||||
+
|
||||
+ {"atxmega16a4", AVR20K, AVR2K, AVR1K},
|
||||
+ {"atxmega16d4", AVR20K, AVR2K, AVR1K},
|
||||
+
|
||||
+ {"at76c711", AVR16K, AVR2K, 0UL},
|
||||
+ {"at90pwm216", AVR16K, AVR1K, AVR512},
|
||||
+ {"at90pwm316", AVR16K, AVR1K, AVR512},
|
||||
+ {"at90usb162", AVR16K, AVR512, AVR512},
|
||||
+ {"atmega16", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega161", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega162", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega163", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega164", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega164a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega164p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega165a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega165", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega165p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega168", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega168a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega168p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169a", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169p", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega169pa", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16hva", AVR16K, 768UL, AVR256},
|
||||
+ {"atmega16hva2", AVR16K, AVR1K, AVR256},
|
||||
+ {"atmega16hvb", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16m1", AVR16K, AVR1K, AVR512},
|
||||
+ {"atmega16u2", AVR16K, AVR512, AVR512},
|
||||
+ {"atmega16u4", AVR16K, 1280UL, AVR512},
|
||||
+ {"attiny167", AVR16K, AVR512, AVR512},
|
||||
+
|
||||
+ {"at90c8534", AVR8K, 352UL, AVR512},
|
||||
+ {"at90pwm1", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm2", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm2b", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm3", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm3b", AVR8K, AVR512, AVR512},
|
||||
+ {"at90pwm81", AVR8K, AVR256, AVR512},
|
||||
+ {"at90s8515", AVR8K, AVR512, AVR512},
|
||||
+ {"at90s8535", AVR8K, AVR512, AVR512},
|
||||
+ {"at90usb82", AVR8K, AVR512, AVR512},
|
||||
+ {"ata6289", AVR8K, AVR512, 320UL},
|
||||
+ {"atmega8", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega8515", AVR8K, AVR512, AVR512},
|
||||
+ {"atmega8535", AVR8K, AVR512, AVR512},
|
||||
+ {"atmega88", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega88a", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega88p", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega88pa", AVR8K, AVR1K, AVR512},
|
||||
+ {"atmega8hva", AVR8K, 768UL, AVR256},
|
||||
+ {"atmega8u2", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny84", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny84a", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny85", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny861", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny861a", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny87", AVR8K, AVR512, AVR512},
|
||||
+ {"attiny88", AVR8K, AVR512, AVR64},
|
||||
+
|
||||
+ {"at90s4414", AVR4K, 352UL, AVR256},
|
||||
+ {"at90s4433", AVR4K, AVR128, AVR256},
|
||||
+ {"at90s4434", AVR4K, 352UL, AVR256},
|
||||
+ {"atmega48", AVR4K, AVR512, AVR256},
|
||||
+ {"atmega48a", AVR4K, AVR512, AVR256},
|
||||
+ {"atmega48p", AVR4K, AVR512, AVR256},
|
||||
+ {"attiny4313", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny43u", AVR4K, AVR256, AVR64},
|
||||
+ {"attiny44", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny44a", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny45", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny461", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny461a", AVR4K, AVR256, AVR256},
|
||||
+ {"attiny48", AVR4K, AVR256, AVR64},
|
||||
+
|
||||
+ {"at86rf401", AVR2K, 224UL, AVR128},
|
||||
+ {"at90s2313", AVR2K, AVR128, AVR128},
|
||||
+ {"at90s2323", AVR2K, AVR128, AVR128},
|
||||
+ {"at90s2333", AVR2K, 224UL, AVR128},
|
||||
+ {"at90s2343", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny20", AVR2K, AVR128, 0UL},
|
||||
+ {"attiny22", AVR2K, 224UL, AVR128},
|
||||
+ {"attiny2313", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny2313a", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny24", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny24a", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny25", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny26", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny261", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny261a", AVR2K, AVR128, AVR128},
|
||||
+ {"attiny28", AVR2K, 0UL, 0UL},
|
||||
+ {"attiny40", AVR2K, AVR256, 0UL},
|
||||
+
|
||||
+ {"at90s1200", AVR1K, 0UL, AVR64},
|
||||
+ {"attiny9", AVR1K, 32UL, 0UL},
|
||||
+ {"attiny10", AVR1K, 32UL, 0UL},
|
||||
+ {"attiny11", AVR1K, 0UL, AVR64},
|
||||
+ {"attiny12", AVR1K, 0UL, AVR64},
|
||||
+ {"attiny13", AVR1K, AVR64, AVR64},
|
||||
+ {"attiny13a", AVR1K, AVR64, AVR64},
|
||||
+ {"attiny15", AVR1K, 0UL, AVR64},
|
||||
+
|
||||
+ {"attiny4", AVR512, 32UL, 0UL},
|
||||
+ {"attiny5", AVR512, 32UL, 0UL},
|
||||
+};
|
||||
+
|
||||
+static char *avrmcu = NULL;
|
||||
+
|
||||
+
|
||||
static char *target = NULL;
|
||||
|
||||
/* Forward declarations. */
|
||||
@@ -79,7 +339,8 @@ usage (FILE *stream, int status)
|
||||
fprintf (stream, _(" Displays the sizes of sections inside binary files\n"));
|
||||
fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n"));
|
||||
fprintf (stream, _(" The options are:\n\
|
||||
- -A|-B --format={sysv|berkeley} Select output style (default is %s)\n\
|
||||
+ -A|-B|-C --format={sysv|berkeley|avr} Select output style (default is %s)\n\
|
||||
+ --mcu=<avrmcu> MCU name for AVR format only\n\
|
||||
-o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\
|
||||
-t --totals Display the total sizes (Berkeley only)\n\
|
||||
--common Display total size for *COM* syms\n\
|
||||
@@ -88,11 +349,7 @@ usage (FILE *stream, int status)
|
||||
-h --help Display this information\n\
|
||||
-v --version Display the program's version\n\
|
||||
\n"),
|
||||
-#if BSD_DEFAULT
|
||||
- "berkeley"
|
||||
-#else
|
||||
- "sysv"
|
||||
-#endif
|
||||
+FORMAT_NAME
|
||||
);
|
||||
list_supported_targets (program_name, stream);
|
||||
if (REPORT_BUGS_TO[0] && status == 0)
|
||||
@@ -103,6 +360,7 @@ usage (FILE *stream, int status)
|
||||
#define OPTION_FORMAT (200)
|
||||
#define OPTION_RADIX (OPTION_FORMAT + 1)
|
||||
#define OPTION_TARGET (OPTION_RADIX + 1)
|
||||
+#define OPTION_MCU (OPTION_TARGET + 1)
|
||||
|
||||
static struct option long_options[] =
|
||||
{
|
||||
@@ -110,6 +368,7 @@ static struct option long_options[] =
|
||||
{"format", required_argument, 0, OPTION_FORMAT},
|
||||
{"radix", required_argument, 0, OPTION_RADIX},
|
||||
{"target", required_argument, 0, OPTION_TARGET},
|
||||
+ {"mcu", required_argument, 0, 203},
|
||||
{"totals", no_argument, &show_totals, 1},
|
||||
{"version", no_argument, &show_version, 1},
|
||||
{"help", no_argument, &show_help, 1},
|
||||
@@ -141,7 +400,7 @@ main (int argc, char **argv)
|
||||
bfd_init ();
|
||||
set_default_bfd_target ();
|
||||
|
||||
- while ((c = getopt_long (argc, argv, "ABHhVvdfotx", long_options,
|
||||
+ while ((c = getopt_long (argc, argv, "ABCHhVvdfotx", long_options,
|
||||
(int *) 0)) != EOF)
|
||||
switch (c)
|
||||
{
|
||||
@@ -150,11 +409,15 @@ main (int argc, char **argv)
|
||||
{
|
||||
case 'B':
|
||||
case 'b':
|
||||
- berkeley_format = 1;
|
||||
+ format = format_bsd;
|
||||
break;
|
||||
case 'S':
|
||||
case 's':
|
||||
- berkeley_format = 0;
|
||||
+ format = format_sysv;
|
||||
+ break;
|
||||
+ case 'A':
|
||||
+ case 'a':
|
||||
+ format = format_avr;
|
||||
break;
|
||||
default:
|
||||
non_fatal (_("invalid argument to --format: %s"), optarg);
|
||||
@@ -162,6 +425,10 @@ main (int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
|
||||
+ case OPTION_MCU:
|
||||
+ avrmcu = optarg;
|
||||
+ break;
|
||||
+
|
||||
case OPTION_TARGET:
|
||||
target = optarg;
|
||||
break;
|
||||
@@ -190,11 +457,14 @@ main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
- berkeley_format = 0;
|
||||
+ format = format_sysv;
|
||||
break;
|
||||
case 'B':
|
||||
- berkeley_format = 1;
|
||||
+ format = format_bsd;
|
||||
break;
|
||||
+ case 'C':
|
||||
+ format = format_avr;
|
||||
+ break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
show_version = 1;
|
||||
@@ -240,7 +510,7 @@ main (int argc, char **argv)
|
||||
for (; optind < argc;)
|
||||
display_file (argv[optind++]);
|
||||
|
||||
- if (show_totals && berkeley_format)
|
||||
+ if (show_totals && format == format_bsd)
|
||||
{
|
||||
bfd_size_type total = total_textsize + total_datasize + total_bsssize;
|
||||
|
||||
@@ -599,13 +869,117 @@ print_sysv_format (bfd *file)
|
||||
printf ("\n\n");
|
||||
}
|
||||
|
||||
+
|
||||
+static avr_device_t *
|
||||
+avr_find_device (void)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+ if (avrmcu != NULL)
|
||||
+ {
|
||||
+ for (i = 0; i < sizeof(avr) / sizeof(avr[0]); i++)
|
||||
+ {
|
||||
+ if (strcmp(avr[i].name, avrmcu) == 0)
|
||||
+ {
|
||||
+ /* Match found */
|
||||
+ return (&avr[i]);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return (NULL);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+static void
|
||||
+print_avr_format (bfd *file)
|
||||
+{
|
||||
+ char *avr_name = "Unknown";
|
||||
+ int flashmax = 0;
|
||||
+ int rammax = 0;
|
||||
+ int eeprommax = 0;
|
||||
+ asection *section;
|
||||
+ bfd_size_type my_datasize = 0;
|
||||
+ bfd_size_type my_textsize = 0;
|
||||
+ bfd_size_type my_bsssize = 0;
|
||||
+ bfd_size_type bootloadersize = 0;
|
||||
+ bfd_size_type noinitsize = 0;
|
||||
+ bfd_size_type eepromsize = 0;
|
||||
+
|
||||
+ avr_device_t *avrdevice = avr_find_device();
|
||||
+ if (avrdevice != NULL)
|
||||
+ {
|
||||
+ avr_name = avrdevice->name;
|
||||
+ flashmax = avrdevice->flash;
|
||||
+ rammax = avrdevice->ram;
|
||||
+ eeprommax = avrdevice->eeprom;
|
||||
+ }
|
||||
+
|
||||
+ if ((section = bfd_get_section_by_name (file, ".data")) != NULL)
|
||||
+ my_datasize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".text")) != NULL)
|
||||
+ my_textsize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".bss")) != NULL)
|
||||
+ my_bsssize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".bootloader")) != NULL)
|
||||
+ bootloadersize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".noinit")) != NULL)
|
||||
+ noinitsize = bfd_section_size (file, section);
|
||||
+ if ((section = bfd_get_section_by_name (file, ".eeprom")) != NULL)
|
||||
+ eepromsize = bfd_section_size (file, section);
|
||||
+
|
||||
+ bfd_size_type text = my_textsize + my_datasize + bootloadersize;
|
||||
+ bfd_size_type data = my_datasize + my_bsssize + noinitsize;
|
||||
+ bfd_size_type eeprom = eepromsize;
|
||||
+
|
||||
+ printf ("AVR Memory Usage\n"
|
||||
+ "----------------\n"
|
||||
+ "Device: %s\n\n", avr_name);
|
||||
+
|
||||
+ /* Text size */
|
||||
+ printf ("Program:%8ld bytes", text);
|
||||
+ if (flashmax > 0)
|
||||
+ {
|
||||
+ printf (" (%2.1f%% Full)", ((float)text / flashmax) * 100);
|
||||
+ }
|
||||
+ printf ("\n(.text + .data + .bootloader)\n\n");
|
||||
+
|
||||
+ /* Data size */
|
||||
+ printf ("Data: %8ld bytes", data);
|
||||
+ if (rammax > 0)
|
||||
+ {
|
||||
+ printf (" (%2.1f%% Full)", ((float)data / rammax) * 100);
|
||||
+ }
|
||||
+ printf ("\n(.data + .bss + .noinit)\n\n");
|
||||
+
|
||||
+ /* EEPROM size */
|
||||
+ if (eeprom > 0)
|
||||
+ {
|
||||
+ printf ("EEPROM: %8ld bytes", eeprom);
|
||||
+ if (eeprommax > 0)
|
||||
+ {
|
||||
+ printf (" (%2.1f%% Full)", ((float)eeprom / eeprommax) * 100);
|
||||
+ }
|
||||
+ printf ("\n(.eeprom)\n\n");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void
|
||||
print_sizes (bfd *file)
|
||||
{
|
||||
if (show_common)
|
||||
calculate_common_size (file);
|
||||
- if (berkeley_format)
|
||||
- print_berkeley_format (file);
|
||||
- else
|
||||
- print_sysv_format (file);
|
||||
+ switch (format)
|
||||
+ {
|
||||
+ case format_sysv:
|
||||
+ print_sysv_format (file);
|
||||
+ break;
|
||||
+ case format_bsd:
|
||||
+ print_berkeley_format (file);
|
||||
+ break;
|
||||
+ case format_avr:
|
||||
+ default:
|
||||
+ print_avr_format (file);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.4.1
|
||||
|
@ -1,492 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/boehm-gc/configure gcc-3.4.6/boehm-gc/configure
|
||||
--- gcc-3.4.6.orig/boehm-gc/configure 2006-03-06 04:55:49.000000000 +0100
|
||||
+++ gcc-3.4.6/boehm-gc/configure 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/boehm-gc/ltconfig gcc-3.4.6/boehm-gc/ltconfig
|
||||
--- gcc-3.4.6.orig/boehm-gc/ltconfig 2002-11-20 16:59:07.000000000 +0100
|
||||
+++ gcc-3.4.6/boehm-gc/ltconfig 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/alpha/linux-elf.h gcc-3.4.6/gcc/config/alpha/linux-elf.h
|
||||
--- gcc-3.4.6.orig/gcc/config/alpha/linux-elf.h 2003-09-27 06:48:30.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/alpha/linux-elf.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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} \
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/arm/linux-elf.h gcc-3.4.6/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/linux-elf.h 2004-01-31 07:18:40.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/arm/linux-elf.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -80,6 +80,11 @@
|
||||
#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,*:%*} \
|
||||
@@ -87,7 +92,7 @@
|
||||
%{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
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/cris/linux.h gcc-3.4.6/gcc/config/cris/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/cris/linux.h 2003-11-29 04:08:13.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/cris/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/i386/linux64.h gcc-3.4.6/gcc/config/i386/linux64.h
|
||||
--- gcc-3.4.6.orig/gcc/config/i386/linux64.h 2003-11-29 04:08:13.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/i386/linux64.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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" }
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/i386/linux.h gcc-3.4.6/gcc/config/i386/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/i386/linux.h 2003-11-29 04:08:13.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/i386/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/ia64/linux.h gcc-3.4.6/gcc/config/ia64/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/ia64/linux.h 2004-02-07 08:56:17.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/ia64/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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}}"
|
||||
|
||||
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/m68k/linux.h gcc-3.4.6/gcc/config/m68k/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/m68k/linux.h 2003-11-29 04:08:13.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/m68k/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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 */
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/mips/linux.h gcc-3.4.6/gcc/config/mips/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/mips/linux.h 2004-06-16 03:42:25.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/mips/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -109,6 +109,11 @@
|
||||
|
||||
/* 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} \
|
||||
@@ -116,7 +121,7 @@
|
||||
%{!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
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/pa/pa-linux.h gcc-3.4.6/gcc/config/pa/pa-linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/pa/pa-linux.h 2003-11-29 04:08:13.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/pa/pa-linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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. */
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/rs6000/linux.h gcc-3.4.6/gcc/config/rs6000/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/rs6000/linux.h 2005-03-17 11:41:18.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/rs6000/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/rs6000/sysv4.h gcc-3.4.6/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-3.4.6.orig/gcc/config/rs6000/sysv4.h 2005-10-30 00:35:37.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/rs6000/sysv4.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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 }, \
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/s390/linux.h gcc-3.4.6/gcc/config/s390/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/s390/linux.h 2003-11-29 04:08:13.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/s390/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/sh/linux.h gcc-3.4.6/gcc/config/sh/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/sh/linux.h 2004-01-12 03:29:13.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/sh/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/sparc/linux64.h gcc-3.4.6/gcc/config/sparc/linux64.h
|
||||
--- gcc-3.4.6.orig/gcc/config/sparc/linux64.h 2004-06-06 05:55:17.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/sparc/linux64.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -167,12 +167,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}}} \
|
||||
"
|
||||
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/sparc/linux.h gcc-3.4.6/gcc/config/sparc/linux.h
|
||||
--- gcc-3.4.6.orig/gcc/config/sparc/linux.h 2004-06-06 05:55:17.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/sparc/linux.h 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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
|
||||
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/t-linux-uclibc gcc-3.4.6/gcc/config/t-linux-uclibc
|
||||
--- gcc-3.4.6.orig/gcc/config/t-linux-uclibc 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/t-linux-uclibc 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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))
|
||||
diff -durN gcc-3.4.6.orig/gcc/config.gcc gcc-3.4.6/gcc/config.gcc
|
||||
--- gcc-3.4.6.orig/gcc/config.gcc 2005-07-19 23:08:48.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config.gcc 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -2322,6 +2322,12 @@
|
||||
;;
|
||||
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
|
||||
+
|
||||
# Support for --with-cpu and related options (and a few unrelated options,
|
||||
# too).
|
||||
case ${with_cpu} in
|
||||
diff -durN gcc-3.4.6.orig/libtool.m4 gcc-3.4.6/libtool.m4
|
||||
--- gcc-3.4.6.orig/libtool.m4 2004-05-18 11:09:14.000000000 +0200
|
||||
+++ gcc-3.4.6/libtool.m4 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/ltconfig gcc-3.4.6/ltconfig
|
||||
--- gcc-3.4.6.orig/ltconfig 2004-03-05 22:05:41.000000000 +0100
|
||||
+++ gcc-3.4.6/ltconfig 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -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
|
||||
diff -durN gcc-3.4.6.orig/null gcc-3.4.6/null
|
||||
--- gcc-3.4.6.orig/null 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gcc-3.4.6/null 2007-08-15 22:49:47.000000000 +0200
|
||||
@@ -0,0 +1 @@
|
||||
+~/dev
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/libstdc++-v3/src/Makefile.am gcc-3.4.6/libstdc++-v3/src/Makefile.am
|
||||
--- gcc-3.4.6.orig/libstdc++-v3/src/Makefile.am 2004-04-16 21:08:35.000000000 +0200
|
||||
+++ gcc-3.4.6/libstdc++-v3/src/Makefile.am 2007-08-15 22:52:23.000000000 +0200
|
||||
@@ -210,6 +210,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
|
||||
diff -durN gcc-3.4.6.orig/libstdc++-v3/src/Makefile.in gcc-3.4.6/libstdc++-v3/src/Makefile.in
|
||||
--- gcc-3.4.6.orig/libstdc++-v3/src/Makefile.in 2004-04-16 21:08:35.000000000 +0200
|
||||
+++ gcc-3.4.6/libstdc++-v3/src/Makefile.in 2007-08-15 22:52:23.000000000 +0200
|
||||
@@ -592,7 +592,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
|
||||
|
||||
@@ -625,6 +625,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 \
|
||||
@@ -709,6 +710,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:
|
@ -1,26 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/libstdc++-v3/include/ext/rope gcc-3.4.6/libstdc++-v3/include/ext/rope
|
||||
--- gcc-3.4.6.orig/libstdc++-v3/include/ext/rope 2005-01-16 23:08:43.000000000 +0100
|
||||
+++ gcc-3.4.6/libstdc++-v3/include/ext/rope 2007-08-15 22:53:37.000000000 +0200
|
||||
@@ -58,6 +58,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
|
||||
diff -durN gcc-3.4.6.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-3.4.6/libstdc++-v3/include/ext/ropeimpl.h
|
||||
--- gcc-3.4.6.orig/libstdc++-v3/include/ext/ropeimpl.h 2004-09-08 15:36:04.000000000 +0200
|
||||
+++ gcc-3.4.6/libstdc++-v3/include/ext/ropeimpl.h 2007-08-15 22:53:37.000000000 +0200
|
||||
@@ -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;
|
@ -1,68 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/arm/arm.c gcc-3.4.6/gcc/config/arm/arm.c
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/arm.c 2005-10-01 15:31:38.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/arm.c 2007-08-15 22:54:59.000000000 +0200
|
||||
@@ -4857,6 +4857,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 */
|
||||
|
||||
@@ -5083,6 +5088,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 */
|
||||
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/arm/arm.md gcc-3.4.6/gcc/config/arm/arm.md
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/arm.md 2005-10-01 15:31:38.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/arm.md 2007-08-15 22:54:59.000000000 +0200
|
||||
@@ -8811,13 +8811,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];
|
||||
@@ -8852,6 +8855,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);
|
||||
diff -durN gcc-3.4.6.orig/gcc/genpeep.c gcc-3.4.6/gcc/genpeep.c
|
||||
--- gcc-3.4.6.orig/gcc/genpeep.c 2003-07-05 07:27:22.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/genpeep.c 2007-08-15 22:54:59.000000000 +0200
|
||||
@@ -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");
|
@ -1,120 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/arm/arm.c gcc-3.4.6/gcc/config/arm/arm.c
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/arm.c 2007-08-15 22:56:20.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/arm.c 2007-08-15 22:56:20.000000000 +0200
|
||||
@@ -8524,6 +8524,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)
|
||||
{
|
||||
@@ -8757,27 +8777,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)
|
||||
@@ -11405,22 +11445,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. */
|
@ -1,32 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/arm/arm.c gcc-3.4.6/gcc/config/arm/arm.c
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/arm.c 2007-08-15 22:57:51.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/arm.c 2007-08-15 22:57:51.000000000 +0200
|
||||
@@ -4572,6 +4572,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))
|
||||
@@ -4611,6 +4615,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));
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/libstdc++-v3/fragment.am gcc-3.4.6/libstdc++-v3/fragment.am
|
||||
--- gcc-3.4.6.orig/libstdc++-v3/fragment.am 2003-08-27 02:38:28.000000000 +0200
|
||||
+++ gcc-3.4.6/libstdc++-v3/fragment.am 2007-08-15 22:59:09.000000000 +0200
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
diff -durN gcc-3.4.6.orig/libstdc++-v3/libmath/Makefile.am gcc-3.4.6/libstdc++-v3/libmath/Makefile.am
|
||||
--- gcc-3.4.6.orig/libstdc++-v3/libmath/Makefile.am 2003-08-27 23:29:43.000000000 +0200
|
||||
+++ gcc-3.4.6/libstdc++-v3/libmath/Makefile.am 2007-08-15 22:59:09.000000000 +0200
|
||||
@@ -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
|
@ -1,27 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/flow.c gcc-3.4.6/gcc/flow.c
|
||||
--- gcc-3.4.6.orig/gcc/flow.c 2005-09-01 22:51:09.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/flow.c 2007-08-15 23:00:30.000000000 +0200
|
||||
@@ -1884,6 +1884,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);
|
||||
@@ -1892,11 +1893,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)
|
@ -1,44 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/sh/sh.c gcc-3.4.6/gcc/config/sh/sh.c
|
||||
--- gcc-3.4.6.orig/gcc/config/sh/sh.c 2004-09-03 08:51:30.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/sh/sh.c 2007-08-15 23:01:48.000000000 +0200
|
||||
@@ -9107,6 +9107,15 @@
|
||||
}
|
||||
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
|
||||
@@ -9189,8 +9198,24 @@
|
||||
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;
|
@ -1,14 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/sh/sh.h gcc-3.4.6/gcc/config/sh/sh.h
|
||||
--- gcc-3.4.6.orig/gcc/config/sh/sh.h 2006-01-12 02:20:32.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/sh/sh.h 2007-08-15 23:03:09.000000000 +0200
|
||||
@@ -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) \
|
@ -1,24 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/sh/lib1funcs.asm gcc-3.4.6/gcc/config/sh/lib1funcs.asm
|
||||
--- gcc-3.4.6.orig/gcc/config/sh/lib1funcs.asm 2003-08-12 03:25:07.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/sh/lib1funcs.asm 2007-08-15 23:04:26.000000000 +0200
|
||||
@@ -37,9 +37,19 @@
|
||||
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
|
@ -1,65 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/arm/linux-elf.h gcc-3.4.6/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/linux-elf.h 2007-08-15 22:51:01.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/linux-elf.h 2007-08-15 23:05:42.000000000 +0200
|
||||
@@ -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__"
|
||||
|
||||
@@ -94,7 +111,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
|
||||
diff -durN gcc-3.4.6.orig/gcc/config.gcc gcc-3.4.6/gcc/config.gcc
|
||||
--- gcc-3.4.6.orig/gcc/config.gcc 2007-08-15 22:51:01.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config.gcc 2007-08-15 23:05:42.000000000 +0200
|
||||
@@ -678,6 +678,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
|
@ -1,16 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/rs6000/linux-unwind.h gcc-3.4.6/gcc/config/rs6000/linux-unwind.h
|
||||
--- gcc-3.4.6.orig/gcc/config/rs6000/linux-unwind.h 2005-03-17 11:41:18.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/rs6000/linux-unwind.h 2007-08-15 23:07:00.000000000 +0200
|
||||
@@ -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
|
@ -1,7 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/mips/t-linux gcc-3.4.6/gcc/config/mips/t-linux
|
||||
--- gcc-3.4.6.orig/gcc/config/mips/t-linux 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/mips/t-linux 2007-08-15 23:08:15.000000000 +0200
|
||||
@@ -0,0 +1,3 @@
|
||||
+# Compile crtbegin/end with xgot so it works for both
|
||||
+# normal and large GOTs.
|
||||
+CRTSTUFF_T_CFLAGS = -mxgot
|
File diff suppressed because it is too large
Load Diff
@ -1,161 +0,0 @@
|
||||
diff -durN gcc-3.4.6.orig/gcc/config/arm/coff.h gcc-3.4.6/gcc/config/arm/coff.h
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/coff.h 2004-02-24 15:25:22.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/arm/coff.h 2007-08-15 23:10:54.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/arm/elf.h gcc-3.4.6/gcc/config/arm/elf.h
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/elf.h 2004-02-24 15:25:22.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/arm/elf.h 2007-08-15 23:10:54.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/arm/linux-elf.h gcc-3.4.6/gcc/config/arm/linux-elf.h
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/linux-elf.h 2007-08-15 23:07:00.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/linux-elf.h 2007-08-15 23:10:54.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/arm/t-linux gcc-3.4.6/gcc/config/arm/t-linux
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/t-linux 2007-08-15 23:10:54.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/arm/unknown-elf.h gcc-3.4.6/gcc/config/arm/unknown-elf.h
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/unknown-elf.h 2004-02-24 15:25:22.000000000 +0100
|
||||
+++ gcc-3.4.6/gcc/config/arm/unknown-elf.h 2007-08-15 23:10:54.000000000 +0200
|
||||
@@ -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 -durN gcc-3.4.6.orig/gcc/config/arm/xscale-elf.h gcc-3.4.6/gcc/config/arm/xscale-elf.h
|
||||
--- gcc-3.4.6.orig/gcc/config/arm/xscale-elf.h 2003-07-02 01:26:43.000000000 +0200
|
||||
+++ gcc-3.4.6/gcc/config/arm/xscale-elf.h 2007-08-15 23:10:54.000000000 +0200
|
||||
@@ -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
|
@ -1,553 +0,0 @@
|
||||
--- 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]+$'
|
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
|
||||
+++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
|
||||
@@ -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
|
||||
--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
|
||||
+++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
|
||||
@@ -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:
|
@ -1,11 +0,0 @@
|
||||
--- 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
|
@ -1,11 +0,0 @@
|
||||
--- 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
|
@ -1,12 +0,0 @@
|
||||
--- 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 ()
|
||||
{
|
@ -1,24 +0,0 @@
|
||||
--- 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;
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,22 +0,0 @@
|
||||
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
|
@ -1,65 +0,0 @@
|
||||
diff -dur gcc-4.0.4.orig/gcc/config/arm/linux-elf.h gcc-4.0.4/gcc/config/arm/linux-elf.h
|
||||
--- gcc-4.0.4.orig/gcc/config/arm/linux-elf.h 2007-02-02 19:24:50.000000000 +0100
|
||||
+++ gcc-4.0.4/gcc/config/arm/linux-elf.h 2007-02-02 19:26:12.000000000 +0100
|
||||
@@ -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
|
||||
@@ -95,7 +109,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
Only in gcc-4.0.4/gcc/config/arm: linux-elf.h.orig
|
||||
diff -dur gcc-4.0.4.orig/gcc/config.gcc gcc-4.0.4/gcc/config.gcc
|
||||
--- gcc-4.0.4.orig/gcc/config.gcc 2007-02-02 19:24:50.000000000 +0100
|
||||
+++ gcc-4.0.4/gcc/config.gcc 2007-02-02 19:26:12.000000000 +0100
|
||||
@@ -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
|
@ -1,15 +0,0 @@
|
||||
Enable building a pure soft-float compiler without the need for a software
|
||||
floating point library.
|
||||
|
||||
diff -dur gcc-4.0.4.orig/gcc/config.gcc gcc-4.0.4/gcc/config.gcc
|
||||
--- gcc-4.0.4.orig/gcc/config.gcc 2007-02-02 19:12:28.000000000 +0100
|
||||
+++ gcc-4.0.4/gcc/config.gcc 2007-02-02 19:12:07.000000000 +0100
|
||||
@@ -677,7 +677,7 @@
|
||||
tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
|
||||
;;
|
||||
esac
|
||||
- tmake_file="${tmake_file} arm/t-arm arm/t-linux"
|
||||
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux arm/t-arm-elf"
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
;;
|
@ -1,544 +0,0 @@
|
||||
--- gcc-4.1.2.orig/gcc/config/t-linux-uclibc 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/t-linux-uclibc 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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.2.orig/gcc/config.gcc 2006-10-16 01:12:23.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config.gcc 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -1884,7 +1884,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"
|
||||
@@ -2338,6 +2338,12 @@
|
||||
;;
|
||||
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.2.orig/boehm-gc/configure 2007-02-14 06:17:22.000000000 +0100
|
||||
+++ gcc-4.1.2/boehm-gc/configure 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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.1.2.orig/configure 2006-11-21 18:48:36.000000000 +0100
|
||||
+++ gcc-4.1.2/configure 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -1133,7 +1133,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.1.2.orig/configure.in 2006-11-21 18:48:36.000000000 +0100
|
||||
+++ gcc-4.1.2/configure.in 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -341,7 +341,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.1.2.orig/contrib/regression/objs-gcc.sh 2005-08-15 02:41:31.000000000 +0200
|
||||
+++ gcc-4.1.2/contrib/regression/objs-gcc.sh 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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.1.2.orig/gcc/config/alpha/linux-elf.h 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config/alpha/linux-elf.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -27,7 +27,11 @@
|
||||
#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.2.orig/gcc/config/arm/linux-elf.h 2005-10-10 03:04:31.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config/arm/linux-elf.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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.2.orig/gcc/config/cris/linux.h 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config/cris/linux.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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 */
|
||||
|
||||
--- gcc-4.1.2.orig/gcc/config/i386/linux.h 2005-08-10 19:53:01.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config/i386/linux.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -107,6 +107,11 @@
|
||||
#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.2.orig/gcc/config/i386/linux64.h 2005-08-10 19:53:01.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config/i386/linux64.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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}}"
|
||||
|
||||
/* Similar to standard Linux, but adding -ffast-math support. */
|
||||
--- gcc-4.1.2.orig/gcc/config/ia64/linux.h 2006-12-12 16:24:07.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/ia64/linux.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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}}"
|
||||
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
|
||||
--- gcc-4.1.2.orig/gcc/config/m68k/linux.h 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config/m68k/linux.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -123,12 +123,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.1.2.orig/gcc/config/mips/linux.h 2006-12-17 14:57:31.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/mips/linux.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -105,6 +105,11 @@
|
||||
|
||||
/* 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 @@
|
||||
%{!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.2.orig/gcc/config/pa/pa-linux.h 2007-01-12 03:23:38.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/pa/pa-linux.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -49,13 +49,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.1.2.orig/gcc/config/rs6000/linux.h 2006-02-10 21:58:33.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/rs6000/linux.h 2007-03-04 23:25:07.000000000 +0100
|
||||
@@ -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.2.orig/gcc/config/rs6000/sysv4.h 2006-02-10 21:58:33.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/rs6000/sysv4.h 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -866,6 +866,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) }"
|
||||
|
||||
@@ -1043,6 +1044,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
|
||||
@@ -1209,6 +1214,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.1.2.orig/gcc/config/s390/linux.h 2006-12-12 16:24:07.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/s390/linux.h 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -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 CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
|
||||
|
||||
--- gcc-4.1.2.orig/gcc/config/sh/linux.h 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.1.2/gcc/config/sh/linux.h 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -56,12 +56,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. */
|
||||
|
||||
--- gcc-4.1.2.orig/gcc/config/sparc/linux.h 2006-02-11 09:38:51.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/sparc/linux.h 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -125,6 +125,11 @@
|
||||
|
||||
/* 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 @@
|
||||
%{!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.2.orig/gcc/config/sparc/linux64.h 2006-02-11 09:38:51.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/sparc/linux64.h 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -162,12 +162,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.1.2.orig/libffi/configure 2007-02-14 06:17:22.000000000 +0100
|
||||
+++ gcc-4.1.2/libffi/configure 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -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.1.2.orig/libgfortran/configure 2006-12-06 11:55:37.000000000 +0100
|
||||
+++ gcc-4.1.2/libgfortran/configure 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -3699,6 +3699,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.1.2.orig/libjava/configure 2007-02-14 06:17:22.000000000 +0100
|
||||
+++ gcc-4.1.2/libjava/configure 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -5137,6 +5137,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.1.2.orig/libmudflap/configure 2005-10-05 01:54:38.000000000 +0200
|
||||
+++ gcc-4.1.2/libmudflap/configure 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -5382,6 +5382,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.1.2.orig/libobjc/configure 2007-02-14 06:17:22.000000000 +0100
|
||||
+++ gcc-4.1.2/libobjc/configure 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -3312,6 +3312,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.1.2.orig/libtool.m4 2005-07-16 04:30:53.000000000 +0200
|
||||
+++ gcc-4.1.2/libtool.m4 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -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]+$']
|
||||
--- gcc-4.1.2.orig/ltconfig 2006-07-04 22:30:34.000000000 +0200
|
||||
+++ gcc-4.1.2/ltconfig 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -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.1.2.orig/zlib/configure 2005-09-12 19:02:07.000000000 +0200
|
||||
+++ gcc-4.1.2/zlib/configure 2007-03-04 23:25:08.000000000 +0100
|
||||
@@ -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]+$'
|
@ -1,25 +0,0 @@
|
||||
--- gcc-4.1.2.orig/gcc/config.gcc 2007-03-04 23:25:37.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config.gcc 2007-03-04 23:25:45.000000000 +0100
|
||||
@@ -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="${tmake_file} 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
|
||||
--- gcc-4.1.2.orig/gcc/config/arm/linux-eabi.h 2005-11-15 15:32:13.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/arm/linux-eabi.h 2007-03-04 23:25:45.000000000 +0100
|
||||
@@ -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. */
|
File diff suppressed because it is too large
Load Diff
@ -1,48 +0,0 @@
|
||||
--- gcc-4.1.2.orig/libstdc++-v3/src/Makefile.am 2006-01-10 05:01:00.000000000 +0100
|
||||
+++ gcc-4.1.2/libstdc++-v3/src/Makefile.am 2007-03-04 23:32:40.000000000 +0100
|
||||
@@ -234,6 +234,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-4.1.2.orig/libstdc++-v3/src/Makefile.in 2006-01-10 18:14:00.000000000 +0100
|
||||
+++ gcc-4.1.2/libstdc++-v3/src/Makefile.in 2007-03-04 23:32:40.000000000 +0100
|
||||
@@ -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 \
|
||||
@@ -760,6 +761,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:
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.1.2.orig/boehm-gc/include/gc.h 2005-01-02 04:35:57.000000000 +0100
|
||||
+++ gcc-4.1.2/boehm-gc/include/gc.h 2007-03-04 23:33:07.000000000 +0100
|
||||
@@ -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
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.1.2.orig/libstdc++-v3/include/c_std/std_cstdio.h 2005-10-30 23:21:50.000000000 +0100
|
||||
+++ gcc-4.1.2/libstdc++-v3/include/c_std/std_cstdio.h 2007-03-04 23:33:27.000000000 +0100
|
||||
@@ -143,7 +143,7 @@
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,12 +0,0 @@
|
||||
--- gcc-4.1.2.orig/libstdc++-v3/configure 2007-03-04 23:32:31.000000000 +0100
|
||||
+++ gcc-4.1.2/libstdc++-v3/configure 2007-03-04 23:33:54.000000000 +0100
|
||||
@@ -7324,6 +7324,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 ()
|
||||
{
|
@ -1,24 +0,0 @@
|
||||
--- gcc-4.1.2.orig/libstdc++-v3/include/ext/rope 2005-08-17 04:28:44.000000000 +0200
|
||||
+++ gcc-4.1.2/libstdc++-v3/include/ext/rope 2007-03-04 23:34:08.000000000 +0100
|
||||
@@ -57,6 +57,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.2.orig/libstdc++-v3/include/ext/ropeimpl.h 2005-08-17 04:28:44.000000000 +0200
|
||||
+++ gcc-4.1.2/libstdc++-v3/include/ext/ropeimpl.h 2007-03-04 23:34:08.000000000 +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;
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.1.2.orig/gcc/Makefile.in 2006-11-01 15:40:44.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/Makefile.in 2007-03-04 23:34:32.000000000 +0100
|
||||
@@ -2522,7 +2522,7 @@
|
||||
# FIXME: writing proper dependencies for this is a *LOT* of work.
|
||||
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
|
||||
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
|
||||
- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
||||
+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
|
||||
-DTARGET_NAME=\"$(target_noncanonical)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
@ -1,22 +0,0 @@
|
||||
--- gcc-4.1.2.orig/gcc/configure.ac 2006-11-13 23:09:55.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/configure.ac 2007-03-04 23:34:53.000000000 +0100
|
||||
@@ -2435,7 +2435,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-4.1.2.orig/gcc/configure 2006-11-13 23:09:55.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/configure 2007-03-04 23:34:53.000000000 +0100
|
||||
@@ -14762,7 +14762,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
|
@ -1,114 +0,0 @@
|
||||
--- gcc-4.1.2.orig/gcc/config/arm/linux-elf.h 2007-03-04 23:25:37.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/arm/linux-elf.h 2007-03-04 23:35:09.000000000 +0100
|
||||
@@ -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
|
||||
@@ -65,7 +79,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.2.orig/gcc/config.gcc 2007-03-04 23:31:48.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config.gcc 2007-03-04 23:35:09.000000000 +0100
|
||||
@@ -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 | arm*-*-linux-uclibcgnueabi)
|
||||
--- gcc-4.1.2.orig/gcc/config/arm/linux-eabi.h 2007-03-04 23:31:48.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/arm/linux-eabi.h 2007-03-04 23:35:09.000000000 +0100
|
||||
@@ -20,6 +20,17 @@
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#undef TARGET_LINKER_EMULATION
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
|
||||
+#else
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
|
||||
+#endif
|
||||
+
|
||||
/* On EABI GNU/Linux, we want both the BPABI builtins and the
|
||||
GNU/Linux builtins. */
|
||||
#undef TARGET_OS_CPP_BUILTINS
|
||||
@@ -48,7 +59,7 @@
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
|
||||
|
||||
#undef SUBTARGET_EXTRA_LINK_SPEC
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
|
||||
|
||||
/* Use ld-linux.so.3 so that it will be possible to run "classic"
|
||||
GNU/Linux binaries on an EABI system. */
|
||||
--- gcc-4.1.2.orig/gcc/config/arm/bpabi.h 2005-12-13 02:35:37.000000000 +0100
|
||||
+++ gcc-4.1.2/gcc/config/arm/bpabi.h 2007-03-04 23:35:09.000000000 +0100
|
||||
@@ -33,9 +33,19 @@
|
||||
#undef FPUTYPE_DEFAULT
|
||||
#define FPUTYPE_DEFAULT FPUTYPE_VFP
|
||||
|
||||
+/*
|
||||
+ * '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
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#endif
|
||||
+
|
||||
/* EABI targets should enable interworking by default. */
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT MASK_INTERWORK
|
||||
+#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
/* The ARM BPABI functions return a boolean; they use no special
|
||||
calling convention. */
|
@ -1,58 +0,0 @@
|
||||
This patch (C) 2007 Yann E. MORIN
|
||||
Licensed under GPL v2.
|
||||
|
||||
First hunk of this patch solves compiling uClibc-0.9.28{,.1} :
|
||||
|
||||
make[1]: Entering directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
|
||||
LD libuClibc-0.9.29.so
|
||||
libc/libc_so.a(difftime.os): In function `difftime':
|
||||
difftime.c:(.text+0x8): undefined reference to `__floatsidf'
|
||||
difftime.c:(.text+0x2c): undefined reference to `__subdf3'
|
||||
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
|
||||
_fpmaxtostr.c:(.text+0xd4): undefined reference to `__nedf2'
|
||||
_fpmaxtostr.c:(.text+0xf8): undefined reference to `__eqdf2'
|
||||
_fpmaxtostr.c:(.text+0x114): undefined reference to `__divdf3'
|
||||
_fpmaxtostr.c:(.text+0x120): undefined reference to `__ltdf2'
|
||||
_fpmaxtostr.c:(.text+0x1c4): undefined reference to `__muldf3'
|
||||
_fpmaxtostr.c:(.text+0x388): undefined reference to `__gedf2'
|
||||
_fpmaxtostr.c:(.text+0x430): undefined reference to `__adddf3'
|
||||
libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
|
||||
__psfs_do_numeric.c:(.text+0x520): undefined reference to `__truncdfsf2'
|
||||
libc/libc_so.a(strtof.os): In function `strtof':
|
||||
strtof.c:(.text+0x1c): undefined reference to `__extendsfdf2'
|
||||
/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/cc_core_prefix/lib/gcc/arm-linux-uclibc/4.1.1/libgcc.a(_fixunsdfsi.o):
|
||||
In function `__fixunsdfsi':
|
||||
libgcc2.c:(.text+0x34): undefined reference to `__fixdfsi'
|
||||
make[2]: *** [lib/libc.so] Error 1
|
||||
make[1]: *** [lib/libc.so.0] Error 2
|
||||
make[1]: Leaving directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
|
||||
make: *** [/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc/lib/libc.a]
|
||||
Error 2
|
||||
|
||||
The second hunk fixes building final gcc because soft-float implies using -lfloat (which we don't have).
|
||||
|
||||
|
||||
diff -dur gcc-4.1.1.no-softfloat-fix/gcc/config.gcc gcc-4.1.1/gcc/config.gcc
|
||||
--- gcc-4.1.1.no-softfloat-fix/gcc/config.gcc 2007-02-01 21:57:17.000000000 +0100
|
||||
+++ gcc-4.1.1/gcc/config.gcc 2007-02-01 22:11:06.000000000 +0100
|
||||
@@ -690,7 +690,7 @@
|
||||
default_use_cxa_atexit=yes
|
||||
;;
|
||||
*)
|
||||
- tmake_file="$tmake_file arm/t-linux"
|
||||
+ tmake_file="$tmake_file arm/t-linux arm/t-arm-elf"
|
||||
;;
|
||||
esac
|
||||
tm_file="$tm_file arm/aout.h arm/arm.h"
|
||||
diff -dur gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h gcc-4.1.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h 2007-02-01 21:57:17.000000000 +0100
|
||||
+++ gcc-4.1.1/gcc/config/arm/linux-elf.h 2007-02-01 23:00:42.000000000 +0100
|
||||
@@ -63,7 +63,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#ifdef USE_UCLIBC
|
||||
#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
|
@ -1,200 +0,0 @@
|
||||
--- gcc/libgomp/configure
|
||||
+++ gcc/libgomp/configure
|
||||
@@ -3771,7 +3771,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/gcc/config/cris/linux.h
|
||||
+++ gcc/gcc/config/cris/linux.h
|
||||
@@ -74,7 +74,11 @@
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#if UCLIBC_DEFAULT
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+#else
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#endif
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
--- gcc/libstdc++-v3/configure
|
||||
+++ gcc/libstdc++-v3/configure
|
||||
@@ -4276,7 +4276,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/zlib/configure
|
||||
+++ gcc/zlib/configure
|
||||
@@ -3422,7 +3422,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libobjc/configure
|
||||
+++ gcc/libobjc/configure
|
||||
@@ -3309,7 +3309,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libgfortran/configure
|
||||
+++ gcc/libgfortran/configure
|
||||
@@ -3695,7 +3695,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libmudflap/configure
|
||||
+++ gcc/libmudflap/configure
|
||||
@@ -5378,7 +5378,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/boehm-gc/configure
|
||||
+++ gcc/boehm-gc/configure
|
||||
@@ -4316,7 +4316,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libffi/configure
|
||||
+++ gcc/libffi/configure
|
||||
@@ -3453,7 +3453,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libssp/configure
|
||||
+++ gcc/libssp/configure
|
||||
@@ -4409,7 +4409,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/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/libjava/classpath/ltconfig
|
||||
+++ gcc/libjava/classpath/ltconfig
|
||||
@@ -603,7 +603,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
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc/libjava/classpath/configure
|
||||
+++ gcc/libjava/classpath/configure
|
||||
@@ -4665,7 +4665,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libjava/configure
|
||||
+++ gcc/libjava/configure
|
||||
@@ -5212,7 +5212,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libtool.m4
|
||||
+++ gcc/libtool.m4
|
||||
@@ -739,7 +739,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/ltconfig
|
||||
+++ gcc/ltconfig
|
||||
@@ -603,7 +603,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
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
@ -1,11 +0,0 @@
|
||||
--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
|
||||
+++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
|
||||
@@ -1905,7 +1905,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"
|
File diff suppressed because it is too large
Load Diff
@ -1,213 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
@ -1,48 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
@ -1,347 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -46,16 +47,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +61,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +75,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +102,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
@ -1,50 +0,0 @@
|
||||
# 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:
|
@ -1,11 +0,0 @@
|
||||
--- 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
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.2.0.orig/libstdc++-v3/include/c_std/std_cstdio.h 2006-12-07 10:33:51.000000000 +0100
|
||||
+++ gcc-4.2.0/libstdc++-v3/include/c_std/std_cstdio.h 2007-05-20 01:05:38.000000000 +0200
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,12 +0,0 @@
|
||||
--- 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 ()
|
||||
{
|
@ -1,24 +0,0 @@
|
||||
--- 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
|
||||
+
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
using std::size_t;
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,36 +0,0 @@
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
|
||||
@@ -32,7 +32,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
@@ -115,3 +116,4 @@
|
||||
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
|
||||
}
|
||||
}
|
||||
+}
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
|
||||
@@ -33,7 +33,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
@@ -74,3 +75,4 @@
|
||||
delete _M_data;
|
||||
_S_destroy_c_locale(_M_c_locale_timepunct);
|
||||
}
|
||||
+}
|
@ -1,13 +0,0 @@
|
||||
Index: gcc-4.2/gcc/Makefile.in
|
||||
===================================================================
|
||||
--- gcc-4.2/gcc/Makefile.in (revision 121758)
|
||||
+++ gcc-4.2/gcc/Makefile.in (working copy)
|
||||
@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
|
||||
# FIXME: writing proper dependencies for this is a *LOT* of work.
|
||||
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
|
||||
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
|
||||
- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
||||
+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
|
||||
-DTARGET_NAME=\"$(target_noncanonical)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
@ -1,67 +0,0 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
--- gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.2.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_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
|
||||
@@ -696,6 +696,11 @@
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ case ${target} in
|
||||
arm*-*-linux-*eabi)
|
||||
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"
|
@ -1,58 +0,0 @@
|
||||
This patch (C) 2007 Yann E. MORIN
|
||||
Licensed under GPL v2.
|
||||
|
||||
First hunk of this patch solves compiling uClibc:
|
||||
|
||||
make[1]: Entering directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
|
||||
LD libuClibc-0.9.29.so
|
||||
libc/libc_so.a(difftime.os): In function `difftime':
|
||||
difftime.c:(.text+0x8): undefined reference to `__floatsidf'
|
||||
difftime.c:(.text+0x2c): undefined reference to `__subdf3'
|
||||
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
|
||||
_fpmaxtostr.c:(.text+0xd4): undefined reference to `__nedf2'
|
||||
_fpmaxtostr.c:(.text+0xf8): undefined reference to `__eqdf2'
|
||||
_fpmaxtostr.c:(.text+0x114): undefined reference to `__divdf3'
|
||||
_fpmaxtostr.c:(.text+0x120): undefined reference to `__ltdf2'
|
||||
_fpmaxtostr.c:(.text+0x1c4): undefined reference to `__muldf3'
|
||||
_fpmaxtostr.c:(.text+0x388): undefined reference to `__gedf2'
|
||||
_fpmaxtostr.c:(.text+0x430): undefined reference to `__adddf3'
|
||||
libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
|
||||
__psfs_do_numeric.c:(.text+0x520): undefined reference to `__truncdfsf2'
|
||||
libc/libc_so.a(strtof.os): In function `strtof':
|
||||
strtof.c:(.text+0x1c): undefined reference to `__extendsfdf2'
|
||||
/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/cc_core_prefix/lib/gcc/arm-linux-uclibc/4.1.1/libgcc.a(_fixunsdfsi.o):
|
||||
In function `__fixunsdfsi':
|
||||
libgcc2.c:(.text+0x34): undefined reference to `__fixdfsi'
|
||||
make[2]: *** [lib/libc.so] Error 1
|
||||
make[1]: *** [lib/libc.so.0] Error 2
|
||||
make[1]: Leaving directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
|
||||
make: *** [/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc/lib/libc.a]
|
||||
Error 2
|
||||
|
||||
The second hunk fixes building final gcc because soft-float implies using -lfloat (which we don't have).
|
||||
|
||||
|
||||
diff -dur gcc-4.2.0.orig/gcc/config.gcc gcc-4.2.0/gcc/config.gcc
|
||||
--- gcc-4.2.0.orig/gcc/config.gcc 2007-07-15 11:24:18.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config.gcc 2007-07-15 11:26:02.000000000 +0200
|
||||
@@ -721,7 +721,7 @@
|
||||
default_use_cxa_atexit=yes
|
||||
;;
|
||||
*)
|
||||
- tmake_file="$tmake_file arm/t-linux"
|
||||
+ tmake_file="$tmake_file arm/t-linux arm/t-arm-elf"
|
||||
;;
|
||||
esac
|
||||
tm_file="$tm_file arm/aout.h arm/arm.h"
|
||||
diff -dur gcc-4.2.0.orig/gcc/config/arm/linux-elf.h gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
--- gcc-4.2.0.orig/gcc/config/arm/linux-elf.h 2007-07-15 11:24:18.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config/arm/linux-elf.h 2007-07-15 11:26:02.000000000 +0200
|
||||
@@ -63,7 +63,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
@ -1,153 +0,0 @@
|
||||
Hi,
|
||||
|
||||
The attached patch makes sure that we create smaller object code for
|
||||
simple switch statements. We just make sure to flatten the switch
|
||||
statement into an if-else chain, basically.
|
||||
|
||||
This fixes a size-regression as compared to gcc-3.4, as can be seen
|
||||
below.
|
||||
|
||||
2007-04-15 Bernhard Fischer <..>
|
||||
|
||||
* stmt.c (expand_case): Do not create a complex binary tree when
|
||||
optimizing for size but rather use the simple ordered list.
|
||||
(emit_case_nodes): do not emit jumps to the default_label when
|
||||
optimizing for size.
|
||||
|
||||
Not regtested so far.
|
||||
Comments?
|
||||
|
||||
Attached is the test switch.c mentioned below.
|
||||
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
|
||||
|
||||
$ size switch-*.o
|
||||
text data bss dec hex filename
|
||||
169 0 0 169 a9 switch-2.95.o
|
||||
115 0 0 115 73 switch-3.3.o
|
||||
103 0 0 103 67 switch-3.4.o
|
||||
124 0 0 124 7c switch-4.0.o
|
||||
124 0 0 124 7c switch-4.1.o
|
||||
124 0 0 124 7c switch-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-4.3-HEAD.o
|
||||
124 0 0 124 7c switch-4.3.orig-HEAD.o
|
||||
166 0 0 166 a6 switch-CHAIN-2.95.o
|
||||
111 0 0 111 6f switch-CHAIN-3.3.o
|
||||
95 0 0 95 5f switch-CHAIN-3.4.o
|
||||
95 0 0 95 5f switch-CHAIN-4.0.o
|
||||
95 0 0 95 5f switch-CHAIN-4.1.o
|
||||
95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
|
||||
|
||||
|
||||
Content-Type: text/x-diff; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
|
||||
|
||||
Index: gcc-4.2.0/gcc/stmt.c
|
||||
===================================================================
|
||||
--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
|
||||
+++ gcc-4.2.0/gcc/stmt.c (working copy)
|
||||
@@ -2517,7 +2517,11 @@ expand_case (tree exp)
|
||||
use_cost_table
|
||||
= (TREE_CODE (orig_type) != ENUMERAL_TYPE
|
||||
&& estimate_case_costs (case_list));
|
||||
- balance_case_nodes (&case_list, NULL);
|
||||
+ /* When optimizing for size, we want a straight list to avoid
|
||||
+ jumps as much as possible. This basically creates an if-else
|
||||
+ chain. */
|
||||
+ if (!optimize_size)
|
||||
+ balance_case_nodes (&case_list, NULL);
|
||||
emit_case_nodes (index, case_list, default_label, index_type);
|
||||
emit_jump (default_label);
|
||||
}
|
||||
@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
|
||||
{
|
||||
if (!node_has_low_bound (node, index_type))
|
||||
{
|
||||
+ if (!optimize_size) /* don't jl to the .default_label. */
|
||||
emit_cmp_and_jump_insns (index,
|
||||
convert_modes
|
||||
(mode, imode,
|
||||
|
||||
|
||||
Content-Type: text/x-csrc; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="switch.c"
|
||||
|
||||
int
|
||||
commutative_tree_code (int code)
|
||||
{
|
||||
#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
|
||||
#ifndef CHAIN
|
||||
switch (code)
|
||||
{
|
||||
# if 1
|
||||
CASE(1,3)
|
||||
CASE(3,2)
|
||||
CASE(5,8)
|
||||
CASE(7,1)
|
||||
CASE(33,4)
|
||||
CASE(44,9)
|
||||
CASE(55,10)
|
||||
CASE(66,-1)
|
||||
CASE(77,99)
|
||||
CASE(666,0)
|
||||
# else
|
||||
case 1:
|
||||
return 3;
|
||||
case 3:
|
||||
return 2;
|
||||
case 5:
|
||||
return 8;
|
||||
case 7:
|
||||
return 1;
|
||||
case 33:
|
||||
return 4;
|
||||
case 44:
|
||||
return 9;
|
||||
case 55:
|
||||
return 10;
|
||||
case 66:
|
||||
return -1;
|
||||
case 77:
|
||||
return 99;
|
||||
case 666:
|
||||
return 0;
|
||||
# endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 4711;
|
||||
|
||||
#else
|
||||
if (code == 1)
|
||||
return 3;
|
||||
else if (code == 3)
|
||||
return 2;
|
||||
else if (code == 5)
|
||||
return 8;
|
||||
else if (code == 7)
|
||||
return 1;
|
||||
else if (code == 33)
|
||||
return 4;
|
||||
else if (code == 44)
|
||||
return 9;
|
||||
else if (code == 55)
|
||||
return 10;
|
||||
else if (code == 66)
|
||||
return -1;
|
||||
else if (code == 77)
|
||||
return 99;
|
||||
else if (code == 666)
|
||||
return 0;
|
||||
else
|
||||
return 4711;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
--AhhlLboLdkugWU4S--
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff -uNpr gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c
|
||||
--- gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c 2007-03-05 11:54:00.000000000 -0500
|
||||
+++ gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c 2008-01-31 17:51:24.000000000 -0500
|
||||
@@ -70,6 +70,8 @@ Software Foundation, 51 Franklin Street,
|
||||
but GCC currently generates poor code when a union is used to turn
|
||||
a long double into a pair of doubles. */
|
||||
|
||||
+#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
+
|
||||
long double __gcc_qadd (double, double, double, double);
|
||||
long double __gcc_qsub (double, double, double, double);
|
||||
long double __gcc_qmul (double, double, double, double);
|
||||
@@ -219,8 +221,6 @@ __gcc_qdiv (double a, double b, double c
|
||||
return z.ldval;
|
||||
}
|
||||
|
||||
-#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
-
|
||||
long double __gcc_qneg (double, double);
|
||||
int __gcc_qeq (double, double, double, double);
|
||||
int __gcc_qne (double, double, double, double);
|
@ -1,17 +0,0 @@
|
||||
--- gcc-4.2.1-stock/gcc/config/alpha/linux-unwind.h 2005-06-24 20:22:41.000000000 -0500
|
||||
+++ gcc-4.2.1/gcc/config/alpha/linux-unwind.h 2007-09-01 20:21:34.000000000 -0500
|
||||
@@ -29,6 +29,9 @@ Boston, MA 02110-1301, USA. */
|
||||
/* Do code reading to identify a signal frame, and set the frame
|
||||
state data appropriately. See unwind-dw2.c for the structs. */
|
||||
|
||||
+/* Don't use this if inhibit_libc is set
|
||||
+ The build for this target will fail trying to include missing headers */
|
||||
+#ifndef inhibit_libc
|
||||
#include <signal.h>
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
@@ -80,3 +83,4 @@ alpha_fallback_frame_state (struct _Unwi
|
||||
fs->retaddr_column = 64;
|
||||
return _URC_NO_REASON;
|
||||
}
|
||||
+#endif /* inhibit_libc */
|
@ -1,26 +0,0 @@
|
||||
On 20081011, Khem RAJ writes:
|
||||
You have to bar gcc trying to build unwinding at stage 1. Try the
|
||||
attached patch and see if it helps.
|
||||
|
||||
gcc/config/sh/linux-unwind.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
Index: gcc-4_2-branch/gcc/config/sh/linux-unwind.h
|
||||
===================================================================
|
||||
--- gcc-4_2-branch.orig/gcc/config/sh/linux-unwind.h 2008-07-01 17:24:40.000000000 -0700
|
||||
+++ gcc-4_2-branch/gcc/config/sh/linux-unwind.h 2008-07-01 17:25:47.000000000 -0700
|
||||
@@ -26,6 +26,8 @@ along with this program; see the file CO
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
+#ifndef inhibit_libc
|
||||
+
|
||||
/* Do code reading to identify a signal frame, and set the frame
|
||||
state data appropriately. See unwind-dw2.c for the structs. */
|
||||
|
||||
@@ -251,3 +253,4 @@ sh_fallback_frame_state (struct _Unwind_
|
||||
return _URC_NO_REASON;
|
||||
}
|
||||
#endif /* defined (__SH5__) */
|
||||
+#endif /* ifndef inhibit_libc */
|
||||
|
@ -1,32 +0,0 @@
|
||||
Vampirised from:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
|
||||
diff -durN gcc-4.2.2.orig/gcc/mklibgcc.in gcc-4.2.2/gcc/mklibgcc.in
|
||||
--- gcc-4.2.2.orig/gcc/mklibgcc.in 2006-07-04 22:20:01.000000000 +0200
|
||||
+++ gcc-4.2.2/gcc/mklibgcc.in 2011-08-31 16:24:03.674690016 +0200
|
||||
@@ -223,8 +223,8 @@
|
||||
if [ "$LIBUNWIND" ]; then
|
||||
libunwind_a=$dir/libunwind.a
|
||||
fi
|
||||
+ libgcc_eh_a=$dir/libgcc_eh.a
|
||||
if [ "$SHLIB_LINK" ]; then
|
||||
- libgcc_eh_a=$dir/libgcc_eh.a
|
||||
libgcc_s_so=$dir/libgcc_s${SHLIB_EXT}
|
||||
if [ "$LIBUNWIND" ]; then
|
||||
libunwind_so=$dir/libunwind${SHLIB_EXT}
|
||||
@@ -889,11 +889,11 @@
|
||||
echo ' chmod 644' ${ldir}/libgcov.a
|
||||
echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcov.a
|
||||
|
||||
- if [ "$SHLIB_LINK" ]; then
|
||||
- echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
|
||||
- echo ' chmod 644' ${ldir}/libgcc_eh.a
|
||||
- echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
|
||||
+ echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
|
||||
+ echo ' chmod 644' ${ldir}/libgcc_eh.a
|
||||
+ echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
|
||||
|
||||
+ if [ "$SHLIB_LINK" ]; then
|
||||
shlib_slibdir_qual=
|
||||
os_multilib_dir=`$GCC_FOR_TARGET $flags --print-multi-os-directory`
|
||||
if [ "$os_multilib_dir" != . ]; then
|
@ -1,216 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/boehm-gc/configure gcc-4.2.1/boehm-gc/configure
|
||||
--- gcc-4.2.1.orig/boehm-gc/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/boehm-gc/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -4323,7 +4323,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/contrib/regression/objs-gcc.sh gcc-4.2.1/contrib/regression/objs-gcc.sh
|
||||
--- gcc-4.2.1.orig/contrib/regression/objs-gcc.sh 2005-08-15 02:41:31.000000000 +0200
|
||||
+++ gcc-4.2.1/contrib/regression/objs-gcc.sh 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -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
|
||||
diff -durN gcc-4.2.1.orig/gcc/config/cris/linux.h gcc-4.2.1/gcc/config/cris/linux.h
|
||||
--- gcc-4.2.1.orig/gcc/config/cris/linux.h 2006-02-18 12:12:51.000000000 +0100
|
||||
+++ gcc-4.2.1/gcc/config/cris/linux.h 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -74,7 +74,11 @@
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#if UCLIBC_DEFAULT
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+#else
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#endif
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libffi/configure gcc-4.2.1/libffi/configure
|
||||
--- gcc-4.2.1.orig/libffi/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libffi/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3460,7 +3460,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libgfortran/configure gcc-4.2.1/libgfortran/configure
|
||||
--- gcc-4.2.1.orig/libgfortran/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libgfortran/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3721,7 +3721,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libgomp/configure gcc-4.2.1/libgomp/configure
|
||||
--- gcc-4.2.1.orig/libgomp/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libgomp/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3893,7 +3893,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libjava/classpath/configure gcc-4.2.1/libjava/classpath/configure
|
||||
--- gcc-4.2.1.orig/libjava/classpath/configure 2007-01-17 19:10:26.000000000 +0100
|
||||
+++ gcc-4.2.1/libjava/classpath/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -5307,7 +5307,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libjava/classpath/ltconfig gcc-4.2.1/libjava/classpath/ltconfig
|
||||
--- gcc-4.2.1.orig/libjava/classpath/ltconfig 2006-08-07 22:37:50.000000000 +0200
|
||||
+++ gcc-4.2.1/libjava/classpath/ltconfig 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -603,7 +603,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
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
diff -durN gcc-4.2.1.orig/libjava/configure gcc-4.2.1/libjava/configure
|
||||
--- gcc-4.2.1.orig/libjava/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libjava/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -5424,7 +5424,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libmudflap/configure gcc-4.2.1/libmudflap/configure
|
||||
--- gcc-4.2.1.orig/libmudflap/configure 2006-12-04 12:13:07.000000000 +0100
|
||||
+++ gcc-4.2.1/libmudflap/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -5394,7 +5394,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libobjc/configure gcc-4.2.1/libobjc/configure
|
||||
--- gcc-4.2.1.orig/libobjc/configure 2006-10-15 09:42:57.000000000 +0200
|
||||
+++ gcc-4.2.1/libobjc/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3314,7 +3314,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libssp/configure gcc-4.2.1/libssp/configure
|
||||
--- gcc-4.2.1.orig/libssp/configure 2006-10-15 09:42:57.000000000 +0200
|
||||
+++ gcc-4.2.1/libssp/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -4480,7 +4480,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/configure 2007-06-29 01:02:05.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -4283,7 +4283,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libtool.m4 gcc-4.2.1/libtool.m4
|
||||
--- gcc-4.2.1.orig/libtool.m4 2005-07-16 04:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libtool.m4 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -739,7 +739,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/ltconfig gcc-4.2.1/ltconfig
|
||||
--- gcc-4.2.1.orig/ltconfig 2007-02-14 18:08:35.000000000 +0100
|
||||
+++ gcc-4.2.1/ltconfig 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -603,7 +603,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
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
diff -durN gcc-4.2.1.orig/zlib/configure gcc-4.2.1/zlib/configure
|
||||
--- gcc-4.2.1.orig/zlib/configure 2007-01-17 19:10:26.000000000 +0100
|
||||
+++ gcc-4.2.1/zlib/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3429,7 +3429,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.orig/gcc/config.gcc 2007-02-03 06:25:20.000000000 +0100
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-08-03 20:29:52.000000000 +0200
|
||||
@@ -1964,7 +1964,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"
|
File diff suppressed because it is too large
Load Diff
@ -1,223 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
@ -1,50 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
@ -1,354 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -46,16 +46,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +60,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +74,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +101,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.h 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
@ -1,50 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/src/Makefile.am gcc-4.2.1/libstdc++-v3/src/Makefile.am
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/src/Makefile.am 2006-07-28 06:57:34.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/src/Makefile.am 2007-08-03 20:32:27.000000000 +0200
|
||||
@@ -257,6 +257,12 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -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
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/src/Makefile.in gcc-4.2.1/libstdc++-v3/src/Makefile.in
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/src/Makefile.in 2006-10-16 21:08:22.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/src/Makefile.in 2007-08-03 20:32:27.000000000 +0200
|
||||
@@ -657,7 +657,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
|
||||
|
||||
@@ -690,6 +690,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 \
|
||||
@@ -799,6 +800,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:
|
@ -1,12 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/boehm-gc/include/gc.h gcc-4.2.1/boehm-gc/include/gc.h
|
||||
--- gcc-4.2.1.orig/boehm-gc/include/gc.h 2006-09-18 20:45:08.000000000 +0200
|
||||
+++ gcc-4.2.1/boehm-gc/include/gc.h 2007-08-03 20:33:00.000000000 +0200
|
||||
@@ -502,7 +502,7 @@
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
# 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
|
@ -1,12 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/include/c_std/std_cstdio.h gcc-4.2.1/libstdc++-v3/include/c_std/std_cstdio.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/include/c_std/std_cstdio.h 2006-12-07 10:33:51.000000000 +0100
|
||||
+++ gcc-4.2.1/libstdc++-v3/include/c_std/std_cstdio.h 2007-08-03 20:33:24.000000000 +0200
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,13 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/configure 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/configure 2007-08-03 20:33:56.000000000 +0200
|
||||
@@ -7514,6 +7514,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 ()
|
||||
{
|
@ -1,26 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/include/ext/rope gcc-4.2.1/libstdc++-v3/include/ext/rope
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/include/ext/rope 2006-10-17 13:56:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/include/ext/rope 2007-08-03 20:34:23.000000000 +0200
|
||||
@@ -58,6 +58,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
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.2.1/libstdc++-v3/include/ext/ropeimpl.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/include/ext/ropeimpl.h 2006-10-17 13:56:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/include/ext/ropeimpl.h 2007-08-03 20:34:23.000000000 +0200
|
||||
@@ -54,6 +54,9 @@
|
||||
#include <ext/memory> // For uninitialized_copy_n
|
||||
#include <ext/numeric> // For power
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
using std::size_t;
|
@ -1,48 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libmudflap/mf-hooks2.c gcc-4.2.1/libmudflap/mf-hooks2.c
|
||||
--- gcc-4.2.1.orig/libmudflap/mf-hooks2.c 2005-09-23 23:58:39.000000000 +0200
|
||||
+++ gcc-4.2.1/libmudflap/mf-hooks2.c 2007-08-03 20:35:09.000000000 +0200
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,36 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:31:54.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:35:40.000000000 +0200
|
||||
@@ -32,7 +32,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
@@ -115,3 +116,4 @@
|
||||
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
|
||||
}
|
||||
}
|
||||
+}
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2007-08-03 20:31:54.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.h 2007-08-03 20:35:40.000000000 +0200
|
||||
@@ -33,7 +33,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
@@ -74,3 +75,4 @@
|
||||
delete _M_data;
|
||||
_S_destroy_c_locale(_M_c_locale_timepunct);
|
||||
}
|
||||
+}
|
@ -1,12 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/gcc/Makefile.in gcc-4.2.1/gcc/Makefile.in
|
||||
--- gcc-4.2.1.orig/gcc/Makefile.in 2007-05-31 17:37:38.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/Makefile.in 2007-08-03 20:36:14.000000000 +0200
|
||||
@@ -2660,7 +2660,7 @@
|
||||
# FIXME: writing proper dependencies for this is a *LOT* of work.
|
||||
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
|
||||
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
|
||||
- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
||||
+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
|
||||
-DTARGET_NAME=\"$(target_noncanonical)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
@ -1,64 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/gcc/config/arm/linux-elf.h gcc-4.2.1/gcc/config/arm/linux-elf.h
|
||||
--- gcc-4.2.1.orig/gcc/config/arm/linux-elf.h 2006-02-17 00:29:10.000000000 +0100
|
||||
+++ gcc-4.2.1/gcc/config/arm/linux-elf.h 2007-08-03 20:36:43.000000000 +0200
|
||||
@@ -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_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
diff -durN gcc-4.2.1.orig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.orig/gcc/config.gcc 2007-08-03 20:29:52.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-08-03 20:36:43.000000000 +0200
|
||||
@@ -705,6 +705,11 @@
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ case ${target} in
|
||||
arm*-*-linux-*eabi)
|
||||
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"
|
@ -1,58 +0,0 @@
|
||||
This patch (C) 2007 Yann E. MORIN
|
||||
Licensed under GPL v2.
|
||||
|
||||
First hunk of this patch solves compiling uClibc:
|
||||
|
||||
make[1]: Entering directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
|
||||
LD libuClibc-0.9.29.so
|
||||
libc/libc_so.a(difftime.os): In function `difftime':
|
||||
difftime.c:(.text+0x8): undefined reference to `__floatsidf'
|
||||
difftime.c:(.text+0x2c): undefined reference to `__subdf3'
|
||||
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
|
||||
_fpmaxtostr.c:(.text+0xd4): undefined reference to `__nedf2'
|
||||
_fpmaxtostr.c:(.text+0xf8): undefined reference to `__eqdf2'
|
||||
_fpmaxtostr.c:(.text+0x114): undefined reference to `__divdf3'
|
||||
_fpmaxtostr.c:(.text+0x120): undefined reference to `__ltdf2'
|
||||
_fpmaxtostr.c:(.text+0x1c4): undefined reference to `__muldf3'
|
||||
_fpmaxtostr.c:(.text+0x388): undefined reference to `__gedf2'
|
||||
_fpmaxtostr.c:(.text+0x430): undefined reference to `__adddf3'
|
||||
libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
|
||||
__psfs_do_numeric.c:(.text+0x520): undefined reference to `__truncdfsf2'
|
||||
libc/libc_so.a(strtof.os): In function `strtof':
|
||||
strtof.c:(.text+0x1c): undefined reference to `__extendsfdf2'
|
||||
/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/cc_core_prefix/lib/gcc/arm-linux-uclibc/4.1.1/libgcc.a(_fixunsdfsi.o):
|
||||
In function `__fixunsdfsi':
|
||||
libgcc2.c:(.text+0x34): undefined reference to `__fixdfsi'
|
||||
make[2]: *** [lib/libc.so] Error 1
|
||||
make[1]: *** [lib/libc.so.0] Error 2
|
||||
make[1]: Leaving directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
|
||||
make: *** [/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc/lib/libc.a]
|
||||
Error 2
|
||||
|
||||
The second hunk fixes building final gcc because soft-float implies using -lfloat (which we don't have).
|
||||
|
||||
|
||||
diff -dur gcc-4.2.0.orig/gcc/config.gcc gcc-4.2.0/gcc/config.gcc
|
||||
--- gcc-4.2.0.orig/gcc/config.gcc 2007-07-15 11:24:18.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config.gcc 2007-07-15 11:26:02.000000000 +0200
|
||||
@@ -721,7 +721,7 @@
|
||||
default_use_cxa_atexit=yes
|
||||
;;
|
||||
*)
|
||||
- tmake_file="$tmake_file arm/t-linux"
|
||||
+ tmake_file="$tmake_file arm/t-linux arm/t-arm-elf"
|
||||
;;
|
||||
esac
|
||||
tm_file="$tm_file arm/aout.h arm/arm.h"
|
||||
diff -dur gcc-4.2.0.orig/gcc/config/arm/linux-elf.h gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
--- gcc-4.2.0.orig/gcc/config/arm/linux-elf.h 2007-07-15 11:24:18.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config/arm/linux-elf.h 2007-07-15 11:26:02.000000000 +0200
|
||||
@@ -63,7 +63,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/gcc/stmt.c gcc-4.2.1/gcc/stmt.c
|
||||
--- gcc-4.2.1.orig/gcc/stmt.c 2007-07-19 05:25:32.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/stmt.c 2007-08-03 20:37:19.000000000 +0200
|
||||
@@ -2512,7 +2512,11 @@
|
||||
use_cost_table
|
||||
= (TREE_CODE (orig_type) != ENUMERAL_TYPE
|
||||
&& estimate_case_costs (case_list));
|
||||
- balance_case_nodes (&case_list, NULL);
|
||||
+ /* When optimizing for size, we want a straight list to avoid
|
||||
+ jumps as much as possible. This basically creates an if-else
|
||||
+ chain. */
|
||||
+ if (!optimize_size)
|
||||
+ balance_case_nodes (&case_list, NULL);
|
||||
emit_case_nodes (index, case_list, default_label, index_type);
|
||||
emit_jump (default_label);
|
||||
}
|
||||
@@ -3070,6 +3074,7 @@
|
||||
{
|
||||
if (!node_has_low_bound (node, index_type))
|
||||
{
|
||||
+ if (!optimize_size) /* don't jl to the .default_label. */
|
||||
emit_cmp_and_jump_insns (index,
|
||||
convert_modes
|
||||
(mode, imode,
|
@ -1,21 +0,0 @@
|
||||
diff -uNpr gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c
|
||||
--- gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c 2007-03-05 11:54:00.000000000 -0500
|
||||
+++ gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c 2008-01-31 17:51:24.000000000 -0500
|
||||
@@ -70,6 +70,8 @@ Software Foundation, 51 Franklin Street,
|
||||
but GCC currently generates poor code when a union is used to turn
|
||||
a long double into a pair of doubles. */
|
||||
|
||||
+#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
+
|
||||
long double __gcc_qadd (double, double, double, double);
|
||||
long double __gcc_qsub (double, double, double, double);
|
||||
long double __gcc_qmul (double, double, double, double);
|
||||
@@ -219,8 +221,6 @@ __gcc_qdiv (double a, double b, double c
|
||||
return z.ldval;
|
||||
}
|
||||
|
||||
-#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
-
|
||||
long double __gcc_qneg (double, double);
|
||||
int __gcc_qeq (double, double, double, double);
|
||||
int __gcc_qne (double, double, double, double);
|
@ -1,17 +0,0 @@
|
||||
--- gcc-4.2.1-stock/gcc/config/alpha/linux-unwind.h 2005-06-24 20:22:41.000000000 -0500
|
||||
+++ gcc-4.2.1/gcc/config/alpha/linux-unwind.h 2007-09-01 20:21:34.000000000 -0500
|
||||
@@ -29,6 +29,9 @@ Boston, MA 02110-1301, USA. */
|
||||
/* Do code reading to identify a signal frame, and set the frame
|
||||
state data appropriately. See unwind-dw2.c for the structs. */
|
||||
|
||||
+/* Don't use this if inhibit_libc is set
|
||||
+ The build for this target will fail trying to include missing headers */
|
||||
+#ifndef inhibit_libc
|
||||
#include <signal.h>
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
@@ -80,3 +83,4 @@ alpha_fallback_frame_state (struct _Unwi
|
||||
fs->retaddr_column = 64;
|
||||
return _URC_NO_REASON;
|
||||
}
|
||||
+#endif /* inhibit_libc */
|
@ -1,26 +0,0 @@
|
||||
On 20081011, Khem RAJ writes:
|
||||
You have to bar gcc trying to build unwinding at stage 1. Try the
|
||||
attached patch and see if it helps.
|
||||
|
||||
gcc/config/sh/linux-unwind.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
Index: gcc-4_2-branch/gcc/config/sh/linux-unwind.h
|
||||
===================================================================
|
||||
--- gcc-4_2-branch.orig/gcc/config/sh/linux-unwind.h 2008-07-01 17:24:40.000000000 -0700
|
||||
+++ gcc-4_2-branch/gcc/config/sh/linux-unwind.h 2008-07-01 17:25:47.000000000 -0700
|
||||
@@ -26,6 +26,8 @@ along with this program; see the file CO
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
+#ifndef inhibit_libc
|
||||
+
|
||||
/* Do code reading to identify a signal frame, and set the frame
|
||||
state data appropriately. See unwind-dw2.c for the structs. */
|
||||
|
||||
@@ -251,3 +253,4 @@ sh_fallback_frame_state (struct _Unwind_
|
||||
return _URC_NO_REASON;
|
||||
}
|
||||
#endif /* defined (__SH5__) */
|
||||
+#endif /* ifndef inhibit_libc */
|
||||
|
@ -1,21 +0,0 @@
|
||||
On 20090401, Ted Jordan writes:
|
||||
The generated libtool for building libstdc++ adds the -nostdlib option to the
|
||||
g++ command for linking but doesn't add -lgcc. This causes a "hidden symbol"
|
||||
error when linking against the libstdc++ shared object. This patch adds gcc
|
||||
to the list of libraries linked against when linking libstdc++.
|
||||
|
||||
Index: gcc-4.2.1/ltcf-cxx.sh
|
||||
===================================================================
|
||||
--- gcc-4.2.1.orig/ltcf-cxx.sh 2005-07-15 21:30:53.000000000 -0500
|
||||
+++ gcc-4.2.1/ltcf-cxx.sh 2009-04-02 09:30:34.000000000 -0500
|
||||
@@ -78,8 +78,8 @@
|
||||
# to be the same.
|
||||
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
- archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
- archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
+ archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -lgcc ${wl}-soname $wl$soname -o $lib'
|
||||
+ archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -lgcc ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
|
||||
|
||||
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
|
||||
export_dynamic_flag_spec='${wl}--export-dynamic'
|
@ -1,32 +0,0 @@
|
||||
Vampirised from:
|
||||
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
|
||||
|
||||
diff -durN gcc-4.2.2.orig/gcc/mklibgcc.in gcc-4.2.2/gcc/mklibgcc.in
|
||||
--- gcc-4.2.2.orig/gcc/mklibgcc.in 2006-07-04 22:20:01.000000000 +0200
|
||||
+++ gcc-4.2.2/gcc/mklibgcc.in 2011-08-31 16:24:03.674690016 +0200
|
||||
@@ -223,8 +223,8 @@
|
||||
if [ "$LIBUNWIND" ]; then
|
||||
libunwind_a=$dir/libunwind.a
|
||||
fi
|
||||
+ libgcc_eh_a=$dir/libgcc_eh.a
|
||||
if [ "$SHLIB_LINK" ]; then
|
||||
- libgcc_eh_a=$dir/libgcc_eh.a
|
||||
libgcc_s_so=$dir/libgcc_s${SHLIB_EXT}
|
||||
if [ "$LIBUNWIND" ]; then
|
||||
libunwind_so=$dir/libunwind${SHLIB_EXT}
|
||||
@@ -889,11 +889,11 @@
|
||||
echo ' chmod 644' ${ldir}/libgcov.a
|
||||
echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcov.a
|
||||
|
||||
- if [ "$SHLIB_LINK" ]; then
|
||||
- echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
|
||||
- echo ' chmod 644' ${ldir}/libgcc_eh.a
|
||||
- echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
|
||||
+ echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
|
||||
+ echo ' chmod 644' ${ldir}/libgcc_eh.a
|
||||
+ echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
|
||||
|
||||
+ if [ "$SHLIB_LINK" ]; then
|
||||
shlib_slibdir_qual=
|
||||
os_multilib_dir=`$GCC_FOR_TARGET $flags --print-multi-os-directory`
|
||||
if [ "$os_multilib_dir" != . ]; then
|
@ -1,216 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/boehm-gc/configure gcc-4.2.1/boehm-gc/configure
|
||||
--- gcc-4.2.1.orig/boehm-gc/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/boehm-gc/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -4323,7 +4323,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/contrib/regression/objs-gcc.sh gcc-4.2.1/contrib/regression/objs-gcc.sh
|
||||
--- gcc-4.2.1.orig/contrib/regression/objs-gcc.sh 2005-08-15 02:41:31.000000000 +0200
|
||||
+++ gcc-4.2.1/contrib/regression/objs-gcc.sh 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -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
|
||||
diff -durN gcc-4.2.1.orig/gcc/config/cris/linux.h gcc-4.2.1/gcc/config/cris/linux.h
|
||||
--- gcc-4.2.1.orig/gcc/config/cris/linux.h 2006-02-18 12:12:51.000000000 +0100
|
||||
+++ gcc-4.2.1/gcc/config/cris/linux.h 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -74,7 +74,11 @@
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#if UCLIBC_DEFAULT
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+#else
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#endif
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libffi/configure gcc-4.2.1/libffi/configure
|
||||
--- gcc-4.2.1.orig/libffi/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libffi/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3460,7 +3460,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libgfortran/configure gcc-4.2.1/libgfortran/configure
|
||||
--- gcc-4.2.1.orig/libgfortran/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libgfortran/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3721,7 +3721,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libgomp/configure gcc-4.2.1/libgomp/configure
|
||||
--- gcc-4.2.1.orig/libgomp/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libgomp/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3893,7 +3893,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libjava/classpath/configure gcc-4.2.1/libjava/classpath/configure
|
||||
--- gcc-4.2.1.orig/libjava/classpath/configure 2007-01-17 19:10:26.000000000 +0100
|
||||
+++ gcc-4.2.1/libjava/classpath/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -5307,7 +5307,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libjava/classpath/ltconfig gcc-4.2.1/libjava/classpath/ltconfig
|
||||
--- gcc-4.2.1.orig/libjava/classpath/ltconfig 2006-08-07 22:37:50.000000000 +0200
|
||||
+++ gcc-4.2.1/libjava/classpath/ltconfig 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -603,7 +603,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
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
diff -durN gcc-4.2.1.orig/libjava/configure gcc-4.2.1/libjava/configure
|
||||
--- gcc-4.2.1.orig/libjava/configure 2007-07-19 16:33:56.000000000 +0200
|
||||
+++ gcc-4.2.1/libjava/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -5424,7 +5424,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libmudflap/configure gcc-4.2.1/libmudflap/configure
|
||||
--- gcc-4.2.1.orig/libmudflap/configure 2006-12-04 12:13:07.000000000 +0100
|
||||
+++ gcc-4.2.1/libmudflap/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -5394,7 +5394,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libobjc/configure gcc-4.2.1/libobjc/configure
|
||||
--- gcc-4.2.1.orig/libobjc/configure 2006-10-15 09:42:57.000000000 +0200
|
||||
+++ gcc-4.2.1/libobjc/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3314,7 +3314,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libssp/configure gcc-4.2.1/libssp/configure
|
||||
--- gcc-4.2.1.orig/libssp/configure 2006-10-15 09:42:57.000000000 +0200
|
||||
+++ gcc-4.2.1/libssp/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -4480,7 +4480,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/configure 2007-06-29 01:02:05.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -4283,7 +4283,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libtool.m4 gcc-4.2.1/libtool.m4
|
||||
--- gcc-4.2.1.orig/libtool.m4 2005-07-16 04:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libtool.m4 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -739,7 +739,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
diff -durN gcc-4.2.1.orig/ltconfig gcc-4.2.1/ltconfig
|
||||
--- gcc-4.2.1.orig/ltconfig 2007-02-14 18:08:35.000000000 +0100
|
||||
+++ gcc-4.2.1/ltconfig 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -603,7 +603,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
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
diff -durN gcc-4.2.1.orig/zlib/configure gcc-4.2.1/zlib/configure
|
||||
--- gcc-4.2.1.orig/zlib/configure 2007-01-17 19:10:26.000000000 +0100
|
||||
+++ gcc-4.2.1/zlib/configure 2007-08-03 20:29:22.000000000 +0200
|
||||
@@ -3429,7 +3429,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.orig/gcc/config.gcc 2007-02-03 06:25:20.000000000 +0100
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-08-03 20:29:52.000000000 +0200
|
||||
@@ -1964,7 +1964,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"
|
File diff suppressed because it is too large
Load Diff
@ -1,223 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
@ -1,50 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
@ -1,354 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -46,16 +46,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +60,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +74,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +101,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:30:53.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:24.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2007-08-03 20:30:21.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/time_members.h 2007-08-03 20:31:54.000000000 +0200
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
@ -1,50 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/src/Makefile.am gcc-4.2.1/libstdc++-v3/src/Makefile.am
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/src/Makefile.am 2006-07-28 06:57:34.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/src/Makefile.am 2007-08-03 20:32:27.000000000 +0200
|
||||
@@ -257,6 +257,12 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -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
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/src/Makefile.in gcc-4.2.1/libstdc++-v3/src/Makefile.in
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/src/Makefile.in 2006-10-16 21:08:22.000000000 +0200
|
||||
+++ gcc-4.2.1/libstdc++-v3/src/Makefile.in 2007-08-03 20:32:27.000000000 +0200
|
||||
@@ -657,7 +657,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
|
||||
|
||||
@@ -690,6 +690,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 \
|
||||
@@ -799,6 +800,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:
|
@ -1,12 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/boehm-gc/include/gc.h gcc-4.2.1/boehm-gc/include/gc.h
|
||||
--- gcc-4.2.1.orig/boehm-gc/include/gc.h 2006-09-18 20:45:08.000000000 +0200
|
||||
+++ gcc-4.2.1/boehm-gc/include/gc.h 2007-08-03 20:33:00.000000000 +0200
|
||||
@@ -502,7 +502,7 @@
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
# 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
|
@ -1,12 +0,0 @@
|
||||
diff -durN gcc-4.2.1.orig/libstdc++-v3/include/c_std/std_cstdio.h gcc-4.2.1/libstdc++-v3/include/c_std/std_cstdio.h
|
||||
--- gcc-4.2.1.orig/libstdc++-v3/include/c_std/std_cstdio.h 2006-12-07 10:33:51.000000000 +0100
|
||||
+++ gcc-4.2.1/libstdc++-v3/include/c_std/std_cstdio.h 2007-08-03 20:33:24.000000000 +0200
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user