This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: build error: error: '_U' was not declared in this scope


M R Swami Reddy wrote:

Hello,

I am building the libstdc++-v3 for cr16-elf traget. During the build process, the below error displayed:
===
/local/user/swami/cpp-cr16/src/CR_R_2007-08-24_11-34-56/b-native-gcc-4.1.2/cr16-elf/libstdc++-v3/include/cr16-elf/bits/ctype_base.h:47: error: '_L' was not declared in this scope
/local/user/swami/cpp-cr16/src/CR_R_2007-08-24_11-34-56/b-native-gcc-4.1.2/cr16-elf/libstdc++-v3/include/cr16-elf/bits/ctype_base.h:48: error: '_U' was not declared in this scope


Configure options are:
====
--disable-libssp --enable-languages=c,c++ --enable-locale=gnu --with-gnu-as --with-gnu-ld --disable-nls --with-system-zlib --enable-sjlj-exceptions --host=i686-pc-linux-gnu --disable-shared --enable-cxx-flags='-fexceptions -frtti' --with-included-gettext --oldincludedir=/usr/include --with-newlib --libdir=/local/user/swami/sitel/download/tools/rel/cr16-linux-uclibc/usr/lib

Quite many options but where is the only obligatory (cannot be guessed) "--target=cr16-elf" ?

The '--oldincludedir' (never used here) seems to copy the pointed
headers as the target headers, but why on earth you would like to copy
the '/usr/include' headers (for Linux/x86) to be the target headers?
Can one replace diesel with usual gasoline in a diesel car and use any
target headers for any target?  I wouldn't try either...

Then... How on earth the '.../cr16-linux-uclibc/usr/lib' libraries
which seem to be for Linux-uclibc/CR16, could be used as the target
libraries for 'cr16-elf' ?

If your goal is to use newlib, its headers and libraries, built for
'cr16-elf', then just use newlib! Only the generic headers copied
from '.../newlib/libc/include' in the newlib sources, into the '/usr/local/cr16-elf/include', and then making a symlink,
'/usr/local/cr16-elf/sys-include' to point to the '.../include',
should enable your build to succeed nicely because of using the
'--with-newlib'. This option EXPECTS one using just newlib headers
and then all those '_L', '_U' etc. things being defined in them...


You didn't use any '--prefix=$prefix' either, so the default prefix,
'/usr/local' will be used to define the '$prefix/$target' aka
'$tooldir' for the target stuff.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]