Building arm-elf cross under GCC 3.0.4 on HP-UX 11.00

Jepsen Hans Peter hans_peter_jepsen@Danfoss.com
Thu Mar 21 01:54:00 GMT 2002


Hello Albert

You wrote:

> I'm attempting to build an arm-elf cross-compiler with GCC 3.0.4 under
> HP-UX 11.00. 
  ...
> When trying to build newlib 1.9.0:
  ...
>   *** The command 'gcc -o conftest -g -O2   conftest.c' failed.
> 
> Any ideas? I believe that crt0 is part of newlib but if I cannot built
> newlib, how do I get crt0?

I also had problems building gcc-3.0.4 on HP-UX 10.20, although other
problems that then one you describe. At the end I succedded to build it with
a modified version af build-crossgcc.sh script, downloaded from
crossgcc.billgatliff.com.

The modified version is attached. It might help you.

Another thing is, that the version of gcc installed on the HP-UX host used
for building the cross compiler, has to be version 3.0.0 or higher. 

Yet another thing is, that when I try to build several times from the same
distro directory, the build failes with this error message:
gmake[3]: *** No rule to make target
`/home/hpj/work/gcc-3.0.4/libstdc++-v3/include/std/algorithm', needed by
`stamp-std'.  Stop.
gmake[3]: Leaving directory
`/home/hpj/work/build-gcc/arm-elf/libstdc++-v3/include'

I found that during the build some files where removed from the distro
directory structure. Maybe moved to the build directory structure.

Now a few comments on the most important modification to the build-crossgcc
script, which I did:

1. Added MYMAKE=gmake and replaced make with ${MYMAKE}
Because: The HP-UX make can not handle GNU Makefile extensions.

2. Untar-ing of gcc distro files allows that you have gcc-core-3.0.4.tar.gz
and 
gcc-g++-3.0.4.tar.gz in stead of gcc-3.0.4.tar.gz.

3. configure is called with absolut path, ie:
   ../${GCCDISTO}/configure --target=$TARGET .....
is replaced with
   ${ROOTDIR}/${GCCDISTO}/configure --target=$TARGET ...
This was needed because the original form made building of libstdc++ fail
likes this:
gmake[6]: Entering directory
`/home/hpj/work/build-gcc/arm-elf/thumb/libstdc++-v3/include'
gmake[6]: Nothing to be done for `install-exec-am'.
../../../../gcc-3.0.4/libstdc++-v3/../install-sh -c -d
/opt/local/gcc-3.0.4/arm-elf/tmp/include/g++-v3
gmake[6]: ../../../../gcc-3.0.4/libstdc++-v3/../install-sh: Command not
found

The problem is that the INSTALL macro in the Makefile in this directory is
overridden by an environment variable set in the Makefile in the parent
directory.


4. Configuration of gcc was extended with the option 
   --with-headers=${PREFIX}/${TARGET}/include
Without this I got the error:
In file included from
/home/hpj/work/build-gcc/arm-elf/libstdc++-v3/include/cstdlib:31,
                 from
/home/hpj/work/gcc-3.0.4/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/home/hpj/work/build-gcc/arm-elf/libstdc++-v3/include/bits/std_cstdlib.h:75:
`div_t'
   not declared
and several similar lines.


kind regards

Hans Peter




-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-crossgcc.sh.tar.gz
Type: application/octet-stream
Size: 4741 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20020321/e14f5cac/attachment.obj>
-------------- next part --------------
------
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