From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2347 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general,gmane.comp.compilers.pcc Subject: Current pcc does not understand #pragma after whitespace Date: Tue, 27 Nov 2012 22:37:58 -0800 Message-ID: <20121127223758.485b5083.idunham@lavabit.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Tue__27_Nov_2012_22_37_58_-0800_g6u+fitao/m0H.b4" X-Trace: ger.gmane.org 1354084691 31284 80.91.229.3 (28 Nov 2012 06:38:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2012 06:38:11 +0000 (UTC) Cc: musl@lists.openwall.com To: pcc-list@ludd.ltu.se Original-X-From: musl-return-2348-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 28 07:38:24 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TdbHr-0001hK-MA for gllmg-musl@plane.gmane.org; Wed, 28 Nov 2012 07:38:23 +0100 Original-Received: (qmail 5281 invoked by uid 550); 28 Nov 2012 06:38:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5273 invoked from network); 28 Nov 2012 06:38:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=3zCuKT92S7KHrsDpmplRi5csJq5Q6aZmqb2iOrpMu4qZDerAncBsRZ8sG6UhlpNPW93w4gup3AMw2DlBl4/b39Z/EZRr2au68uBSqgY1r8XBYL7PIwRX/0HuB+ksy62OaIF5/OZBAhMtAlmDp9PRGQRdhzPY2r/1bovHtu0I8MY=; h=Date:From:To:Cc:Subject:Message-Id:X-Mailer:Mime-Version:Content-Type; X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2347 gmane.comp.compilers.pcc:2588 Archived-At: This is a multi-part message in MIME format. --Multipart=_Tue__27_Nov_2012_22_37_58_-0800_g6u+fitao/m0H.b4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello all, I tried building musl (0.9.8) with pcc (the Nov. 9 version) and found that it failed to build. After a bit of testing, I discovered that #pragma ... /*in src/fenv/feupdateenv.c */ was breaking the buld because of the whitespace preceding the #pragma directive. I've attached a workaround in musl. Would it be possible to fix this in pcc? I suspect that a number of programs don't expect this... Other files affected are src/math/fma*.c & src/math/nearbyint*.c Once I patch that, build time (time make >/dev/null; agrees with the clock) for a full shared + static set comes out to ~1 min: $ time make >/dev/null real 0m56.694s user 0m26.797s sys 0m25.470s And the shared library works. -- Isaac Dunham --Multipart=_Tue__27_Nov_2012_22_37_58_-0800_g6u+fitao/m0H.b4 Content-Type: text/x-diff; name="pragmas.diff" Content-Disposition: attachment; filename="pragmas.diff" Content-Transfer-Encoding: 7bit diff --git a/src/fenv/feupdateenv.c b/src/fenv/feupdateenv.c index f45ed7c..6bc731e 100644 --- a/src/fenv/feupdateenv.c +++ b/src/fenv/feupdateenv.c @@ -2,7 +2,7 @@ int feupdateenv(const fenv_t *envp) { - #pragma STDC FENV_ACCESS ON +#pragma STDC FENV_ACCESS ON int ex = fetestexcept(FE_ALL_EXCEPT); fesetenv(envp); feraiseexcept(ex); diff --git a/src/math/fma.c b/src/math/fma.c index 17f1cdc..56a269f 100644 --- a/src/math/fma.c +++ b/src/math/fma.c @@ -89,7 +89,7 @@ static int getexp(long double x) double fma(double x, double y, double z) { - #pragma STDC FENV_ACCESS ON +#pragma STDC FENV_ACCESS ON long double hi, lo1, lo2, xy; int round, ez, exy; diff --git a/src/math/fmaf.c b/src/math/fmaf.c index a1c7f4f..fd97f78 100644 --- a/src/math/fmaf.c +++ b/src/math/fmaf.c @@ -37,7 +37,7 @@ */ float fmaf(float x, float y, float z) { - #pragma STDC FENV_ACCESS ON +#pragma STDC FENV_ACCESS ON double xy, result; uint32_t hr, lr; diff --git a/src/math/fmal.c b/src/math/fmal.c index ccbe434..4b57ea6 100644 --- a/src/math/fmal.c +++ b/src/math/fmal.c @@ -162,7 +162,7 @@ static inline struct dd dd_mul(long double a, long double b) */ long double fmal(long double x, long double y, long double z) { - #pragma STDC FENV_ACCESS ON +#pragma STDC FENV_ACCESS ON long double xs, ys, zs, adj; struct dd xy, r; int oround; diff --git a/src/math/nearbyint.c b/src/math/nearbyint.c index f4e8aac..b0ffcc8 100644 --- a/src/math/nearbyint.c +++ b/src/math/nearbyint.c @@ -6,7 +6,7 @@ double nearbyint(double x) { #ifdef FE_INEXACT - #pragma STDC FENV_ACCESS ON +#pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); diff --git a/src/math/nearbyintf.c b/src/math/nearbyintf.c index 092e9ff..c96002b 100644 --- a/src/math/nearbyintf.c +++ b/src/math/nearbyintf.c @@ -4,7 +4,7 @@ float nearbyintf(float x) { #ifdef FE_INEXACT - #pragma STDC FENV_ACCESS ON +#pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); diff --git a/src/math/nearbyintl.c b/src/math/nearbyintl.c index 8285249..7d97b66 100644 --- a/src/math/nearbyintl.c +++ b/src/math/nearbyintl.c @@ -11,7 +11,7 @@ long double nearbyintl(long double x) long double nearbyintl(long double x) { #ifdef FE_INEXACT - #pragma STDC FENV_ACCESS ON +#pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); --Multipart=_Tue__27_Nov_2012_22_37_58_-0800_g6u+fitao/m0H.b4--