public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Tutorial 4
@ 2002-06-25 15:49 Mark Butcher
  2002-06-26  7:55 ` Peter Barada
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Butcher @ 2002-06-25 15:49 UTC (permalink / raw)
  To: gcc; +Cc: gcc-help

Hi all GCC Gurus out there !!

The saga continues... Here's the latest news:
- I am quite convinced that I know what I am doing and have writen a script
especially for my favorite target (the Motorola mcore). I have posted it
seperately (for anyone interested to use or test) so as not to make this
mail too much longer that it already is.
- The script is based on information received from several sources (many
thanks to those who have been giving tips over the previous weeks
(months?))
- The script seems to work fine up to the point where the build of the full
gcc fails to compile *.cc library files
- At the point where it fails, all binutil files for the target are in
/usr/local/bin, including the (simple)gcc for the target
- Newlib has been successfully built and is in /usr/local/mcore
(lib/crt0.o, libc.a etc)

- But something goes wrong in libstdc++ when trying to compile c++ sources
as shown in this extract below

*******************(first part ok to show that things are working as
expected up to the failure)**********************************************
make[3]: Entering directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/libio'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/libio'
Making all in libmath
make[3]: Entering directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/libmath'
/bin/sh ../libtool --mode=compile /usr/local/src/gnu/BUILD/gcc/gcc/xgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-DHAVE_CONFIG_H -I. -I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libmath -I.. 
    -g -O2 -c /usr/local/src/gnu/gcc-3.1/libstdc++-v3/libmath/stubs.c
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/
-nostdinc -B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-DHAVE_CONFIG_H -I. -I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libmath -I..
-g -O2 -c /usr/local/src/gnu/gcc-3.1/libstdc++-v3/libmath/stubs.c -o
stubs.o
/bin/sh ../libtool --tag CC --mode=link
"/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/
-nostdinc -B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include"  -g -O2 
-o libmath.la   stubs.lo  
mkdir .libs
mcore-elf-ar cru .libs/libmath.a  stubs.o
mcore-elf-ranlib .libs/libmath.a
creating libmath.la
(cd .libs && rm -f libmath.la && ln -s ../libmath.la libmath.la)
make[3]: Leaving directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/libmath'
Making all in libsupc++
make[3]: Entering directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/libsupc++'
rm -f cxa_demangle.c
ln -s /usr/local/src/gnu/gcc-3.1/libstdc++-v3/../libiberty/cp-demangle.c
cxa_demangle.c
/bin/sh ../libtool --tag CC --tag disable-shared --mode=compile
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/
-nostdinc -B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++   -g -O2
-fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once  -g    -DIN_GLIBCPP_V3 -Wno-error -c
cxa_demangle.c
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/
-nostdinc -B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -g -DIN_GLIBCPP_V3 -Wno-error -c
cxa_demangle.c -o cxa_demangle.o
cc1.exe: warning: ignoring command line option '-fno-implicit-templates'
cc1.exe: warning: (it is valid for C++ but not the selected language)
cxa_demangle.c: In function `string_list_new':
cxa_demangle.c:418: warning: implicit declaration of function `malloc'
cxa_demangle.c: In function `substitution_add':
cxa_demangle.c:589: warning: implicit declaration of function `realloc'
cxa_demangle.c: In function `template_arg_list_delete':
cxa_demangle.c:688: warning: implicit declaration of function `free'
cxa_demangle.c: In function `demangle_char':
cxa_demangle.c:975: warning: implicit declaration of function `strdup'
cxa_demangle.c:975: warning: assignment makes pointer from integer without
a cast
cxa_demangle.c: In function `demangle_number':
cxa_demangle.c:1397: warning: implicit declaration of function `strtol'
cxa_demangle.c: In function `demangle_identifier':
cxa_demangle.c:1481: warning: implicit declaration of function `strlen'
cxa_demangle.c:1484: warning: implicit declaration of function `strncmp'
cxa_demangle.c: In function `demangle_v3_with_details':
cxa_demangle.c:3877: warning: implicit declaration of function `abort'
cxa_demangle.c: At top level:
cxa_demangle.c:3866: warning: `demangle_v3_with_details' defined but not
used
/bin/sh ../libtool --tag CXX --tag disable-shared --mode=compile
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++ 
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++   -g -O2
-fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once  -g    -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_op.cc
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -g -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_op.cc -o del_op.o
/bin/sh ../libtool --tag CXX --tag disable-shared --mode=compile
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++ 
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++   -g -O2
-fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once  -g    -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_opnt.cc
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -g -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_opnt.cc -o del_opnt.o
/bin/sh ../libtool --tag CXX --tag disable-shared --mode=compile
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++ 
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++   -g -O2
-fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once  -g    -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_opv.cc
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -g -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_opv.cc -o del_opv.o
/bin/sh ../libtool --tag CXX --tag disable-shared --mode=compile
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++ 
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++   -g -O2
-fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once  -g    -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_opvnt.cc
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -g -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/del_opvnt.cc -o
del_opvnt.o
rm -f dyn-string.c
ln -s /usr/local/src/gnu/gcc-3.1/libstdc++-v3/../libiberty/dyn-string.c
dyn-string.c
/bin/sh ../libtool --tag CC --tag disable-shared --mode=compile
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/
-nostdinc -B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++   -g -O2
-fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once  -g    -DIN_GLIBCPP_V3 -Wno-error -c
dyn-string.c
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/
-nostdinc -B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -g -DIN_GLIBCPP_V3 -Wno-error -c
dyn-string.c -o dyn-string.o
cc1.exe: warning: ignoring command line option '-fno-implicit-templates'
cc1.exe: warning: (it is valid for C++ but not the selected language)
dyn-string.c: In function `__cxa_dyn_string_init':
dyn-string.c:77: warning: implicit declaration of function `malloc'
dyn-string.c: In function `__cxa_dyn_string_new':
dyn-string.c:107: warning: implicit declaration of function `free'
dyn-string.c: In function `__cxa_dyn_string_resize':
dyn-string.c:171: warning: implicit declaration of function `realloc'
dyn-string.c: In function `__cxa_dyn_string_copy':
dyn-string.c:206: warning: implicit declaration of function `abort'
dyn-string.c:212: warning: implicit declaration of function `strcpy'
dyn-string.c: In function `__cxa_dyn_string_copy_cstr':
dyn-string.c:227: warning: implicit declaration of function `strlen'
dyn-string.c: In function `__cxa_dyn_string_insert':
dyn-string.c:285: warning: implicit declaration of function `strncpy'
dyn-string.c: In function `__cxa_dyn_string_eq':
dyn-string.c:441: warning: implicit declaration of function `strcmp'
/bin/sh ../libtool --tag CXX --tag disable-shared --mode=compile
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++ 
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++   -g -O2
-fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once  -g    -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/eh_alloc.cc
/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -shared-libgcc
-B/usr/local/src/gnu/BUILD/gcc/gcc/ -nostdinc++
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src
-L/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/src/.libs -nostdinc
-B/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/ -isystem
/usr/local/src/gnu/BUILD/gcc/mcore-elf/newlib/targ-include -isystem
/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
-fdiagnostics-show-location=once -g -c
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/eh_alloc.cc -o eh_alloc.o
In file included from
/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/eh_alloc.cc:34:
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:86:
`div_t' 
   not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:87:
`ldiv_t
   ' not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:97:
`div' 
   not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:102:
`ldiv' 
   not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:104:
`mblen
   ' not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:105: `
   mbstowcs' not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:106: `
   mbtowc' not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:115: `
   wcstombs' not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:116: `
   wctomb' not declared
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:122:
syntax 
   error before `(' token
make[3]: *** [eh_alloc.lo] Error 1
make[3]: Leaving directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/libsupc++'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory
`/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2
***************************************************************************
***************


Now..
/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib is a
shortcut to 
C:\cygwin\usr\local\src\gnu\gcc-3.1\libstdc++-v3\include\c_std\std_cstdlib.
h in which the problems are found.

Here is an extract around where it is failing:

************************************ extract from -
gcc-3.1\libstdc++-v3\include\c_std\std_cstdlib.h **************
...
#include <stdlib.h>

// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
#undef abort
#undef abs
#undef atexit
#undef atof
#undef atoi
#undef atol
#undef bsearch
#undef calloc
#undef div
#undef exit
#undef free
#undef getenv
#undef labs
#undef ldiv
#undef malloc
#undef mblen
#undef mbstowcs
#undef mbtowc
#undef qsort
#undef rand
#undef realloc
#undef srand
#undef strtod
#undef strtol
#undef strtoul
#undef system
#undef wcstombs
#undef wctomb

namespace std 
{
  using ::div_t;     /* line 86 */
  using ::ldiv_t;    /* line 87 */

  using ::abort;
  using ::abs;
  using ::atexit;
  using ::atof;
  using ::atoi;
  using ::atol;
  using ::bsearch;
  using ::calloc;
  using ::div;       /* line 97 */
  using ::exit;
  using ::free;
  using ::getenv;
  using ::labs;
  using ::ldiv;      /* line 102 */
  using ::malloc;
  using ::mblen;
  using ::mbstowcs;
  using ::mbtowc;
  using ::qsort;
  using ::rand;
  using ::realloc;
  using ::srand;
  using ::strtod;
  using ::strtol;
  using ::strtoul;
  using ::system;
  using ::wcstombs;
  using ::wctomb;

  inline long 
  abs(long __i) { return labs(__i); }

  inline ldiv_t
  div(long __i, long __j) { return ldiv(__i, __j); }   /* line 122 */
} 
...
***************************************************************************
************


So all seems to be working fine up to this point and I can see no obvious
set up errors (for example libraries or headers not being found).
This leads me to ask a few of questions:
1. Is there some other setting which I have missed (all settings are
visible in mcore build script - in seperate mail) ?
2. Is there really a problem with the source files (I don't really
understand the compilation error at the moment)
3. Is the failing library only needed when compiling c++ programs ?
4. If only the c functionality (not c++) is required, could this library be
simply ignored, or would it be best to compile with only c language option
?

I will try the build process with another target tomorrow (with build times
of 8 hours on the home PC, experimentation is quite slow..)

Any comments from the wise ??

Regards

Mark in Switzerland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tutorial 4
  2002-06-25 15:49 Tutorial 4 Mark Butcher
@ 2002-06-26  7:55 ` Peter Barada
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Barada @ 2002-06-26  7:55 UTC (permalink / raw)
  To: M_J_BUTCHER; +Cc: gcc, gcc-help


>- But something goes wrong in libstdc++ when trying to compile c++ sources
>as shown in this extract below
>
>/usr/local/src/gnu/gcc-3.1/newlib/libc/include -B/usr/local/mcore-elf/bin/
>-B/usr/local/mcore-elf/lib/ -isystem /usr/local/mcore-elf/include
>-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../gcc
>-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/../include
>-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/mcore-elf
>-I/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include
>-I/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++ -g -O2
>-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline
>-fdiagnostics-show-location=once -g -c
>/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/eh_alloc.cc -o eh_alloc.o
>In file included from
>/usr/local/src/gnu/gcc-3.1/libstdc++-v3/libsupc++/eh_alloc.cc:34:
>/usr/local/src/gnu/BUILD/gcc/mcore-elf/libstdc++-v3/include/cstdlib:86:
>`div_t' 
>   not declared
>
>I will try the build process with another target tomorrow (with build times
>of 8 hours on the home PC, experimentation is quite slow..)
>
>Any comments from the wise ??

I've seen the 'ldiv_t undeclared' problem more than once before:
http://gcc.gnu.org/ml/gcc/2002-02/msg00644.html
http://gcc.gnu.org/ml/gcc/2002-04/msg00908.html

What I have determined is that if a build failed for some reason,
executing a 'make clean ; make ; make install' for the particular
component doesn't always work since the 'make clean' doesn't remove
the *installed* components, or *all* of the config files, so when the
build occurs, it fails again in the same strange way.

What I have found that works is to: 

1) remove *all* the installed components including binutils, gcc and newlib
2) remove *all* of the object directory structures where the tools were
   built
3) rexecute the script which configures and builds the tools

This is the reason that I pick a directory to hole *everything*
installed by a particularly configured toolchain as well as a seperate
directory to hold all of the object directory structures.  If an error
happens, I just blow away the object directory, the installed
directory, and start over.  Fortunately for me it only takes 15
minutes to build it all over again on Linux.

In your case, you could just change PREFIX and remove
${SRC_ROOT}/BUILD and try again to see if it will complete.

Hope this helps...

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tutorial 4
  2002-06-26 14:58 Mark Butcher
@ 2002-06-26 15:50 ` Peter Barada
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Barada @ 2002-06-26 15:50 UTC (permalink / raw)
  To: M_J_BUTCHER; +Cc: Peter.Barada, gcc, gcc-help


>I would be very interested to know whether the scrips works in a Linux
>environment ! It would certainly be interesting if there are some
>environment dependencies.

No it doesn't.  In fact, my script doesn't work either, using gcc-3.1,
binutils-2.12.1, and newlib-1.10.0, all with the same 'ldiv_t not
declared' while building eh_alloc.cc.  So its not your script...

I'll have to start looking into why my script builds a c++ copmiler
using my modified version of gcc-3.0.4, but failes on gcc-3.1, and
I'll check on whether it works on a stock gcc-3.0.4

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tutorial 4
@ 2002-06-26 14:58 Mark Butcher
  2002-06-26 15:50 ` Peter Barada
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Butcher @ 2002-06-26 14:58 UTC (permalink / raw)
  To: Peter Barada; +Cc: gcc, gcc-help

Hi Peter

Thanks for your comments. In fact I have got into the habit of trashing
everything before trying a build - yesterday I completely deleted all build
file and the tool directories (like a fresh install) and the error was
identical - this on two differenct computers (using cygwin shell - under
Windows 98 and Window NT).

It looks as though we are more or less in agreement that the build method
is basically correct and like you, being a pure c-programmer (with just a
little c++ experience) it means studying the language some more to
understand the problem.

I would be very interested to know whether the scrips works in a Linux
environment ! It would certainly be interesting if there are some
environment dependencies.

In the meantime I'll get my head down in my "Now I'm going to learn C++
book"...... (just noticed I took it in to the office so it will have to
wait until tomorrow).

Cheers

Mark

PS. I read your posting where you seem to have had an identical problem -
did you not have any response which may aid understanding the root-cause ?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-06-26 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-25 15:49 Tutorial 4 Mark Butcher
2002-06-26  7:55 ` Peter Barada
2002-06-26 14:58 Mark Butcher
2002-06-26 15:50 ` Peter Barada

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).