Problems with Cygwin GCC WinNT cross i386-vxWorks
fscheurer@manz-acs.de
fscheurer@manz-acs.de
Wed Jul 4 00:40:00 GMT 2001
Hi all,
(if you answer please use my E-Mail address as well.
Not only the mailing-list!
TIA, F. Scheurer)
I try to build the tool-chain mentioned above
(explained somewhat by a HOWTO of Mumit Khan):
#host=i686-cygwin-windowsnt
host=i686-pc-cygwin
## FS 2001-07-03
build=$host
#target=m68k-coff
## FS 2001-06-29
target=i386-wrs-vxworks
## FS 2001-07-03
#tmpdir=/tmp
I passed configuration well using the following script
(based on some contributions of CrossGCC and Mumit Khan) ...
#prefix=/bar
## FS 2001-06-29
#prefix=../bar
## FS 2001-07-03
prefix=/usr/local/i386
i=$prefix/bin
#mkdir build-binutils build-gcc build-newlib build-gdb
# Configure, build and install binutils
cd build-binutils
#../binutils-2.9.1/configure --target=$target --prefix=$prefix -v
#make all install
## FS 2001-07-02
echo "Trying to build binutils ..."
#sh ../binutils-2.11.2/configure --target=$target --host=$host --prefix=$prefix --tmpdir=$tmpdir -v
#make all
## FS 2001-07-03 (see Khan-HOWTO)
sh ../binutils-2.11.2/configure \
--with-included-gettext \
--target=$target --host=$host --build=$build \
--prefix=$prefix -v
make all install
# Configure, build and install gcc ONLY
# *************************************************************************
# ATTENTION:
# Huh, why the .exe extension? Well, it has to do with gcc hosted on
# Cygwin, and you can always patch gcc sources to get rid of the automatic
# .exe addition. Just comment out the EXECUTABLE_SUFFIX macro in
# $<src_root>/gcc-2.XX.Y-Z/gcc/config/i386/xm-cygwin.h and rebuild gcc.
# *************************************************************************
cd ../build-gcc
#../gcc-2.8.1/configure --target=$target --prefix=$prefix -v
#make all install
## FS 2001-07-03 (see Khan-HOWTO Cygwin-Sources fixed for Cygwin platform)
echo "Trying to build gcc ..."
#sh ../gcc-2.95.3-5/configure --target=$target --host=$host --prefix=$prefix --tmpdir=$tmpdir -v
#make all
## FS 2001-07-03 (see Khan-HOWTO)
sh ../gcc-2.95.3-5/configure \
--enable-languages=c,c++ \
--with-included-gettext --enable-shared --enable-threads \
--target=$target --host=$host --build=$build \
--with-newlib \
--prefix=$prefix -v
#make all install
make LANGUAGES=c all-gcc > make.log 2>&1
mv make.log make-c-only.log
make LANGUAGES=c install-gcc > install.log 2>&1
mv install.log install-c-only.log
# Configure, build and install newlib
cd ../build-newlib
#../newlib-1.8.1/configure --target=$target --prefix=$prefix -v
# The settings for FOO_FOR_TARGET aren't necessary if you put $prefix/bin
# in your path before running this.
#make all install \
# CC_FOR_TARGET=$i/${target}-gcc \
# AS_FOR_TARGET=$i/${target}-as \
# LD_FOR_TARGET=$i/${target}-ld \
# AR_FOR_TARGET=$i/${target}-ar \
# RANLIB_FOR_TARGET=$i/${target}-ranlib
## FS 2001-07-02 (see Khan-HOWTO)
echo "Trying to build newlib ..."
#sh ../newlib-1.9.0/configure --target=$target --host=$host --prefix=$prefix --tmpdir=$tmpdir -v
# The settings for FOO_FOR_TARGET aren't necessary if you put $prefix/bin
# in your path before running this.
#make all \
# CC_FOR_TARGET=$i/${target}-gcc \
# AS_FOR_TARGET=$i/${target}-as \
# LD_FOR_TARGET=$i/${target}-ld \
# AR_FOR_TARGET=$i/${target}-ar \
# RANLIB_FOR_TARGET=$i/${target}-ranlib
## FS 2001-07-03 (see Khan-HOWTO)
sh ../newlib-1.9.0/configure
--target=$target --host=$host --build=$build \
--prefix=$prefix -v
# The settings for FOO_FOR_TARGET aren't necessary if you put $prefix/bin
# in your path before running this.
make all install \
CC_FOR_TARGET=$i/${target}-gcc \
AS_FOR_TARGET=$i/${target}-as \
LD_FOR_TARGET=$i/${target}-ld \
AR_FOR_TARGET=$i/${target}-ar \
RANLIB_FOR_TARGET=$i/${target}-ranlib
# Configure, build and install gcc "the rest"
## FS 2001-07-03 (see Khan-HOWTO)
cd ../build-gcc
make all install
# Configure, build and install gdb
cd ../build-gdb
#../gdb-4.17/configure --target=$target --prefix=$prefix -v
#make all install
## FS 2001-07-02
echo "Trying to build gdb ..."
#sh ../gdb-4.18/configure --target=$target --host=$host --prefix=$prefix --tmpdir=$tmpdir -v
#make all
## FS 2001-07-03
sh ../gdb-4.18/configure --target=$target --host=$host --prefix=$prefix -v
make all install
All builds well
- binutils
- gcc-only
- newlib
until it comes to
- gcc-all
then problems occur with non-matching GNU/VxWorks or missing Header-Files
1. vxXXXXX.h are missing
for name in _eh; \
do \
echo ${name}; \
/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_newlib1.9.0/build-gcc/gcc/xgcc -B/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_new
lib1.9.0/build-gcc/gcc/ -B/usr/local/i386/i386-wrs-vxworks/bin/ -I/usr/local/i386/i386-wrs-vxworks/include -O2 -DCROSS_COMPILE -DIN
_GCC -g -O2 -I./include -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -fexceptions -I. -I../..
/gcc-2.95.3-5/gcc -I../../gcc-2.95.3-5/gcc/config -I../../gcc-2.95.3-5/gcc/../include -c \
-DL${name} ../../gcc-2.95.3-5/gcc/libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
i386-wrs-vxworks-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_eh
In file included from ../../gcc-2.95.3-5/gcc/config/vxWorks.h:170,
from ../../gcc-2.95.3-5/gcc/gthr-vxworks.h:38,
from gthr-default.h:1,
from ../../gcc-2.95.3-5/gcc/gthr.h:98,
from ../../gcc-2.95.3-5/gcc/libgcc2.c:3058:
./../gcc-2.95.3-5/gcc/config/types/vxArch.h:88: arch/i86/archI86.h: No such file or directory
In file included from ../../gcc-2.95.3-5/gcc/config/vxWorks.h:175,
from ../../gcc-2.95.3-5/gcc/gthr-vxworks.h:38,
from gthr-default.h:1,
from ../../gcc-2.95.3-5/gcc/gthr.h:98,
from ../../gcc-2.95.3-5/gcc/libgcc2.c:3058:
./../gcc-2.95.3-5/gcc/config/types/vxTypesOld.h:75: sys/types.h: No such file or directory
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_newlib1.9.0/build-gcc/gcc'
make: *** [all-gcc] Error 2
2. including them leads to conflicts with stddef.h
for name in _eh; \
do \
echo ${name}; \
/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_newlib1.9.0/build-gcc/gcc/xgcc -B/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_new
lib1.9.0/build-gcc/gcc/ -B/usr/local/i386/i386-wrs-vxworks/bin/ -I/usr/local/i386/i386-wrs-vxworks/include -O2 -DCROSS_COMPILE -DIN
_GCC -g -O2 -I./include -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -fexceptions -I. -I../..
/gcc-2.95.3-5/gcc -I../../gcc-2.95.3-5/gcc/config -I../../gcc-2.95.3-5/gcc/../include -c \
-DL${name} ../../gcc-2.95.3-5/gcc/libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
i386-wrs-vxworks-ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_eh
In file included from ../../gcc-2.95.3-5/gcc/config/vxWorks.h:174,
from ../../gcc-2.95.3-5/gcc/gthr-vxworks.h:38,
from gthr-default.h:1,
from ../../gcc-2.95.3-5/gcc/gthr.h:98,
from ../../gcc-2.95.3-5/gcc/libgcc2.c:3058:
./../gcc-2.95.3-5/gcc/config/types/vxTypes.h:66: redefinition of `ptrdiff_t'
include/stddef.h:120: `ptrdiff_t' previously declared here
./../gcc-2.95.3-5/gcc/config/types/vxTypes.h:71: conflicting types for `size_t'
include/stddef.h:172: previous declaration of `size_t'
./../gcc-2.95.3-5/gcc/config/types/vxTypes.h:76: conflicting types for `wchar_t'
include/stddef.h:257: previous declaration of `wchar_t'
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_newlib1.9.0/build-gcc/gcc'
make: *** [all-gcc] Error 2
3. Substituting stddef.h with the subset which comes with VxWorks
leads us to:
c:/usr/bin/gcc -c -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I../../gcc-2.95.3-5/gcc -I../../gcc-2.95.3-5/gcc/conf
ig -I../../gcc-2.95.3-5/gcc/../include ../../gcc-2.95.3-5/gcc/cp/g++spec.c
In file included from ../../gcc-2.95.3-5/gcc/config/types/vxANSI.h:44,
from ../../gcc-2.95.3-5/gcc/config/types/vxTypes.h:63,
from ../../gcc-2.95.3-5/gcc/config/sys/types.h:39,
from /usr/include/time.h:32,
from /usr/include/sys/reent.h:14,
from /usr/include/stdio.h:48,
from ../../gcc-2.95.3-5/gcc/system.h:37,
from ../../gcc-2.95.3-5/gcc/cp/g++spec.c:22:
./../gcc-2.95.3-5/gcc/config/types/vxCpu.h:200: #error CPU is not defined correctly
make[1]: *** [g++spec.o] Error 1
make[1]: Leaving directory `/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_newlib1.9.0/build-gcc/gcc'
make: *** [all-gcc] Error 2
4. Integrating CPU Macro/Define into highest level Makefile
(again with original Cygwin-stddef.h in gcc sources)
CPU = I80386
..
CC_FOR_BUILD = $(CC) -DCPU=$(CPU)
..
leads us to conflicts in the build-tools:
c:/usr/bin/gcc -DCPU=I80386 -c -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I../../gcc-2.95.3-5/gcc -I../../gcc-2.95
3-5/gcc/config -I../../gcc-2.95.3-5/gcc/../include \
../../gcc-2.95.3-5/gcc/gencheck.c
In file included from ../../gcc-2.95.3-5/gcc/config/sys/types.h:39,
from /usr/include/time.h:32,
from /usr/include/sys/reent.h:14,
from /usr/include/stdio.h:48,
from ../../gcc-2.95.3-5/gcc/system.h:37,
from ../../gcc-2.95.3-5/gcc/gencheck.c:22:
./../gcc-2.95.3-5/gcc/config/types/vxTypes.h:71: warning: redefinition of `size_t'
c:/usr/bin/../lib/gcc-lib/i686-pc-cygwin/2.95.3-5/include/stddef.h:172: warning: `size_t' previously declared here
In file included from /usr/include/sys/reent.h:14,
from /usr/include/stdio.h:48,
from ../../gcc-2.95.3-5/gcc/system.h:37,
from ../../gcc-2.95.3-5/gcc/gencheck.c:22:
/usr/include/time.h:47: warning: `__cdecl__' attribute directive ignored
/usr/include/time.h:47: parse error before `clock'
In file included from ../../gcc-2.95.3-5/gcc/system.h:37,
from ../../gcc-2.95.3-5/gcc/gencheck.c:22:
/usr/include/stdio.h:50: warning: redefinition of `fpos_t'
./../gcc-2.95.3-5/gcc/config/types/vxTypes.h:91: warning: `fpos_t' previously declared here
In file included from /usr/include/stdlib.h:17,
from ../../gcc-2.95.3-5/gcc/system.h:150,
from ../../gcc-2.95.3-5/gcc/gencheck.c:22:
c:/usr/bin/../lib/gcc-lib/i686-pc-cygwin/2.95.3-5/include/stddef.h:257: conflicting types for `wchar_t'
./../gcc-2.95.3-5/gcc/config/types/vxTypes.h:76: previous declaration of `wchar_t'
In file included from /usr/include/sys/unistd.h:12,
from /usr/include/unistd.h:4,
from ../../gcc-2.95.3-5/gcc/system.h:154,
from ../../gcc-2.95.3-5/gcc/gencheck.c:22:
c:/usr/bin/../lib/gcc-lib/i686-pc-cygwin/2.95.3-5/include/stddef.h:120: conflicting types for `ptrdiff_t'
./../gcc-2.95.3-5/gcc/config/types/vxTypes.h:66: previous declaration of `ptrdiff_t'
In file included from /usr/include/sys/time.h:27,
from ../../gcc-2.95.3-5/gcc/system.h:194,
from ../../gcc-2.95.3-5/gcc/gencheck.c:22:
/usr/include/sys/select.h:28: parse error before `fd_set'
make[1]: *** [gencheck.o] Error 1
make[1]: Leaving directory `/cygdrive/c/GNU_CrossGCC_Cygwin/CrossGCC/build_newlib1.9.0/build-gcc/gcc'
make: *** [all-gcc] Error 2
What's the right way throug all this mess?
Is the actual portability to vxworks not given?
Where to find some more information about that X-ing i686-cygwin-X-x86-vxworks?
Are all the adaptions to be made in the headers drawn
from {WIND_BASE}/target/h?
Any hint appreciated.
Many thanks in advance!
MfG / Kind Regards
Friedrich Scheurer, R&D
--------------------------------
acs GmbH
Steigaeckerstrasse 13
72768 Reutlingen
Telefon (07121) 9019-23
Telefax (07121) 9019-98
Internet www.manz-acs.de
e-mail: fscheurer@manz-acs.de
--------------------------------
To: Steven_Snyder@3com.com
aoliva@redhat.com
Cc: gcc-help@gcc.gnu.org
vxwexplo@lbl.gov
More information about the Gcc-help
mailing list