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: RESOLVED DUPLICATE of bug 261375
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:
: 782406 (view as bug list)
Depends on:
Blocks: perlxsflags
  Show dependency tree
 
Reported: 2020-11-24 15:00 UTC by phkb
Modified: 2021-05-19 16:36 UTC (History)
5 users (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
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-12 07:31:27 UTC
*** Bug 782406 has been marked as a duplicate of this bug. ***
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2021-05-13 11:26:44 UTC
No surprise.

*** This bug has been marked as a duplicate of bug 261375 ***