[Bug target/52990] bootstrap ia64 cross-compiler gcc (static C-only) includes a broken libgcc.a due to libunwind dependencies

2012-08-24 Thread thierry.red...@avionic-design.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52990

Thierry Reding  changed:

   What|Removed |Added

 CC||thierry.reding@avionic-desi
   ||gn.de

--- Comment #1 from Thierry Reding  
2012-08-24 08:43:16 UTC ---
I've seen this problem when building glibc as well. It tries to build
a number of utilities and link them against libgcc with the missing
symbols that you mentioned.

In the scripts that I use to build the toolchains, I was able to solve
this by adding a configparms file to the build directory that sets
"build-programs = no".

After the final gcc is built, libunwind is properly installed and can
at least be used for dynamically linked executables. I've also tested
that the resulting gcc can link static executables, though I'm not
able to execute because I lack the hardware.


[Bug target/51882] New: ICE: in extract_insn, at recog.c:2109 (unrecognizable insn) when building Mesa on ARM

2012-01-17 Thread thierry.red...@avionic-design.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51882

 Bug #: 51882
   Summary: ICE: in extract_insn, at recog.c:2109 (unrecognizable
insn) when building Mesa on ARM
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: thierry.red...@avionic-design.de


Created attachment 26351
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26351
Preprocessed source.

I can reproduce this ICE reliably by running the following commands in a
git checkout of Mesa (git://anongit.freedesktop.org/mesa/mesa.git):

  $ cd src/mesa
  $ ${CROSS_COMPILE}gcc -c -o swrast/s_span.o swrast/s_span.c -DFEATURE_GL=1
-DFEATURE_ES1=1 -DFEATURE_ES2=1 -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN
-DUSE_XCB -DUSE_XSHM -DHAVE_MINCORE -DHAVE_LIBUDEV -I../../include
-I../../src/glsl -I../../src/mesa -I../../src/mapi -I../../src/gallium/include
-I../../src/gallium/auxiliary -mlittle-endian -mapcs -mabi=aapcs-linux
-mno-thumb-interwork -g -O2 -marm -march=armv7-a -mtune=cortex-a9 -Uarm
-mfpu=vfpv3-d16 -mfloat-abi=softfp -Wall -Wextra -Wmissing-prototypes -std=c99
-ffast-math -fno-strict-aliasing -fno-builtin-memcmp -fPIC -fvisibility=hidden
-save-temps -v

Where the CROSS_COMPILE variable points to the ARM cross-compiler. I've tested
with a variety of versions and can reproduce this with the CodeSourcery
2009q3 (gcc 4.4.1), 2010q1 (gcc 4.4.1), 2010.09 (gcc 4.5.1), 2011.03 (gcc
4.5.2)
and 2011.09 (gcc 4.6.1) toolchains as well as with a custom toolchain based on
gcc 4.6.2 and gcc-4.6-20120113. However, the issue is no longer present in the
latest 4.7 snapshot (tested with a custom toolchain based on gcc-4.7-20120114).
I was also not able to reproduce the ICE with an older CodeSourcery toolchain
(2009q1, gcc 4.3.3).

The attached preprocessed source file is from the custom gcc-4.6-20120113
toolchain, with the following output when running the above command:

---

Using built-in specs.
COLLECT_GCC=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/bin/arm-unknown-linux-gnueabi-gcc-4.6.3
COLLECT_LTO_WRAPPER=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.6.3/lto-wrapper
Target: arm-unknown-linux-gnueabi
Configured with: ../configure --target=arm-unknown-linux-gnueabi
--prefix=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr
--datadir=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/share
--infodir=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/share/info
--mandir=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/share/man
--libdir=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/lib
--libexecdir=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/lib
--includedir=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/sys-root/usr/include
--with-gxx-include-dir=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/arm-unknown-linux-gnueabi/sys-root/usr/include/c++/4.6.3
--with-pkgversion='PBS 2010.08-wip' --program-prefix=arm-unknown-linux-gnueabi-
--with-mpfr=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr
--with-gmp=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr
--enable-languages=c,c++,objc,obj-c++ --disable-libssp
--with-as=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/bin/arm-unknown-linux-gnueabi-as
--with-ld=/home/thierry.reding/src/pbs-experimental.git/toolchains/arm-unknown-linux-gnueabi/usr/bin/arm-unknown-linux-gnueabi-ld
--with-sysroot=yes
Thread model: posix
gcc version 4.6.3 20120113 (prerelease) (PBS 2010.08-wip) 
COLLECT_GCC_OPTIONS='-c' '-o' 'swrast/s_span.o' '-D' 'FEATURE_GL=1' '-D'
'FEATURE_ES1=1' '-D' 'FEATURE_ES2=1' '-D' '_GNU_SOURCE' '-D' 'PTHREADS' '-D'
'HAVE_POSIX_MEMALIGN' '-D' 'USE_XCB' '-D' 'USE_XSHM' '-D' 'HAVE_MINCORE' '-D'
'HAVE_LIBUDEV' '-I' '../../include' '-I' '../../src/glsl' '-I' '../../src/mesa'
'-I' '../../src/mapi' '-I' '../../src/gallium/include&

[Bug target/51882] ICE: in extract_insn, at recog.c:2109 (unrecognizable insn) when building Mesa on ARM

2012-01-22 Thread thierry.red...@avionic-design.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51882

--- Comment #2 from Thierry Reding  
2012-01-23 07:24:14 UTC ---
> Configured with : 
> 
> --target=arm-linux-gnueabi --with-cpu=cortex-a9 --with-fpu=neon
> --with-float=softfp -
> 
> Command line options. : 
> 
>  ./xgcc -B`pwd` -S -O2  -fPIC   -mapcs -O2  -Wall-ffast-math
> -mtune=cortex-a9 besttry.c 

Hi Ramana,

I can confirm that your reduced testcase triggers the ICE on the
cross-compiler that I use, although I need to add the following
command-line options:

  -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp

I guess you get these implicitly because of the different options
that you passed at configuration.

Thanks for looking at this.
Thierry