summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-09-04 08:22:34 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-09-04 09:39:46 -0400
commit2313e9ca3be65223d835c40b25c76765e8c35547 (patch)
tree919e48a5999ac877ba93e2f4a341c8344dbdbf9c /configpm
parentd584a308cab484ee23984026d264bd447d452018 (diff)
downloadperl-2313e9ca3be65223d835c40b25c76765e8c35547.tar.gz
Grab the warnflags and stdflags from cflags [perl #122694].
They become $Config{ccwarnflags} and $Config{ccstdflags}.
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm18
1 files changed, 18 insertions, 0 deletions
diff --git a/configpm b/configpm
index d5bf5f26a8..21bd3ef4f1 100755
--- a/configpm
+++ b/configpm
@@ -628,6 +628,24 @@ foreach my $prefix (qw(libs libswanted)) {
$heavy_txt .= "${prefix}_nolargefiles='$value'\n";
}
+if (open(my $fh, "cflags")) {
+ my $ccwarnflags;
+ my $ccstdflags;
+ while (<$fh>) {
+ if (/^warn="(.+)"$/) {
+ $ccwarnflags = $1;
+ } elsif (/^stdflags="(.+)"$/) {
+ $ccstdflags = $1;
+ }
+ }
+ if (defined $ccwarnflags) {
+ $heavy_txt .= "ccwarnflags='$ccwarnflags'\n";
+ }
+ if (defined $ccstdflags) {
+ $heavy_txt .= "ccstdflags='$ccstdflags'\n";
+ }
+}
+
$heavy_txt .= "EOVIRTUAL\n";
$heavy_txt .= <<'ENDOFGIT';