[Swan-dev] libreswan FTBFS on hppa and alpha due to lack of -fstack-protector

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Feb 4 01:07:18 UTC 2017


On Fri 2017-02-03 19:53:22 -0500, Paul Wouters wrote:
> On Fri, 3 Feb 2017, Daniel Kahn Gillmor wrote:
>
>> i notice that mk/userland-cflags.mk has -fstack-protector-all set inside
>> USERCOMPILE.
>>
>> However, there are at least two debian unofficial architectures (alpha
>> and hppa) where gcc doesn't have -fstack-protector available.
>
> You can pass USERCOMPILE= to the "make programs" ?
> eg you could use:
>
> make
>    USERCOMPILE=" -fexceptions -fno-strict-aliasing -fPIE -DPIE -DFORCE_PR_ASSERT" \
>    programs

This seems like an unpleasant maintenance situation to be in -- it means
that if you improve USERCOMPILE in mk/userland-cflags.mk at some point,
debian won't get those changes on these platforms unless i notice and
update them.  What i really want is to be able to just strip one of
these options out on the two architectures.

I can go this route if you prefer, but it seems unclean.  any other suggestions?

>> You can detect it with something like:
>>
>>   printf 'int main() { return 0;}' | gcc -x c -fstack-protector-all -
>
> Well, that would be terrible for those cross compiling :P

well, i guess if you used $(CC) from whatever the cross environment is,
then you should be able to cross-build ok, right?  not that anyone's
doing a lot of cross-compiling on hppa or alpha these days :)

     --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20170203/0ac606c1/attachment.sig>


More information about the Swan-dev mailing list