public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Re: FORTIFY_SOURCE
@ 2018-04-16 21:14 Richard Campbell
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Campbell @ 2018-04-16 21:14 UTC (permalink / raw)
  To: cygwin-apps

> > Sure, the question is why they use this stage prefix suddenly when they
> > didn't before.
>
> The answer to that question is still open.  Why does cygport set this
> symbol in this manner?  I am removing the "-Wp," and see what the build
> does…

Yaakov added that symbol to lib/compilers.cygpart on February 20 along
with other security flags, in the "Add security flags to CFLAGS"
commit.

https://github.com/cygwinports/cygport/commit/48e7b6e94052ac58643fa3b7989bb7e1468389f7

The "-Wp" just means to pass -D_FORTIFY_SOURCE=2 through to the preprocessor.

Best regards,

-Richard Campbell.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FORTIFY_SOURCE
  2018-04-15 19:08     ` FORTIFY_SOURCE Achim Gratz
  2018-04-15 19:59       ` FORTIFY_SOURCE Brian Inglis
@ 2018-04-16 17:42       ` Achim Gratz
  1 sibling, 0 replies; 7+ messages in thread
From: Achim Gratz @ 2018-04-16 17:42 UTC (permalink / raw)
  To: cygwin-apps

Achim Gratz writes:
> 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.

Tracing what the configury does it turns out it comes from cygport's
CFLAGS setting.

>> 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.

The answer to that question is still open.  Why does cygport set this
symbol in this manner?  I am removing the "-Wp," and see what the build
does…


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FORTIFY_SOURCE
  2018-04-15 19:08     ` FORTIFY_SOURCE Achim Gratz
@ 2018-04-15 19:59       ` Brian Inglis
  2018-04-16 17:42       ` FORTIFY_SOURCE Achim Gratz
  1 sibling, 0 replies; 7+ messages in thread
From: Brian Inglis @ 2018-04-15 19:59 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FORTIFY_SOURCE
  2018-04-15 19:00   ` FORTIFY_SOURCE Brian Inglis
@ 2018-04-15 19:08     ` Achim Gratz
  2018-04-15 19:59       ` FORTIFY_SOURCE Brian Inglis
  2018-04-16 17:42       ` FORTIFY_SOURCE Achim Gratz
  0 siblings, 2 replies; 7+ messages in thread
From: Achim Gratz @ 2018-04-15 19:08 UTC (permalink / raw)
  To: cygwin-apps

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.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FORTIFY_SOURCE
  2018-04-15 18:51 ` FORTIFY_SOURCE Achim Gratz
@ 2018-04-15 19:00   ` Brian Inglis
  2018-04-15 19:08     ` FORTIFY_SOURCE Achim Gratz
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2018-04-15 19:00 UTC (permalink / raw)
  To: cygwin-apps

On 2018-04-15 12:51, Achim Gratz wrote:
> Achim Gratz writes:
>> I think that's happening somewhere in ExtUtils, but I'd like to ask if
>> maybe there is some magic going on from the Cygwin / gcc side to remove
>> that definition?
> 
> 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

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FORTIFY_SOURCE
  2018-04-15 18:39 FORTIFY_SOURCE Achim Gratz
@ 2018-04-15 18:51 ` Achim Gratz
  2018-04-15 19:00   ` FORTIFY_SOURCE Brian Inglis
  0 siblings, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2018-04-15 18:51 UTC (permalink / raw)
  To: cygwin-apps

Achim Gratz writes:
> I think that's happening somewhere in ExtUtils, but I'd like to ask if
> maybe there is some magic going on from the Cygwin / gcc side to remove
> that definition?

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.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* FORTIFY_SOURCE
@ 2018-04-15 18:39 Achim Gratz
  2018-04-15 18:51 ` FORTIFY_SOURCE Achim Gratz
  0 siblings, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2018-04-15 18:39 UTC (permalink / raw)
  To: cygwin-apps


Perl and Cygwin do not exactly play together at the moment, but I
haven't been able to track down where that happens.  Perl configure
recognizes FORTIFY_SOURCE=2 proceeds to integrate that knowledge into
Config_heavy.pl.  For whatever reason it decded to use
"-Wp,-D_FORTIFY_SOURCE=2" to do that (which works just fine).  But when
compiling something through ExtUtils::Embed in the just built perl that
option suddenly ends up as just "-Wp," and hangs up the compiler.  If I
rename the defined symbol to "FORCIFY_SOURCE" then it stays in the call
to gcc, so it's specific to that symbol.

I think that's happening somewhere in ExtUtils, but I'd like to ask if
maybe there is some magic going on from the Cygwin / gcc side to remove
that definition?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-16 21:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 21:14 FORTIFY_SOURCE Richard Campbell
  -- strict thread matches above, loose matches on Subject: below --
2018-04-15 18:39 FORTIFY_SOURCE Achim Gratz
2018-04-15 18:51 ` FORTIFY_SOURCE Achim Gratz
2018-04-15 19:00   ` FORTIFY_SOURCE Brian Inglis
2018-04-15 19:08     ` FORTIFY_SOURCE Achim Gratz
2018-04-15 19:59       ` FORTIFY_SOURCE Brian Inglis
2018-04-16 17:42       ` FORTIFY_SOURCE Achim Gratz

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 read-only IMAP folder(s) and NNTP newsgroup(s).