public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: alexsh@hectic.net
To: gcc-gnats@gcc.gnu.org
Subject: bootstrap/3437: vxworks cross-compile problem because of fixincludes
Date: Wed, 27 Jun 2001 06:36:00 -0000	[thread overview]
Message-ID: <20010627133406.13273.qmail@sourceware.cygnus.com> (raw)

>Number:         3437
>Category:       bootstrap
>Synopsis:       vxworks cross-compile problem because of fixincludes
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 27 06:36:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Alex Shnitman
>Release:        3.0
>Organization:
>Environment:
Host compiler gcc-2.95.3, Debian 2.2
>Description:
When cross-compiling gcc 3.0 for a vxworks target, it
copies the include files that come with VxWorks and runs
fixincludes on them. The latter changes all the occurrences
of "CPU" to "__CPU__" in those files. However, after this
change one of the files stops compiling. This file defines
CPU_FAMILY according to the definition of CPU. (The latter
is defined by the compiler -- it's in the spec file for the
platform.) Here's a snippet from vxCpu.h:

#if     (CPU==I80386 || CPU==I80486 || CPU==PENTIUM || CPU==PENTIUMPRO)
#define CPU_FAMILY      I80X86
#endif  /* CPU_FAMILY==I80X86 */

fixincludes changes "CPU" to "__CPU__", and the above code
naturally stops working. At the end of vxCpu.h, there's
this code:

#if !defined(CPU) || !defined(CPU_FAMILY)
#error CPU is not defined correctly
#endif

Due to the fixincludes "fixes", this error is always
triggered. The gcc build thus fails:

make[2]: Entering directory `/home/alexsh/gcc-3.0/gcc'
for d in libgcc nof libgcc/nof le libgcc/le ca libgcc/ca und libgcc/und le/und libgcc/le/und nof/le libgcc/nof/le nof/ca libgcc/nof/ca nof/und libgcc/nof/und nof/le/und libgcc/nof/le/und; do \
  if [ -d $d ]; then true; else mkdir $d; fi \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/home/alexsh/gcc-3.0/gcc/xgcc -B/home/alexsh/gcc-3.0/gcc/ -B/usr/local/vxworks/powerpc-wrs-vxworks/bin/ -B/usr/local/vxworks/powerpc-wrs-vxworks/lib/ -isystem /usr/local/vxworks/powerpc-wrs-vxworks/include -O2  -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include   -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I. -I./. -I./config -I./../include  -mrelocatable-lib -mno-eabi -mstrict-align -DL_muldi3 -c ./libgcc2.c -o libgcc/./_muldi3.o
In file included from /usr/local/vxworks/powerpc-wrs-vxworks/sys-include/types/vxANSI.h:44,
                 from /home/alexsh/gcc-3.0/gcc/include/stdio.h:66,
                 from tsystem.h:63,
                 from libgcc2.c:37:
/home/alexsh/gcc-3.0/gcc/include/types/vxCpu.h:209:2: #error CPU is not defined correctly
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/home/alexsh/gcc-3.0/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/alexsh/gcc-3.0/gcc'
make: *** [all-gcc] Error 2
>How-To-Repeat:
cd gcc-3.0
./configure --target=powerpc-wrs-vxworks --with-headers=/net/tornado/c/Tornado/target/h
make

The same process works flawlessly when compiling gcc 2.95.3.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-06-27  6:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-27  6:36 alexsh [this message]
2002-11-26 15:46 bootstrap/3437: [vxworks] " bangerth
2003-03-27 20:23 neroden
2003-05-01 17:56 fsciarra
2003-05-14  8:36 Dara Hazeghi
2003-05-14 10:56 giovannibajo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010627133406.13273.qmail@sourceware.cygnus.com \
    --to=alexsh@hectic.net \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).