This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I try to generate the libstdc++-2.90.6 for a stand-alone ARM processor environment (with the ELF binary format) from a Solaris 2.6 workstation.
I successfully generated the following separate packages: binutils-2.10.1, gcc-2.95.2, newlib-1.8.2 and gdb-5.0 (configuring them with the following options: --target=arm-elf, --prefix=<path to private install directory>, --with-newlib, and --with-headers=<path to newlib-1.8.2/newlib/libc/include>). I buillt the packages into separate directories.
At this step, I can compile an "hello world" C program, link it with the stand-alone ARM simulator library provided by gdb-5.0 and run it under the target simulator of gdb-5.0. And it works !!!
For libstdc++-2.90.6, I encountered some difficulties ...
1st scheme : configure and build this package as the other ones.
After configuring this package with the same options than the previous
packages, I built and install sucessfully the library and the corresponding
include files. But, using arm-elf-objdump (generated by binutils) and the
native one (already installed on my system), I discovered that the libstdc++
library was built for the native sparc-sun-solaris , not for the arm-elf
target !!!
Unlike other packages, the configured Makefile of libstdc++-2.90.6
did not refer to the ARM target tools installed by binutils and gcc. Does
the "--target=arm-elf" option of the "configure" script shell work for
libstdc++-2.90.6 ?
2nd scheme : use the tools put in the <install-path>/arm-elf/bin
directory.
By setting the path of this directory in first position of the PATH
environment variable, I use the cross tools (ar, as, gcc, ld, nm, ranlib
and strip).
I try to re-configure and re-build libstdc++-2.90.6 (restarting from
the downloaded packed file). The "configure" script shell crashed during
the checking step.
The last output/error traces were:
checking for wcslen... no
checking for wmemchr... no
checking for wmemcmp... no
checking for wmemcpy... no
checking for wmemmove... no
checking for wmemset... no
checking for wchar.h... no
../libstdc++-2.90.6/configure: test: argument expected
make: *** No rule to make target `all'. Stop.
The last "config.log" lines were:
configure:2672: checking for wchar.h
configure:2682: gcc -E conftest.c >/dev/null 2>conftest.out
configure:2678: wchar.h: No such file or directory
configure: failed program was:
#line 2677 "configure"
#include "confdefs.h"
#include <wchar.h>
After analysing the "configure" script shell, I locate, into the
following lines, the problem:
cat > conftest.$ac_ext <<EOF
#line 2700 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t teststate;
; return 0; }
EOF
if { (eval echo configure:2707: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5;
}; then
rm -rf conftest*
use_native_mbstatet=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
use_native_mbstatet=no
fi
rm -f conftest*
else
echo "$ac_t""no" 1>&6
<<<=== #1 - IN THIS CASE, use_native_mbstatet is never set
fi
if test $use_native_mbstatet = "no"; then <<<===
#2 - And the test crashes the shell ...
cat >> confdefs.h <<\EOF
#define _GLIBCPP_NEED_MBSTATE_T 1
EOF
echo "configure: warning: "standard header wchar.h does not
declare the type m
bstate_t"" 1>&2
fi
After patching the script by adding "use_native_mbstatet=no"
after the #1 line, I was able to reconfigure correctly the package but
the make stopped very quickly:
make all-recursive
make[1]: Entering directory `/lavalette/gnu/build-libstdc++-2.90.6'
Making all in math
make[2]: Entering directory `/lavalette/gnu/build-libstdc++-2.90.6/math'
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../libstdc++-2.90.6/math
-I.. -g -O2 -c ../../libstdc++-2.90.6/math/signbit.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I../../libstdc++-2.90.6/math -I.. -g -O2
-c -fPIC -DPIC ../../libstdc++-2.90.6/math/signbit.c -o .libs/signbit.lo
In file included from ../../libstdc++-2.90.6/math/mathconf.h:234,
from ../../libstdc++-2.90.6/math/signbit.c:32:
../../libstdc++-2.90.6/math/complex-stub.h:90: conflicting types
for `nan'
/lavalette/gnuInstall/lib/gcc-lib/arm-elf/2.95.2/include/math.h:71:
previous declaration of `nan'
make[2]: *** [signbit.lo] Error 1
make[2]: Leaving directory `/lavalette/gnu/build-libstdc++-2.90.6/math'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/lavalette/gnu/build-libstdc++-2.90.6'
make: *** [all-recursive-am] Error 2
At this stage, and after analysing the error (I patched and obtained other errors, few lines later ...), I feel lost. I have got the feeling that libstdc++ cannot work with newlib ... or something like that.
Thanks for your help.
Pierre.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |