This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/14499] New: gnat bug detected building m68k-rtems runtime.
- From: "cjohns at cybertec dot com dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2004 04:21:49 -0000
- Subject: [Bug ada/14499] New: gnat bug detected building m68k-rtems runtime.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Building gcc with Ada from cvs results in the following "GNAT BUG DETECTED":
.....
make[4]: Leaving directory
`/opt/work/sw/gnats/build/target-i386-pc-linux-gnu-m68k-rtems-gcc/gcc/ada/rts'
make -C rts CC="../../xgcc -B../../" \
ADA_INCLUDES="" \
CFLAGS="-g -O2" \
ADAFLAGS="-W -Wall -gnatpg" \
srcdir=/opt/work/sw/gnats/src/gcc/gcc/ada \
-f ../Makefile \
a-caldel.o a-calend....
[snip]
../../xgcc -B../../ -c -g -O2 -W -Wall -gnatpg s-imgdec.adb -o s-imgdec.o
+===========================GNAT BUG DETECTED==============================+
| 3.5.0 20040307 (experimental) (m68k-unknown-rtems) GCC error: |
| in instantiate_virtual_regs_lossage, at function.c:3747 |
| Error detected at s-imgdec.adb:335:8 |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html. |
| Include the entire contents of this bug box in the report. |
| Include the exact gcc or gnatmake command that you entered. |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files). |
+==========================================================================+
Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
compilation abandoned
The RTEMS build is on a RedHat 9 machine with:
gcc - cvs head (7th Mar 2004)
autoconf-2.58
automake-1.7.9
libtool-1.5
binutils-040302
newlib-1.12.0
../../src/gcc/configure \
--host=i386-pc-linux-gnu \
--build=i386-pc-linux-gnu \
--target=m68k-rtems \
--prefix=/opt/work/sw/gnats/bin \
--with-gnu-as \
--with-gnu-ld \
--with-newlib \
--disable-nls \
--with-system-zlib \
--enable-version-specific-runtime-libs \
--enable-threads=rtems \
--enable-languages=c,c++,ada
make CFLAGS_FOR_TARGET="-O3 -g" all
Notes:
1) A native build of gnats is performed before the cross compiler is built. This
is to create a native Ada runtime as the m68k-rtems-gnatbind tool is built but
no runtime is built or installed. This means the gcc-cvs gnat compiler is being
used when this cross compiler is built.
2) The gcc-3.4-20040225 snapshot I tried fails with the same error.
3) The build fails before the error being reported when building an Ada C
runtime file (adaint.o). It seems the CC being passed in the 'gnatlib' target
first command in the ada/Makefile.in is not complete enough. The RTEMS target is
building newlib with the standard newlib symlink and as we are still building
the compiler when the Ada runtime is built the libc headers have not been
installed and so need to be referenced with special -I options. GCC provides
these paths so simply removing the CC="../../xgcc -B../../" from the command
line uses the GCC one and so built the $(LIBGNAT_OBJS). The patch is:
$ cvs diff Makefile.in
Index: Makefile.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.73
diff -r1.73 Makefile.in
1777a1778
> #CC="../../xgcc -B../../" \
1780c1781
< $(MAKE) -C rts CC="../../xgcc -B../../" \
---
> $(MAKE) -C rts \
--
Summary: gnat bug detected building m68k-rtems runtime.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cjohns at cybertec dot com dot au
CC: gcc-bugs at gcc dot gnu dot org,joel dot sherrill at
oarcorp dot com
GCC build triplet: i386-pc-linux-gnu
GCC host triplet: i386-pc-linux-gnu
GCC target triplet: m68k-rtems
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14499