1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
Description: drop compiler flags
Build.PL: drop all the custom compiler flag manglings that won't
work on anything that isn't x86-based.
Bug-Debian: https://bugs.debian.org/1040777
Forwarded: not-needed
Author: Wouter Verhelst <wouter@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2023-11-10
--- a/Build.PL
+++ b/Build.PL
@@ -5,31 +5,6 @@
use strict;
use Module::Build ();
use Config ();
-use File::Which qw/ which /;
-use IPC::Run qw/ run timeout /;
-
-my $has_cpp_compiler = scalar(which("c++"));
-my $arch;
-
-if (my $which =(which("uname"))[0]) {
- my ($out, $err);
- my $is_success = run(
- [$which, '-m'],
- \undef, \$out, \$err,
- timeout(1)
- );
- chomp($out);
- $arch = $out if $out;
-}
-
-my %not_sse_archs = map { $_ => 1 } qw/ armv7l aarch64 /;
-
-my %Config = %Config::Config;
-my @cc_flags = split(/ /, $Config{'ccflags'});
-
-push(@cc_flags, "-O3", "-msse2", "-msse4.2") if $arch && !$not_sse_archs{$arch};
-push(@cc_flags, "-DCPP=1", "-std=c++17") if $has_cpp_compiler;
-push(@cc_flags, "-std=c17") if !$has_cpp_compiler;
my $build = Module::Build->new(
module_name => 'Crypt::xxHash',
@@ -38,9 +13,6 @@
configure_requires => {
'Module::Build' => 0.19, # xs
},
- config => {
- $has_cpp_compiler ? (cc => 'c++', ld => 'c++') : (),
- },
build_requires => {
'File::Which' => 1.21,
'IPC::Run' => '20200505.0',
@@ -51,8 +23,6 @@
requires => {
},
needs_compiler => 1,
- extra_compiler_flags => [@cc_flags],
- extra_linker_flags => [@cc_flags],
include_dirs => ['.', 'src', 'ext/xxHash'], # ext/xxHash/tests/collisions/allcodecs
c_source => ['.', 'src'],
xs_files => {
|