[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preview: portable dumper

From: Charles A. Roelli
Subject: Re: Preview: portable dumper
Date: Sat, 17 Feb 2018 12:53:48 +0100

> Date: Tue, 13 Feb 2018 18:37:43 +0200
> From: Eli Zaretskii <address@hidden>
> CC: address@hidden
> Reply-to: Eli Zaretskii <address@hidden>
> > From: Daniel Colascione <address@hidden>
> > Date: Mon, 12 Feb 2018 12:18:36 -0800
> > 
> > I've pushed the portable dumper to the pdumper Savannah branch. It 
> > should support a fully PIC Emacs.
> Thanks.  I'd urge people to try this branch and report any issues they
> see.

On Apple's version of FSF GCC, I saw these kinds of errors:

  CC       pdumper.o
pdumper.c:63: warning: unknown option after ‘#pragma GCC diagnostic’ kind
pdumper.c: In function ‘dump_reloc_set_offset’:
pdumper.c:289: error: #pragma GCC diagnostic not allowed inside functions
pdumper.c:289: error: #pragma GCC diagnostic not allowed inside functions
pdumper.c:291: error: #pragma GCC diagnostic not allowed inside functions

They're fixed locally with this patch:

diff --git a/src/pdumper.c b/src/pdumper.c
index a05b2c4..844ec25 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -54,7 +54,10 @@
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__APPLE__) /* Apple's old GCC (based
+                                                on FSF's GCC) does not
+                                                support pragmas in
+                                                functions.  */
 # pragma GCC diagnostic error "-Wconversion"
 # pragma GCC diagnostic error "-Wshadow"
 # define ALLOW_IMPLICIT_CONVERSION                       \

Afterwards I had only this error remaining:

pdumper.c: In function ‘dump_anonymous_allocate_posix’:
pdumper.c:4043: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
pdumper.c:4043: error: (Each undeclared identifier is reported only once
pdumper.c:4043: error: for each function it appears in.)

Seems like MAP_ANONYMOUS is not defined on all systems -- I don't know
where to go from there.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]