X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fblhc;h=9040a084c873e691faae0801f8531588ec046883;hb=5668edb1e7b4210adc381c847487861765486cf9;hp=2e48bbc063c6bc466ee6c6ceaae4eba42929e9b4;hpb=1368fa468fd4e62ebdb4efa40efb5c19e39bacd7;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index 2e48bbc..9040a08 100755 --- a/bin/blhc +++ b/bin/blhc @@ -1124,7 +1124,7 @@ foreach my $file (@ARGV) { # Embedded `gcc -print-*` commands next if $line =~ /`$cc_regex_normal\s*[^`]*-print-\S+`/; # cmake checking for compiler flags without setting CPPFLAGS - next if $line =~ m{^\s*/usr/(bin|lib)/(ccache/)?c\+\+ -dM -E -c /usr/share/cmake-\S+/Modules/CMakeCXXCompilerABI\.cpp}; + next if $line =~ m{^\s*/usr/(bin|lib)/(ccache/)?c\+\+ (?:-std=\S+ )?-dM -E -c /usr/share/cmake-\S+/Modules/CMakeCXXCompilerABI\.cpp}; # Some rustc lines look like linker commands next if $cargo and $line =~ /$rustc_regex/o; @@ -1195,6 +1195,7 @@ foreach my $file (@ARGV) { i386 kfreebsd-amd64 kfreebsd-i386 + loong64 mips mips64 mips64el @@ -1217,7 +1218,11 @@ foreach my $file (@ARGV) { ); # Disable unsupported hardening options. - if ($os !~ /^(?:linux|kfreebsd|knetbsd|hurd)$/ or $cpu eq 'hppa') { + if ($disable_harden_pie and exists $builtin_pie_arch{$arch}) { + $harden_pie = 0; + } + if ($os !~ /^(?:linux|kfreebsd|hurd)$/ + or $cpu =~ /^(?:alpha|hppa|ia64)$/) { $harden_pie = 0; } if ($cpu =~ /^(?:ia64|alpha|hppa|nios2)$/ or $arch eq 'arm') { @@ -1228,10 +1233,6 @@ foreach my $file (@ARGV) { $harden_relro = 0; $harden_bindnow = 0; } - - if ($disable_harden_pie and exists $builtin_pie_arch{$arch}) { - $harden_pie = 0; - } } # Default values.