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

Paul Wouters paul at nohats.ca
Sat Feb 4 00:53:22 UTC 2017


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

> Would you consider making the build flag optional somehow, or only
> enabling it if it's detected to be available?  or should i mark
> libreswan as not for those architectures?

You cannot use a target specific setting of USERCOMPILE= ?

> 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

Paul


More information about the Swan-dev mailing list