This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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++, how to set gcc on a multithread environment ?


Jonathan Wakely wrote:
2009/7/26 Jose Luis Marchetti:
Hi,

After reading gcc documentation and this link:http://gcc.gnu.org/onlinedocs/libstdc++/manual/using_concurrency.html, I am not sure of:

Sorry for interrupting this thread, but I've read the documentation above, and I think I have a problem...
I'm using libstdc++ for a while in an embedded project using an RTOS, but today following the advice in the link I've checked, and the compiler reports "Thread model: single"


Here's the full output: I'm using two compilers, one is an arm-elf-gcc compiled from sources, and reports this:

fede@fede-laptop:~/Documents$ arm-elf-g++ -v
Using built-in specs.
Target: arm-elf
Configured with: ../gcc-4.3.3/configure --target=arm-elf --prefix=/home/fede/Documents/arm-elf-gcc/ --enable-interwork --enable-multilib --with-float=soft --enable-threads --enable-target-optspace --enable-languages=c,c++ --with-newlib --with-headers=../newlib-1.17.0/newlib/libc/include
Thread model: single
gcc version 4.3.3 (GCC)


As you can see I compiled using --enable-threads and thought it was enough.
The other compiler is codesourcery's release of gcc:

fede@fede-laptop:~/Documents$ arm-none-eabi-g++ -v
Using built-in specs.
Target: arm-none-eabi
Configured with: /scratch/julian/lite-respin/eabi/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-eabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-shared --with-newlib --with-pkgversion='Sourcery G++ Lite 2008q3-66' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-headers=yes --with-sysroot=/opt/codesourcery/arm-none-eabi --with-build-sysroot=/scratch/julian/lite-respin/eabi/install/arm-none-eabi --with-gmp=/scratch/julian/lite-respin/eabi/obj/host-libs-2008q3-66-arm-none-eabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian/lite-respin/eabi/obj/host-libs-2008q3-66-arm-none-eabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/julian/lite-respin/eabi/install/arm-none-eabi/bin --with-build-time-tools=/scratch/julian/lite-respin/eabi/install/arm-none-eabi/bin
Thread model: single
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-66)


Even this was compiled with --enable-threads, but reports "Thread model: single"
I guess it is because there's no default thread model for bare metal/RTOS based devices.


Is this going to cause troubles? If yes, anyone has an idea of how to fix this situation?
(Please consider that I'm using many parts of libstdc++, like <vector>, <string>, <list>, <bitset>, <algorithm> and exceptions)



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