This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: FORTIFY_SOURCE
- From: Brian Inglis <Brian dot Inglis at SystematicSw dot ab dot ca>
- To: cygwin-apps at cygwin dot com
- Date: Sun, 15 Apr 2018 13:59:10 -0600
- Subject: Re: FORTIFY_SOURCE
- References: <87o9ik5n70.fsf@Rainer.invalid> <87k1t85mmp.fsf@Rainer.invalid> <db3f6e3a-64ec-e501-f46a-71d2b242b5f6@SystematicSw.ab.ca> <87bmek5lv0.fsf@Rainer.invalid>
- Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca
On 2018-04-15 13:08, Achim Gratz wrote:
> Brian Inglis writes:
>>> OK, I finally found it in Embed. EMbed compiles the tests without
>>> optimization and tries to strip the definition, but doesn't expect the
>>> leading "-Wp,". I have still no idea where _that_ comes from.
>>
>> https://github.com/vim/vim/issues/2068 suggests it may come from PERL_CFLAGS
>
> Sure, the question is why they use this stage prefix suddenly when they
> didn't before.
Someone who believes in being "explicit" took over or patched something from
someone who prefers staying "generic"; see http://wiki.c2.com/?HolyWar ;^>
You may already know and have tried: https://perldoc.perl.org/perlembed.html
suggests checking the output from:
$ perl -V
...
Compiler:
cc='gcc'
ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2
-pipe -Wimplicit-function-declaration
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.26.1-1
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.26.1=/usr/src/debug/perl-5.26.1-1
-fwrapv -fno-strict-aliasing -fstack-protector-strong -D_FORTIFY_SOURCE=2'
optimize='-O3'
cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2
-pipe -Wimplicit-function-declaration
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.26.1-1
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.26.1=/usr/src/debug/perl-5.26.1-1
-fwrapv -fno-strict-aliasing -fstack-protector-strong'
...
Linker and Libraries:
ld='g++'
ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols
-Wl,--enable-auto-image-base -fstack-protector-strong'
...
$ perl -MExtUtils::Embed -e ccopts -e ldopts; echo
Warning (mostly harmless): No library found for -lcrypt
-Wl,--enable-auto-import -Wl,--export-all-symbols
-Wl,--enable-auto-image-base -fstack-protector-strong
-L/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE -lperl -lpthread -ldl
-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2 -pipe
-Wimplicit-function-declaration
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.26.1-1
-fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.26.1=/usr/src/debug/perl-5.26.1-1
-fwrapv -fno-strict-aliasing -fstack-protector-strong -D_FORTIFY_SOURCE=2
-I/usr/lib/perl5/5.26/x86_64-cygwin-threads/CORE
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada