From: Isaac Dunham <idunham@lavabit.com>
To: pcc-list@ludd.ltu.se
Cc: musl@lists.openwall.com
Subject: Current pcc does not understand #pragma after whitespace
Date: Tue, 27 Nov 2012 22:37:58 -0800 [thread overview]
Message-ID: <20121127223758.485b5083.idunham@lavabit.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 759 bytes --]
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 <idunham@lavabit.com>
[-- Attachment #2: pragmas.diff --]
[-- Type: text/x-diff, Size: 2343 bytes --]
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);
next reply other threads:[~2012-11-28 6:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 6:37 Isaac Dunham [this message]
2012-11-28 10:06 ` Szabolcs Nagy
2012-11-29 10:01 ` Iain Hibbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121127223758.485b5083.idunham@lavabit.com \
--to=idunham@lavabit.com \
--cc=musl@lists.openwall.com \
--cc=pcc-list@ludd.ltu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).