On 02/04/2015 10:47 AM, Viktor Dukhovni wrote:
> No, not CCARGS, AUXLIBS:
> 
>     make -f Makefile.in shared=yes "AUXLIBS=-fPIE" makefiles
>     make
> 
> works with the GCC toolchain on my machine.

make makefiles shared=yes 'CCARGS=-fPIC' 'AUXLIBS=-fPIE -pie'
...fails

On 02/04/2015 10:49 AM, Wietse Venema wrote:
> The -pie is a linker option, so it belongs in AUXLIBS.
>
> The gcc manpage says that you also need to specify the -fpie or
> -fPIE compiler option, so that belongs in CCARGS.

make makefiles shared=yes 'CCARGS=-fPIC -fPIE' 'AUXLIBS=-pie'

...also fails

I've also tried:

make makefiles shared=yes 'CCARGS=-fPIC -fPIE -pie'
...which fails differently (can give details if wanted)

make makefiles shared=yes 'CCARGS=-fPIC -pie'
...which works.  According to the gcc docs -pie should be passed through
to the linker, so in theory it should work this way, but I don't know
for sure.


Peter

Reply via email to