--- support/configure.pl.orig 2018-11-17 17:48:40.685799971 -0700
+++ support/configure.pl 2018-11-17 17:54:51.057727807 -0700
@@ -976,6 +976,7 @@ int main() {
}
$LDsharedFLAGS=$Config::Config{lddlflags};
+ $LDsharedFLAGS =~ s/ -specs=\S+redhat-hardened-cc1//g;
if ($^O eq "darwin") {
# MacOS magic again: remove multi-architecture options for fat binaries
@@ -1005,6 +1006,8 @@ int main() {
if ($options{callable} ne ".none.") {
$LDcallableFLAGS="$LDsharedFLAGS $Config::Config{ldflags}";
+ $LDcallableFLAGS =~ s/ -specs=\S+redhat-hardened-ld//g;
+ $LDcallableFLAGS =~ s/ -Wl,-z,now//g;
$LDsonameFLAGS = "-Wl,-soname,";
} else {
$LDcallableFLAGS="none";
@@ -1668,10 +1671,15 @@ sub write_perl_specific_configuration_fi
$no_warn .= " -Wno-literal-suffix";
}
+ my $GlueFLAGS=$Config::Config{ccflags};
+ $GlueFLAGS =~ s/ -specs=\\S+redhat-hardened-cc1//g;
+ my $PerlFLAGS=$Config::Config{ccdlflags};
+ $PerlFLAGS =~ s/ -specs=\\S+redhat-hardened-ld//g;
+ $PerlFLAGS =~ s/ -Wl,-z,now//g;
print $conf <<"---";
PERL=$Config::Config{perlpath}
-CXXglueFLAGS=-I$Config::Config{archlibexp}/CORE $Config::Config{ccflags} -DPerlVersion=$PerlVersion $no_warn
-LIBperlFLAGS=-L$Config::Config{archlib}/CORE -lperl $Config::Config{ccdlflags}
+CXXglueFLAGS=-I$Config::Config{archlibexp}/CORE $GlueFLAGS -DPerlVersion=$PerlVersion $no_warn
+LIBperlFLAGS=-L$Config::Config{archlib}/CORE -lperl $PerlFLAGS
ExtUtils=$Config::Config{privlib}/ExtUtils
---