This is the mail archive of the gcc@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: libstdc++-v3 without exception/exception segments


This message is inappropirate on this list, which is for discussing
development of GCC. For help using or building GCC please use the
gcc-help list instead. Please take any follow up to that list, thanks.

On 28 November 2012 15:19, Martin Laabs wrote:
> Hello,
>
> I currenty build an arm-elf cross compiler. It is intended to use it
> together with eCos, a small RTOS.
> I want to use the C++ compiler and therefore I want to use the
> libstdc++-v3. Since eCos has no underlying exception support I want to
> disable all exceptions in the libstdc++-v3. This is possible with the
> -fno-exceptions flag during compiling the files of this library.
> However - I was unable to set the enviromental flags and/or configure
> arguments in such a way, that the libstdc++-v3 library is build with the
> -fno-exceptions flag.
> At the moment I use the following enviroment:
>
> CXXFLAGS="-fno-exceptions"
> CFLAGS="-fno-exceptions"
>
> and the following configure call
>
> /usr/tmp/gcc-4.6.3/configure --target=arm-elf --prefix=/usr/local/arm-elf \
>  --enable-interwork --enable-multilib --enable-languages="c,c++" \
>  --enable-target-optspace --with-float=soft --with-newlib \
>   --with-gnu-as --with-gnu-ld \
>   --with-gxx-include-dir=/usr/local/arm-elf/include \
>   -disable-__cxa_atexit --with-gmp=/usr/local/ \
>   --disable-nls
>
> Can you help me figuring out what to change/configure to disable the
> exceptions or to enable the -fno-exceptions flag for the libstdc++-v3 part?
> One way is to modify the Makefile.am in the libstdc++-v3/libsupc++ to
> hardcode the CXXFLAGS. For my feeling however the configure script should
> evaluate the CXXFLAGS enviroment variable to do this decision.

Did you try the documented approach of using --enable-cxx-flags=FLAGS ?
http://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html

You can also rebuild libstdc++ by running 'make CXXFLAGS="..."' in the
libstdc++ build directory


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