diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2006-12-04 00:06:10 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2006-12-04 00:06:10 +0000 |
commit | a0fcf54fab67fb9eb1039121349a4582b1074f55 (patch) | |
tree | b2543af5faaca68fbbd664b31b3c048433fa0275 | |
parent | a9c96b3c866e194765d07f5e5a25d57471f1dc84 (diff) | |
download | OSELAS.Toolchain-a0fcf54fab67fb9eb1039121349a4582b1074f55.tar.gz OSELAS.Toolchain-a0fcf54fab67fb9eb1039121349a4582b1074f55.tar.xz |
* glibc: fix gcc PR28516, which throws an ICE when
--disable-profile isn't switched on.
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@1404 f8d472c7-5700-0410-ac5a-87979cec3adf
-rw-r--r-- | patches/binutils-2.17/generic/tc-arm.diff | 96 | ||||
-rw-r--r-- | patches/gcc-4.1.1/generic/gcc-4.1.1-pr28516.diff | 52 | ||||
-rw-r--r-- | patches/gcc-4.1.1/generic/series | 2 | ||||
-rw-r--r-- | rules/glibc.make | 1 |
4 files changed, 149 insertions, 2 deletions
diff --git a/patches/binutils-2.17/generic/tc-arm.diff b/patches/binutils-2.17/generic/tc-arm.diff new file mode 100644 index 0000000..66725d7 --- /dev/null +++ b/patches/binutils-2.17/generic/tc-arm.diff @@ -0,0 +1,96 @@ +# +# Submitted-By: Robert Schwebel, 2006-12-03 +# Committed-By: Robert Schwebel +# +# Error: +# +# rsc@isonoe:/media/rscusb1_plain/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk/build-target/glibc-2.5/elf$ +# PATH=/media/rscusb1_plain/tmp//armeb-xscale-linux-gnueabi/gcc-4.1.1-glibc-2.5-kernel-2.6.18/bin:/media/rscusb1_plain/tmp//armeb-xscale +# -linux-gnueabi/gcc-4.1.1-glibc-2.5-kernel-2.6.18/usr/bin:$PATH armeb-xscale-linux-gnueabi-gcc dl-lookup.c -c -std=gnu99 -O2 -Wall +# -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes -pg -fexceptions -fasynchronous-unwind-tables -I../include +# -I/media/rscusb1_plain/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk/build-target/glibc-2.5-build/elf +# -I/media/rscusb1_plain/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk/build-target/glibc-2.5-build -I../ports/sysdeps/arm/elf +# -I../ports/sysdeps/unix/sysv/linux/arm/eabi/nptl -I../ports/sysdeps/unix/sysv/linux/arm/eabi +# -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../ports/sysdeps/unix/sysv/linux +# -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu +# -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv +# -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix +# -I../ports/sysdeps/arm/eabi -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 +# -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../ports -I../nptl -I.. -I../libio +# -I. -nostdinc -isystem +# /media/rscusb1_plain/tmp/armeb-xscale-linux-gnueabi/gcc-4.1.1-glibc-2.5-kernel-2.6.18/bin/../lib/gcc/armeb-xscale-linux-gnueabi/4.1.1/ +# include -isystem +# /media/rscusb1_plain/tmp//armeb-xscale-linux-gnueabi/gcc-4.1.1-glibc-2.5-kernel-2.6.18/sysroot-armeb-xscale-linux-gnueabi/usr/include +# -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPROF -o +# /media/rscusb1_plain/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk/build-target/glibc-2.5-build/elf/dl-lookup.op -MD -MP -MF +# /media/rscusb1_plain/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk/build-target/glibc-2.5-build/elf/dl-lookup.op.dt -MT +# /media/rscusb1_plain/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk/build-target/glibc-2.5-build/elf/dl-lookup.op +# /tmp/ccuNAGqV.s: Assembler messages: +# /tmp/ccuNAGqV.s:169: Error: junk at end of line, first unrecognized character is `,' +# +# Here's where the assember barfs (the second line): +# +# check_match.7984: +# .fnstart +# .LFB69: +# .file 2 "do-lookup.h" +# .loc 2 76 0 +# @ Nested: function declared inside another function. +# @ args = 0, pretend = 0, frame = 0 +# @ frame_needed = 1, uses_anonymous_args = 0 +# .LVL19: +# .pad #4 +# str ip, [sp, #-4]! +# +# .LCFI4: +# .movsp ip, #4 <--------------------------------------- +# add ip, sp, #4 +# +# The ", #4" seems to be bogus. This is built with binutils 2.17. +# +# +# Description: +# +# http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.292&r2=1.293&cvsroot=src +# +# State: +# +# fixed in upstream cvs +# + +--- src/gas/config/tc-arm.c 2006/09/16 00:55:33 1.292 ++++ src/gas/config/tc-arm.c 2006/09/16 16:24:28 1.293 +@@ -3628,6 +3628,7 @@ + { + int reg; + valueT op; ++ int offset; + + reg = arm_reg_parse (&input_line_pointer, REG_TYPE_RN); + if (reg == FAIL) +@@ -3636,6 +3637,16 @@ + ignore_rest_of_line (); + return; + } ++ ++ /* Optional constant. */ ++ if (skip_past_comma (&input_line_pointer) != FAIL) ++ { ++ if (immediate_for_directive (&offset) == FAIL) ++ return; ++ } ++ else ++ offset = 0; ++ + demand_empty_rest_of_line (); + + if (reg == REG_SP || reg == REG_PC) +@@ -3653,7 +3664,7 @@ + + /* Record the information for later. */ + unwind.fp_reg = reg; +- unwind.fp_offset = unwind.frame_size; ++ unwind.fp_offset = unwind.frame_size - offset; + unwind.sp_restored = 1; + } + diff --git a/patches/gcc-4.1.1/generic/gcc-4.1.1-pr28516.diff b/patches/gcc-4.1.1/generic/gcc-4.1.1-pr28516.diff new file mode 100644 index 0000000..5bf2485 --- /dev/null +++ b/patches/gcc-4.1.1/generic/gcc-4.1.1-pr28516.diff @@ -0,0 +1,52 @@ +# +# Submitted-By: Robert Schwebel, 2006-12-04 +# Committed-By: Robert Schwebel +# +# Description: +# +# See PR28516 for this fix. Note that, if this patch is applied, we also need +# http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.292&r2=1.293&cvsroot=src +# +# State: +# +# fixed +# + +Index: gcc/config/arm/arm.c +=================================================================== +--- gcc/config/arm/arm.c.orig ++++ gcc/config/arm/arm.c +@@ -15363,6 +15363,15 @@ arm_unwind_emit_set (FILE * asm_out_file + /* Move from sp to reg. */ + asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0)); + } ++ else if (GET_CODE (e1) == PLUS ++ && GET_CODE (XEXP (e1, 0)) == REG ++ && REGNO (XEXP (e1, 0)) == SP_REGNUM ++ && GET_CODE (XEXP (e1, 1)) == CONST_INT) ++ { ++ /* Set reg to offset from sp. */ ++ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n", ++ REGNO (e0), (int)INTVAL(XEXP (e1, 1))); ++ } + else + abort (); + break; +Index: gcc/testsuite/gcc.dg/nested-func-5.c +=================================================================== +--- /dev/null ++++ gcc/testsuite/gcc.dg/nested-func-5.c +@@ -0,0 +1,13 @@ ++/* { dg-do compile } */ ++/* { dg-options "-fexceptions" } */ ++/* PR28516: ICE generating ARM unwind directives for nested functions. */ ++ ++void ex(int (*)(void)); ++void foo(int i) ++{ ++ int bar(void) ++ { ++ return i; ++ } ++ ex(bar); ++} diff --git a/patches/gcc-4.1.1/generic/series b/patches/gcc-4.1.1/generic/series index 869da44..f99238b 100644 --- a/patches/gcc-4.1.1/generic/series +++ b/patches/gcc-4.1.1/generic/series @@ -1,4 +1,4 @@ gcc-4.1.1_gcc_c_incpath-no-host-includes.diff - gcc-4.1.0-arm-bigendian.patch arm-softfloat.diff +gcc-4.1.1-pr28516.diff -p0 diff --git a/rules/glibc.make b/rules/glibc.make index be67448..a144bc8 100644 --- a/rules/glibc.make +++ b/rules/glibc.make @@ -106,7 +106,6 @@ GLIBC_AUTOCONF := \ --enable-kernel=$(PTXCONF_GLIBC_ENABLE_KERNEL) \ --without-cvs \ --disable-sanity-checks \ - --disable-profile \ --enable-debug \ --without-gd \ --with-__thread \ |