Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 756337 - dev-lang/perl: ExtUtils::MakeMaker incorrectly uses build host cflags
Summary: dev-lang/perl: ExtUtils::MakeMaker incorrectly uses build host cflags
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-24 15:00 UTC by phkb
Modified: 2020-11-25 20:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
irssi build.log (build.log.gz,49.54 KB, application/gzip)
2020-11-24 15:04 UTC, phkb
Details
Makefile generated by MakeMaker (Makefile,36.70 KB, text/plain)
2020-11-24 15:08 UTC, phkb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phkb 2020-11-24 15:00:23 UTC
Some packages using MakeMaker (some perl modules, irssi) to generate makefiles. The generated makefiles contains CFLAGS that were used to build perl. This is wrong for two reasons:

1) When building in another root for another machine, this will incorrectly use the build machine's CFLAGS. I'll attach to this bug an example of this, in which I build irssi on a machine with CFLAGS="-march=skylake" for a target machine with CFLAGS="-march=ivybridge".

2) When changing CFLAGS, one has to rebuild perl for the change to be taken into account for MakeMaker packages. Initially I had "-march=native" on my build machine. When I decided to build packages for other machines, I changed every make.conf so that the -march flag is the actual architecture, to make things easier. Thus, I had no -march=native anywhere anymore, yet irssi and perl modules where still using that, which was confusing. It turned out that I didn't rebuild perl, so it was still using my old CFLAGS.
Comment 1 phkb 2020-11-24 15:04:38 UTC
Created attachment 674731 [details]
irssi build.log

Note that in the src/perl/common subdirectory, the compiler commands contain both -march=ivybridge and -march=skylake.
Comment 2 phkb 2020-11-24 15:08:19 UTC
Created attachment 674734 [details]
Makefile generated by MakeMaker

Lines containing hardcoded perl build flags are:
- line 40, in LDDLFLAGS
- line 311, in OPTIMIZE