Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Feb 2013 19:09:10 -0800 (PST)
From:      Pedro Giffuni <pfg@freebsd.org>
To:        Dimitry Andric <dim@FreeBSD.org>, Andriy Gapon <avg@FreeBSD.org>
Cc:        "toolchain@FreeBSD.org" <toolchain@FreeBSD.org>, "stephen@FreeBSD.org" <stephen@FreeBSD.org>
Subject:   Re: base gcc and _GLIBCXX_USE_C99
Message-ID:  <1359947350.91372.YahooMailNeo@web162105.mail.bf1.yahoo.com>
In-Reply-To: <510EE5D2.4050409@FreeBSD.org>
References:  <5106953E.2020907@FreeBSD.org> <510BBCAD.3070705@FreeBSD.org> <510BD53D.1070209@FreeBSD.org> <510EE5D2.4050409@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Dimitry;=0A=0A=0A----- Messaggio originale -----=0A> Da: Dimitry Andr=
ic=A0=0A=0A> I had a bit more in-depth look at our current libstdc++ config=
uration.=0A> =0A> I took the original gcc 4.2.1 release tarball, modified a=
 few autoconf=0A> related scripts to cope with "freebsd10.0" being the curr=
ent version,=0A> and did a full three-stage build, though only targeting C =
and C++.=0A> =0A> The libstdc++ configure script in 4.2.1 does detect a few=
 new features=0A> that are not in our shipping config.h, but is does not de=
tect any=0A> different settings regarding C99.=0A>=0A=0ANot sure if libstdc=
++ from gcc42 sets --enable-c99 by default.=0A=A0=A0=0A> The reason it does=
 not turn on _GLIBCXX_USE_C99, is that not all of the=0A> C99 requirements =
are met, specifically <complex.h> checks fail:=0A> =0A> =A0 checking for IS=
O C99 support in <math.h>... yes=0A> =A0 checking for ISO C99 support in <c=
omplex.h>... no=0A> =A0 checking for ISO C99 support in <stdio.h>... yes=0A=
> =A0 checking for ISO C99 support in <stdlib.h>... yes=0A> =A0 checking fo=
r ISO C99 support in <wchar.h>... yes=0A> =A0 checking for fully enabled IS=
O C99 support... no=0A> =0A> The exact failure testcase goes like this:=0A>=
 =0A> =A0 configure:7435: checking for ISO C99 support in <complex.h>=0A> =
=A0 configure:7492:=A0 /home/dim/obj/gcc-4.2.1/./gcc/xgcc -shared-libgcc =
=0A> -B/home/dim/obj/gcc-4.2.1/./gcc -nostdinc++ =0A> -L/home/dim/obj/gcc-4=
.2.1/i386-unknown-freebsd10.0/libstdc++-v3/src =0A> -L/home/dim/obj/gcc-4.2=
.1/i386-unknown-freebsd10.0/libstdc++-v3/src/.libs =0A> -B/home/dim/ins/gcc=
-4.2.1/i386-unknown-freebsd10.0/bin/ =0A> -B/home/dim/ins/gcc-4.2.1/i386-un=
known-freebsd10.0/lib/ -isystem =0A> /home/dim/ins/gcc-4.2.1/i386-unknown-f=
reebsd10.0/include -isystem =0A> /home/dim/ins/gcc-4.2.1/i386-unknown-freeb=
sd10.0/sys-include -c -g -O2=A0 =0A> conftest.cc >&5=0A> =A0 conftest.cc: I=
n function 'int main()':=0A> =A0 conftest.cc:41: error: 'clogf' was not dec=
lared in this scope=0A> =A0 conftest.cc:47: error: 'cpowf' was not declared=
 in this scope=0A> =A0 conftest.cc:54: error: 'clog' was not declared in th=
is scope=0A> =A0 conftest.cc:60: error: 'cpow' was not declared in this sco=
pe=0A> =A0 conftest.cc:64: error: 'ccosl' was not declared in this scope=0A=
> =A0 conftest.cc:65: error: 'ccoshl' was not declared in this scope=0A> =
=A0 conftest.cc:66: error: 'cexpl' was not declared in this scope=0A> =A0 c=
onftest.cc:67: error: 'clogl' was not declared in this scope=0A> =A0 confte=
st.cc:68: error: 'csinl' was not declared in this scope=0A> =A0 conftest.cc=
:69: error: 'csinhl' was not declared in this scope=0A> =A0 conftest.cc:71:=
 error: 'ctanl' was not declared in this scope=0A> =A0 conftest.cc:72: erro=
r: 'ctanhl' was not declared in this scope=0A> =A0 conftest.cc:73: error: '=
cpowl' was not declared in this scope=0A> =A0 configure:7498: $? =3D 1=0A>=
=A0=0A=0AThose are surely in this list:=0Ahttps://wiki.freebsd.org/MissingM=
athStuff=0A=0AI think we are using stubs for libc++.=0A=0A> So until we act=
ually implement and declare those functions, we should=0A> probably not ena=
ble _GLIBCXX_USE_C99_COMPLEX and _GLIBCXX_USE_C99.=0A> =0A> I have attached=
 a diff of the other changes that can be applied on our=0A> current libstdc=
++ config file, as detected by the configure script.=A0 I=0A> will probably=
 commit that soonish, if there are no objections.=0A>=A0=0A=0AThanks, that =
looks useful. Of course if=A0GLIBCXX_USE_C99 didn't necessarily=0Aimply=A0_=
GLIBCXX_USE_C99_COMPLEX it would be useful too.=0A=0A> As to the missing co=
mplex functions, I am not sure.=A0 Maybe these can be=0A> imported from som=
ewhere else, e.g. NetBSD?=A0 This is probably something=0A> to ask the lib/=
msun specialists...=0A>=A0=0A=0A=0AThere is a freebsd-numerics list for peo=
ple working on it.=0A=0AI am using the C++ complex stuff from boost and the=
re were=0Arecent fixes done by Stephen Montgomery-Smith (CC'd)=0Aand it loo=
ks like he has a FreeBSD implementation in the works.=0A=0AI will open a PR=
 as a reminder ;).=0A=0Acheers,=0A=0APedro.=0A



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1359947350.91372.YahooMailNeo>