[omniORB] Re: Autoconf Abilities [was Installation and Configuration on RedHat
6.0]
Duane Griffin
duane@router.econz.co.nz
Fri, 17 Sep 1999 08:53:14 +1200
Brent Fulgham wrote:
>
> > Can't an autoconf test based on the following be used:
> > g++ -dumpspecs | grep threads
> >
> > I assume (but can't confirm it as I don't have a gcc built without
> > --enable-threads), if the output is empty, then there is no thread
> > support.
> >
> My GCC-2.95.1 on my windows machine (running Cygnus) outputs
> nothing for this test -- I am pretty sure it was built without
> thread support, because the Cygnus tools are not yet complete
> with respect to threading.
>
> BASH.EXE-2.02$ g++ -dumpspecs | grep threads
> BASH.EXE-2.02$
Ah, but you should grep for thread, not threads :)
This is from gcc 2.95.1 built with --enable-threads and --enable-shared:
[duane@duane duane]$ g++ -dumpspecs | grep thread
%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
%{shared: -lc} %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread}
%{profile:-lc_p} %{!profile: -lc}}
This is from the stock RH5.2 gcc:
%[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} %{profile:-lc_p}
%{!profile: -lc}}
And this is from the stock RH6.0 gcc:
%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
%{shared: -lc --version-script libgcc.map%s} %{!shared:
%{mieee-fp:-lieee} %{pthread:-lpthread} %{profile:-lc_p} %{!profile:
-lc}}
You'll notice there is only one section that differs, but I have no idea
what the significance of this is :) Does anyone have a better idea of
what the results mean?
Cheers,
Duane.