Bug 44458 - [4.6 Regression] Bootstrap fails on arm_float_words_big_endian implicit declaration when Ada on arm-linux
Summary: [4.6 Regression] Bootstrap fails on arm_float_words_big_endian implicit decla...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Steven Bosscher
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 21:44 UTC by Laurent GUERBY
Modified: 2010-07-13 16:05 UTC (History)
4 users (show)

See Also:
Host: arm-linux-gnueabi
Target: arm-linux-gnueabi
Build: arm-linux-gnueabi
Known to work:
Known to fail:
Last reconfirmed: 2010-06-08 21:51:28


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent GUERBY 2010-06-07 21:44:25 UTC
/home/guerby/build-37/./prev-gcc/xgcc -B/home/guerby/build-37/./prev-gcc/ -B/n/37/guerby/install-trunk-37-160037/armv7l-unknown-linux-gnueabi/bin/ -B/n/37/guerby/install-trunk-37-160037/armv7l-unknown-linux-gnueabi/bin/ -B/n/37/guerby/i\
nstall-trunk-37-160037/armv7l-unknown-linux-gnueabi/lib/ -isystem /n/37/guerby/install-trunk-37-160037/armv7l-unknown-linux-gnueabi/include -isystem /n/37/guerby/install-trunk-37-160037/armv7l-unknown-linux-gnueabi/sys-include    -c   -\
g -O2 -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes  -Wmissing-format-attribute -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat \
-fno-common  -DHAVE_CONFIG_H -I.. -I. -Iada -I../../trunk/gcc -I../../trunk/gcc/ada -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include -I/opt/cfarm/gmp-4.2.4/include -I/opt/cfarm/mpfr-2.4.2/include -I/opt/cfarm/mpc-0.8/inc\
lude  -I../../trunk/gcc/../libdecnumber -I../../trunk/gcc/../libdecnumber/dpd -I../libdecnumber     ../../trunk/gcc/ada/gcc-interface/targtyps.c -o ada/targtyps.o
../../trunk/gcc/ada/gcc-interface/targtyps.c: In function 'get_float_words_be':
../../trunk/gcc/ada/gcc-interface/targtyps.c:208:3: error: implicit declaration of function 'arm_float_words_big_endian' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors

make[3]: *** [ada/targtyps.o] Error 1
make[3]: Leaving directory `/home/guerby/build-37/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/guerby/build-37'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/guerby/build-37'
make: *** [bootstrap] Error 2
Comment 1 Eric Botcazou 2010-06-07 22:25:04 UTC
Very likely:

2010-05-25  Steven Bosscher  <steven@gcc.gnu.org>

	* gcc-interface/targtyps.c: Do not include tm_p.h

	* gcc-interface/Make-lang.in: Update dependencies.
Comment 2 Mikael Pettersson 2010-06-08 08:19:02 UTC
The same error occurs for java on ARM, see PR44335.  I posted a patch to fix that one (must include both tm.h and tm_p.h in jcf-parse.c) that but so far has gotten no response to it.
Comment 3 Laurent GUERBY 2010-06-12 14:39:48 UTC
Fixing by reverting Steven patch is not enough to regain bootstrap on arm, here is the error during stage2:

/home/guerby/build/./prev-gcc/xgcc -B/home/guerby/build/./prev-gcc/ -B/n/57/guerby/install-trunk-160646/armv5tel-unknown-linux-gnueabi/bin/ -B/n/57/guerby/install-trunk-160646/armv5tel-unknown-linux-gnueabi/bin/ -B/n/57/guerby/install-t\
runk-160646/armv5tel-unknown-linux-gnueabi/lib/ -isystem /n/57/guerby/install-trunk-160646/armv5tel-unknown-linux-gnueabi/include -isystem /n/57/guerby/install-trunk-160646/armv5tel-unknown-linux-gnueabi/sys-include    -c   -g -O2 -gtog\
gle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -f\
no-common  -DHAVE_CONFIG_H -I. -I. -I../../trunk/gcc -I../../trunk/gcc/. -I../../trunk/gcc/../include -I../../trunk/gcc/../libcpp/include  -I../../trunk/gcc/../libdecnumber -I../../trunk/gcc/../libdecnumber/dpd -I../libdecnumber     \
                ../../trunk/gcc/config/arm/arm.c -o arm.o
../../trunk/gcc/config/arm/arm.c: In function 'thumb2_reorg':
../../trunk/gcc/config/arm/arm.c:11466:19: error: initialization from incompatible pointer type [-Werror]
../../trunk/gcc/config/arm/arm.c:11467:9: error: passing argument 3 of 'gen_rtx_fmt_E_stat' from incompatible pointer type [-Werror]
./genrtl.h:60:1: note: expected 'rtvec' but argument is of type 'rtx'
../../trunk/gcc/config/arm/arm.c:11460:9: error: unused variable 'op1' [-Werror=unused-variable]
cc1: all warnings being treated as errors

make[3]: *** [arm.o] Error 1
make[3]: Leaving directory `/home/guerby/build/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/guerby/build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/guerby/build'
make: *** [bootstrap] Error 2
Comment 4 Mikael Pettersson 2010-06-12 21:26:09 UTC
(In reply to comment #3)
> Fixing by reverting Steven patch is not enough to regain bootstrap on arm, here
> is the error during stage2:

This is a new unrelated error caused by r160458.  You should IMO have opened a new PR for it.  Anyway, the patch below should fix it.  Tested in a cross so far, I'll do a native bootstrap of 4.6 head + this tomorrow.  The declaration bug for 'vec' is obvious.  The fact that 'op1' is extracted but unused makes me a bit nervous.

--- gcc-4.6-r160458/gcc/config/arm/arm.c.~1~
+++ gcc-4.6-r160458/gcc/config/arm/arm.c
@@ -11457,13 +11457,12 @@ thumb2_reorg (void)
                  rtx dst = XEXP (pat, 0);
                  rtx src = XEXP (pat, 1);
                  rtx op0 = XEXP (src, 0);
-                 rtx op1 = XEXP (src, 1);
                  if (rtx_equal_p (dst, op0)
                      || GET_CODE (src) == PLUS || GET_CODE (src) == MINUS)
                    {
                      rtx ccreg = gen_rtx_REG (CCmode, CC_REGNUM);
                      rtx clobber = gen_rtx_CLOBBER (VOIDmode, ccreg);
-                     rtx vec = gen_rtvec (2, pat, clobber);
+                     rtvec vec = gen_rtvec (2, pat, clobber);
                      PATTERN (insn) = gen_rtx_PARALLEL (VOIDmode, vec);
                      INSN_CODE (insn) = -1;
                    }
Comment 5 Laurent GUERBY 2010-06-15 09:58:31 UTC
Reverting Steven patch with your fix is enough to get back bootstrap:

http://gcc.gnu.org/ml/gcc-testresults/2010-06/msg01497.html
Comment 6 Laurent GUERBY 2010-07-03 07:13:01 UTC
Patch:
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00236.html
Comment 7 Laurent Guerby 2010-07-13 15:59:47 UTC
Subject: Bug 44458

Author: guerby
Date: Tue Jul 13 15:59:20 2010
New Revision: 162146

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162146
Log:
2010-07-13  Laurent GUERBY  <laurent@guerby.net>

        PR bootstrap/44458
        * gcc-interface/targtyps.c: Include tm_p.h.
        * gcc-interface/Make-lang.in: Update dependencies.


Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/Make-lang.in
    trunk/gcc/ada/gcc-interface/targtyps.c

Comment 8 Laurent GUERBY 2010-07-13 16:05:33 UTC
Should be fixed now.