Front page | perl.perl5.porters |
Postings from July 2014
From: Dave Mitchell
July 2, 2014 10:05
Message ID: 20140702100447.GG15476@iabyn.com
Since this commit:
Author: Jarkko Hietaniemi <firstname.lastname@example.org>
AuthorDate: Sat Jun 28 18:30:13 2014 -0400
Commit: Jarkko Hietaniemi <email@example.com>
CommitDate: Mon Jun 30 09:17:11 2014 -0400
Add -D_FORTIFY_SOURCE=2 when applicable.
Added only if available (gcc 4.*) and not already there.
Not already there might be explicit via ccflags, or less explicitly
via cppsymbols: for example in OS X 10.5+ the -D_FORTIFY_SOURCE=2
is already the default with the system cc (gcc earlier, now clang).
Some Linux distros (e.g. Fedora) also have enabled it for years,
either for all user code, or for their own builds.
my system's been very noisy on non-optimised builds e.g.:
$ make sv.o
cc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -ggdb -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c89 -g -Wall -ansi -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings sv.c
In file included from /usr/include/sys/types.h:25:0,
/usr/include/features.h:327:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
Presumably as the warning says, _FORTIFY_SOURCE should only be added on
"Strange women lying in ponds distributing swords is no basis for a system
of government. Supreme executive power derives from a mandate from the
masses, not from some farcical aquatic ceremony."
-- Dennis, "Monty Python and the Holy Grail"
by Dave Mitchell