Subject: | gcc AIX builds broken |
Reported to perl as https://rt.perl.org/Ticket/Display.html?id=133596
This appears to have been broken by https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/commit/982f991c7f564f3e40e3f57c1f7090a5d1763611
In the report above, gcc fails to build .so files:
gcc -maix32 -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:../../perl.exp -Wl,-bnoentry -lpt
hreads -L/usr/lib -bE:B.exp B.o -o ../../lib/auto/B/B.so \
\
gcc: error: unrecognized command line option '-bE:B.exp'
This appears to be from stripping out the "-Wl,-bE:$(BASEEXT).exp" from lddlflags and replacing it unconditionally with "-bE:$(BASEEXT).exp".
lddlflags=' -Wl,-b64 -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bI:$(PERL_INC)/perl.exp -Wl,-bE:$(BASEEXT).exp -Wl,-bnoentry -lpthreads -L/opt/freeware/lib -L/usr/lib'
I suspect author of this change appears to have missed this code in hints/aix.sh that adds -Wl, to -b options when the compiler is gcc:
lddlflags="`echo ' '$lddlflags | sed -e 's@ -b@ -Wl,-b@g'`"
Unfortunately the reporter of the original issue has been unresponsive.
Tony
(I see a lot of activity in github issues, but ExtUtils::MakeMaker and META.json still points bug reports to rt.cpan.org, hence the report here.)