Subject: | ::XS : 'ld' used as if it was 'cc' when LD is set in ENV |
Apologies if this is the wrong queue, metacpan bug tracking data points to this one still :)
When LD is set in ENV, something in configure eventually tries to pass CC args to it, which are invalid for LD, and then fails:
A trivial reproduction is:
LD=ld CC=cc perl Makefile.PL
Checking whether pureperl is required... no
Checking for cc... ld: unrecognised emulation mode: tune=native
Supported emulations: <BIG LIST>
Can't produce loadable XS module at Makefile.PL line 44.
This was reported to me by a user who has their stack configured for LLVM, which is much more strict about invalid ldflags:
Checking whether pureperl is required... no Checking for cc... /usr/bin/ld.lld: error: unknown argument: -pipe /usr/bin/ld.lld: error: unknown argument: -fomit-frame-pointer /usr/bin/ld.lld: error: unknown argument: -Wl,-O2 /usr/bin/ld.lld: error: unknown argument: -Wl,--as-needed
--
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )