cross gcc for i386-wrs-vxworks

Kai Ruottu kai.ruottu@luukku.com
Mon Sep 15 17:56:00 GMT 2003


"Shang Tao" <st20020529@hotmail.com> wrote:

>       My host is linux-x86 and I want to compile a compiler for i386-wrs-vxworks.
>       I executed following instruction:
> 
>       export TARGET=i386-wrs-vxworks
>       export PREFIX=/home/st/vxworks-gnu
>       export PATH=$PATH:${PREFIX}/bin
> 	  cd  /mnt/d/resource/linux/src/gcc/
> 	  /home/st/src/src/gcc-3.3/configure --target=$TARGET --prefix=$PREFIX

 Seems to be ok this far but you lied with your given PREFIX value, you
seem to have used a :

       export PREFIX=/home/st/vxworks-gnu/

instead...

> --without-headers --with-newlib

 WxWorks has its proprietary/custom headers and they are not derived from
the newlib, neither the C library binaries, so using these options is wrong...

>       While compiling a error is reported as:
> /mnt/d/resource/linux/src/gcc/gcc/xgcc
> -B/mnt/d/resource/linux/src/gcc/gcc/
> -B/home/st/vxworks-gnu//i386-wrs-vxworks/bin/
> -B/home/st/vxworks-gnu//i386-wrs-vxworks/lib/
> -isystem /home/st/vxworks-gnu//i386-wrs-vxworks/include

 The double slashes "//" here tells you using a $prefix value ending
with a slash... These three last options will tell where your target
binutils, libs and headers should be when starting to build the GCC.

 Your given $prefix is '/home/st/vxworks-gnu/' and your given $target is
'i386-wrs-vxworks', so these shown three directories should be filled
with the VxWorks/i386 target binutils, libraries and headers --- only
with the C-ones of headers, filtering any old C++ headers away from the
original VxWorks headers.

 The Cross-GCC build instructions tell that the target stuff should
be preinstalled into '/usr/local/$target/...', but the '/usr/local'
is the default $prefix, so the instuctions should be interpreted
related to the given 'configure' command there, when no '--prefix=$prefix='
was given...

 Maybe you have read some other instructions than those official ones
in the GCC-documentation, and so didn't preinstall anything else than
the target binutils (built by yourself) from the needed target stuff...
It is recommended to read the universal build instructions from the GCC
manual before going to use any special instructions for special cases,
like for embedded newlib-based GCCs or for embedded 'totally from scratch'
Linuxes...

> -c /home/st/src/src/gcc-3.3/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
> In file included from gthr-default.h:1,
>                  from /home/st/src/src/gcc-3.3/gcc/gthr.h:98,
>                  from /home/st/src/src/gcc-3.3/gcc/unwind-dw2.c:28:
> /home/st/src/src/gcc-3.3/gcc/gthr-vxworks.h:204:21: vxWorks.h: No such file or directory
> /home/st/src/src/gcc-3.3/gcc/gthr-vxworks.h:205:20: semLib.h: No such file or directory

 The 'vxWorks.h' and 'semLib.h' headers belong to your target headers:

------------------------- clip ---------------------------------------
kai@mt586kr:/home2/usr/local/i386-wrs-vxworks/include > ls
a_out.h          ioqlib.h         rdblib.h         systime.h
aio.h            ioslib.h         rebootlib.h      tapefslib.h
aiosysdrv.h      iostream.h.wrs   reg.h            taskarchlib.h
arch             iv.h             regex.h          taskhooklib.h
arpa             kernellib.h      regex2.h         tasklib.h
arplib.h         ledlib.h         regs.h           taskvarlib.h
asm.h            limits.h         remlib.h         telnetlib.h
assert.h         loadaoutlib.h    rloglib.h        tftpdlib.h
b_out.h          loadcofflib.h    rnglib.h         tftplib.h
blkio.h          loadecoffcomm.h  routelib.h       ticklib.h
bootecofflib.h   loadecofflib.h   rpc              time.h
bootelflib.h     loadelflib.h     rpclib.h         timers.h
bootlib.h        loadlib.h        rt11fslib.h      timexlib.h
bootloadlib.h    locale.h         sched.h          trclib.h
bootplib.h       loginlib.h       scsi1lib.h       ttylib.h
bsdsocklib.h     loglib.h         scsi2lib.h       tylib.h
bsdsockmap.h     lstlib.h         scsilib.h        types
bspversion.h     m2lib.h          selectlib.h      types.h
buflib.h         make             semLib.h         u_lib.h
cachelib.h       math.h           semaphore.h      unistd.h
classLib.h       mbuflib.h        sempxshow.h      unldlib.h
connlib.h        mbufsocklib.h    semsmlib.h       usrconfig.h
copyright_wrs.h  memLib.h         seqio.h          usrlib.h
cpluslib.h       memdrv.h         set_null         utime.h
ctype.h          mmulib.h         setjmp.h         va-i960.h
dbglib.h         modulelib.h      shelllib.h       va-mips.h
dbglibnew.h      mountlib.h       sigcodes.h       va-ppc.h
dbgrpclib.h      mqpxshow.h       sigevent.h       va-sparc.h
dirent.h         mqueue.h         siglib.h         varargs.h
dlllib.h         msgqlib.h        signal.h         vector.h
dma.h            msgqsmlib.h      simlib.h         version.h
dosfschklib.h    net              siolib.h         vme.h
dosfslib.h       netdrv.h         slllib.h         vmlib.h
drv              netinet          smdlllib.h       vwModNum.h
dsmlib.h         netlib.h         smlib.h          vxLib.h
ecoff.h          netshow.h        smmemlib.h       vxWorks.h
ecoffsyms.h      new.h.wrs        smnamelib.h      vxwErr.h
elf.h            nfsdlib.h        smobjlib.h       vxwLoadLib.h
elftypes.h       nfsdrv.h         smpktlib.h       vxwLstLib.h
envlib.h         nfslib.h         smutillib.h      vxwMemPartLib.h
errno.h          objLib.h         snmpdlib.h       vxwMsgqLib.h
errnolib.h       passfslib.h      socket.h         vxwObject.h
esf.h            pathlib.h        sockfunc.h       vxwRngLib.h
etherlib.h       pinglib.h        socklib.h        vxwSemLib.h
evtbufferlib.h   pipedrv.h        spylib.h         vxwSmLib.h
exclib.h         posixname.h      stat.h           vxwSmNameLib.h
fcntl.h          posixshow.h      stdarg.h         vxwSymLib.h
fiolib.h         ppplib.h         stddef.h         vxwTaskLib.h
float.h          private          stddef.h.new     vxwWdLib.h
fpplib.h         proxyarplib.h    stdio.h          wdb
fstream.h        proxylib.h       stdiolib.h       wdlib.h
ftpdlib.h        ptrace.h         stdiostream.h    wtx.h
ftplib.h         ptydrv.h         stdlib.h         wtxerr.h
generic.h        ptylib.h         stream.h         wtxexch.h
hashLib.h        qclass.h         streams          wtxmsg.h
hostlib.h        qfifoglib.h      string.h         wtxrpc.h
hpaout.h         qfifolib.h       strlib.h         wtxtypes.h
icmplib.h        qjoblib.h        strmlib.h        wtxxdr.h
if_bp.h          qlib.h           strstream.h      wvLib.h
if_sl.h          qpribmaplib.h    sun.h            wvTmrLib.h
iflib.h          qprideltalib.h   symLib.h         xdr_bool_t.h
in.h             qpriheaplib.h    symbol.h         xdr_mnt.h
inetlib.h        qprilistlib.h    symsync.h        xdr_nfs.h
intlib.h         qpriltreelib.h   symsynclib.h     xdr_nfsserv.h
ioctl.h          qprinode.h       sys              zbuflib.h
iolib.h          ramdrv.h         syslib.h         zbufsocklib.h
iomanip.h        rawfslib.h       syssymtbl.h
------------------------- clip ---------------------------------------

> 	How to solve it?

 Just copy all your VxWorks headers and all the C libraries into the host platform,
'linux-x86', and try again with a better luck and forgetting all the special rare-
case cross-GCC build instructions...

 BTW, the VxWorks targets have been discussed on the cross-GCC list many times and
one of the earlier active helpers here, David Korn (not the KSH-writer), put some
hand-holding instructions for VxWorks/PPC somewhere on the net...

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list