bootstrap gcc still not thread-smart -- the details
Khem Raj
kraj@mvista.com
Wed Nov 9 22:25:00 GMT 2005
You need to have thread support in bootstrap GCC to compile NPTL
--enable-threads=posix is the option you should add to your configure
command and remove --enable-threads and you dont need the newlib options
if you are compiling glibc.
Robert P. J. Day wrote:
> ok, based on mike's advice so far, here's the story. first, the
>sample source file mike sent to try to compile:
>
>extern __thread int i;
>
>int main() {
>
> return 0;
>}
>
> after i build my bootstrap gcc, here's the result (running from
>within the gcc-core-prefix directory):
>
>$ ./*gcc -c /tmp/thread.c
>/tmp/thread.c:1: error: thread-local storage not supported for this
>target
>
> ok, so now we know i don't have thread support. here's the stage of
>my script that builds the bootstrap gcc:
>
> cd ${BUILD_DIR}/build-gcc-core
> ${GCC_SRC_DIR}/configure \
> --host=${HOST} \
> --target=${TARGET} \
> --prefix=${CORE_PREFIX} \
> --with-local-prefix=${SYSROOT_DIR} \
> --with-sysroot=${SYSROOT_DIR} \
> --without-headers \
> --without-libs \
> --disable-multilib \
> --with-newlib \
> --disable-nls \
> --disable-shared \
> --enable-threads \
> --enable-symvers=gnu \
> --disable-__cxa_atexit \
> --enable-languages=c
>
> make all-gcc install-gcc
>
>and here's the bootstrap gcc and its build options:
>
>Using built-in specs.
>Target: sh3eb-unknown-linux-gnu
>Configured with: /home/rpjday/unpack/gcc-4.0.2/configure
>--host=i686-pc-linux-gnu --target=sh3eb-unknown-linux-gnu
>--prefix=/home/rpjday/results/sh3eb/build/gcc-core-prefix
>--with-local-prefix=/home/rpjday/results/sh3eb/tools/sh3eb-unknown-linux-gnu/sys-root
>--with-sysroot=/home/rpjday/results/sh3eb/tools/sh3eb-unknown-linux-gnu/sys-root
>--without-headers --without-libs --disable-multilib --with-newlib
>--disable-nls --disable-shared --enable-threads --enable-symvers=gnu
>--disable-__cxa_atexit --enable-languages=c
>Thread model: posix
>gcc version 4.0.2
>
>
> i really don't know as much about threads as i would like so it may
>be that there's something obviously stupid about what i've done. is
>"posix" the right thread model for the bootstrap gcc? have i missed a
>critical option somewhere?
>
> sorry to drag this out but i *really* want to get this working.
>
>rday
>
>------
>Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
>Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
>
>
>
--
Khem Raj <kraj@mvista.com>
MontaVista Software, Inc.
www.mvista.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list