Cannot compile with gcc 4.8

Sven Willenberger sven@dmv.com
Mon Jun 16 03:55:51 UTC 2014



On Sun, 15 Jun 2014 07:06:25 GMT
Vernon Schryver <vjs@rhyolite.com> wrote:
> 
> 
> I think that putting _FORTIFY_SOURCE into CPPFLAGS is a bug in the
> Arch Linux packaging system.
> 
> I also think that checking compiler optimzation levels in cpp is a gcc
> bug, even there is no way to know whether cpp is running by itself 
> (including as gcc -E) or as a C compiler pre-processor.
> 
> Judging from a little Google searching, this will be a widespread
> problem as more Linux distributions get the new gcc features.h and if
> they make the same choice as Arch Linux of treating -D_FORTIFY_SOURCE
> as a pre-preprocessor setting (CPPFLAGS) instead of a compiler
> setting (CFLAGS).  By "widespread", by which I mean not just DCC.
> 
> 

Reading through this I tried to add -O2 to the CPPFLAGS so that it
reads:
CPPLAGS="-D_FORTIFY_SOURCE=2 -O2"
to makepkg.conf and tried to build the DCC package. Long story short,
it was successful. I would suggest to the package maintainer that he
simply add CPPFLAGS+="-O2" to his own build so as not to clash with the
system makepkg (or simply change to CPPFLAGS="-U_FORTIFY_SOURCE")

I will leave the system-wide package making flags up to the developers
of Arch (as typically they would be the ones actually making packages.)
There are many packages that are community added (such as DCC) and as
this issue starts to crop up more, this thread may server as a good
frame of reference for "fixes".


-- 
Sven Willenberger
Delmarva Online

key:    http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xCAB7246B
key-id: 0xCAB7246B

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.rhyolite.com/pipermail/dcc/attachments/20140615/2b5653e6/attachment.bin>


More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.