Bug 32753 - [4.2 Regression] building a crosscompiler for arm-elf fails because of an error in cirrus.md
Summary: [4.2 Regression] building a crosscompiler for arm-elf fails because of an err...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.1
: P2 normal
Target Milestone: 4.2.2
Assignee: Paul Brook
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2007-07-13 07:11 UTC by Matthias Pfaller
Modified: 2007-07-25 15:47 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Stupid patch to fix the problem (694 bytes, patch)
2007-07-13 07:12 UTC, Matthias Pfaller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Pfaller 2007-07-13 07:11:50 UTC
When trying to build a crosscompiler for arm-elf with

cd i386-linux8; CC="gcc" CFLAGS="-O" LDFLAGS="-s" CLIB="" LANGUAGES=c ../gcc-4.2.1-RC-20070703/configure --srcdir=../gcc-4.2.1-RC-20070703 --prefix=/usr/arch --with-local-prefix=/usr/arch --target=arm-elf --with-newlib --disable-libssp

it will fail with:

    build/genoutput.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/errors.o ../build-i686-pc-linux-gnu/libiberty/libiberty.a
build/genoutput ../../gcc-4.2.1-RC-20070703/gcc/config/arm/arm.md \
  insn-conditions.md > tmp-output.c
../../gcc-4.2.1-RC-20070703/gcc/config/arm/cirrus.md:407: error: undefined machine-specific constraint at this point: "T,*v"
../../gcc-4.2.1-RC-20070703/gcc/config/arm/cirrus.md:407: note:  in operand 0
../../gcc-4.2.1-RC-20070703/gcc/config/arm/cirrus.md:407: error: undefined machine-specific constraint at this point: "T,*v,*v"
../../gcc-4.2.1-RC-20070703/gcc/config/arm/cirrus.md:407: note:  in operand 1
gmake[2]: *** [s-output] Error 1
gmake[2]: Leaving directory `/mnt/projekt/soft/uti/cmd/gcc/thumb/i386-linux8/gcc'
gmake[1]: *** [all-gcc] Error 2
gmake[1]: Leaving directory `/mnt/projekt/soft/uti/cmd/gcc/thumb/i386-linux8'
gmake: *** [all] Error 2
*** Error code 2
Stop.
Comment 1 Matthias Pfaller 2007-07-13 07:12:51 UTC
Created attachment 13908 [details]
Stupid patch to fix the problem
Comment 2 Mark Mitchell 2007-07-15 21:24:48 UTC
Paul, can you confirm that it is impossible to build an arm-elf cross-compiler with GCC 4.2.1?  AFAICT, nothing has changed in cirrus.md in a long time, and cirrus.md is included in all ARM configurations, so I would think that this means that GCC 4.2.1 for ARM is completely broken?
Comment 3 Rask Ingemann Lambertsen 2007-07-15 23:39:04 UTC
There are test results for GCC 4.2.1 20070706 on arm-elf here:
<URL:http://gcc.gnu.org/ml/gcc-testresults/2007-07/msg00334.html>.
Comment 4 Paul Brook 2007-07-16 01:04:45 UTC
Builds fine for me.

The bogus constraint is in a pattern that is never used - the predicate is
"TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0 [...]"

gen* are clever enough to eliminate it before it causes problems.
My guess is you broke genconditions by overriding CFLAGS.
Comment 5 Paul Brook 2007-07-16 01:28:14 UTC
In further investigation building with a prehistoric (<3.0.1) host compiler may also cause the same failure.
Comment 6 Mark Mitchell 2007-07-16 02:08:01 UTC
Paul --

Thanks for investigating.

Since this should occur only for a minority of people, this is not a showstopper.  However, would you please remove the disabled pattern?  It's not doing anything useful, and we have some evidence that it can do something harmful.  It's OK to remove this now, or wait until after 4.2.1 is released, as you like.

Thanks,

-- Mark
Comment 7 Matthias Pfaller 2007-07-16 07:17:54 UTC
Sorry for not noting, this. You are right, we are building on a suse 8.0 system
with gcc-2.95.3 as the host compiler. Thanks, Matthias.
Comment 8 Paul Brook 2007-07-16 13:01:30 UTC
Subject: Bug 32753

Author: pbrook
Date: Mon Jul 16 13:01:18 2007
New Revision: 126679

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126679
Log:
2007-07-16  Paul Brook  <paul@codesourcery.com>

	PR target/32753
	gcc/
	* config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/cirrus.md

Comment 9 Paul Brook 2007-07-16 13:03:17 UTC
Subject: Bug 32753

Author: pbrook
Date: Mon Jul 16 13:03:07 2007
New Revision: 126680

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126680
Log:
2007-07-16  Paul Brook  <paul@codesourcery.com>

	PR target/32753
	gcc/
	* config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn.


Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/config/arm/cirrus.md

Comment 10 Paul Brook 2007-07-16 13:18:57 UTC
Subject: Bug 32753

Author: pbrook
Date: Mon Jul 16 13:18:45 2007
New Revision: 126681

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126681
Log:
2007-07-16  Paul Brook  <paul@codesourcery.com>

	PR target/32753
	gcc/
	* config/arm/cirrus.md (cirrus_arm_movsi_insn): Remove dead insn.
	(cirrus_thumb2_movsi_insn): Ditto.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/cirrus.md

Comment 11 Paul Brook 2007-07-25 15:47:22 UTC
Should be fixed now.
Comment 12 Matthias Pfaller 2007-07-26 06:33:25 UTC
Subject: Re:  [4.2 Regression] building a crosscompiler
 for arm-elf fails because of an error in cirrus.md

pbrook at gcc dot gnu dot org wrote:
> ------- Comment #11 from pbrook at gcc dot gnu dot org  2007-07-25 15:47 -------
> Should be fixed now.

It works fine for me.

Matthias