On 2017-07-25, at 4:34 PM, John David Anglin wrote: > -fPIC is recognized if it is last option. Maybe it has to come after > -fno-pie?
-fno-pie isn't a documented gcc option but it essentially says don't generate position independent code for a position independent executable. That's incompatible with -fPIC on hppa. PIE and PIC code are the same on hppa. The is compile command for App.c: hppa-linux-gnu-gcc -c -I/home/dave/debian/libembperl-perl/libembperl-perl-2.5.0 -I/usr/include/apache2 -I/usr/include/apache2/regex -I/usr/include/apache2/os/unix -I/usr/include/apr-1.0 -I/usr/include/libxml2 -I/usr/include/libxml2 -I/home/dave/debian/libembperl-perl/libembperl-perl-2.5.0/xs -I/usr/include/apache2 -I/usr/include/apache2/regex -I/usr/include/apache2/os/unix -I/usr/include/apr-1.0 -I/usr/include/libxml2 -I/usr/include/libxml2 -I/home/dave/debian/libembperl-perl/libembperl-perl-2.5.0/xs -I/home/dave/debian/libembperl-perl/libembperl-perl-2.5.0 -I/usr/include/apache2 -I/usr/include/apache2/regex -I/usr/include/apache2/os/unix -I/usr/include/apr-1.0 -I/usr/include/libxml2 -I/usr/include/libxml2 -I/home/dave/debian/libembperl-perl/libembperl-perl-2.5.0/xs -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -O0 -fno-pie -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/hppa-linux-gnu/perl/5.26/CORE -DMOD_PERL -DMP_COMPAT_1X -g -O2 -fdebug-prefix-map=/build/libapache2-mod-perl2-kV4Khk/libapache2-mod-perl2-2.0.10=. -Wformat -Werror=format-security -Wall -fgnu89-inline -DLINUX -D_LARGEFILE64_SOURCE -g -O2 -fdebug-prefix-map=/home/dave/debian/libembperl-perl/libembperl-perl-2.5.0=. -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DVERSION=\"2.5.0\" -DXS_VERSION=\"2.5.0\" -fPIC "-I/usr/lib/hppa-linux-gnu/perl/5.26/CORE" -DAPACHE -DAPACHE2 -DEP2 -DLIBXSLT -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -O0 -fno-pie -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/hppa-linux-gnu/perl/5.26/CORE -DMOD_PERL -DMP_COMPAT_1X -g -O2 -fdebug-prefix-map=/build/libapache2-mod-perl2-kV4Khk/libapache2-mod-perl2-2.0.10=. -Wformat -Werror=format-security -Wall -fgnu89-inline -DLINUX -D_LARGEFILE64_SOURCE -DAPACHE -DAPACHE2 -DEP2 -DLIBXSLT -DAPACHE -DAPACHE2 -DEP2 -DLIBXSLT -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -O0 -fno-pie -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/hppa-linux-gnu/perl/5.26/CORE -DMOD_PERL -DMP_COMPAT_1X -g -O2 -fdebug-prefix-map=/build/libapache2-mod-perl2-kV4Khk/libapache2-mod-perl2-2.0.10=. -Wformat -Werror=format-security -Wall -fgnu89-inline -DLINUX -D_LARGEFILE64_SOURCE App.c A -fno-pie option comes after the -fPIC option. Dave -- John David Anglin dave.ang...@bell.net