From c7bc301554469abf2da3988a29edbf6cb5ffd20b Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Tue, 25 Sep 2012 19:12:11 +0200 Subject: [PATCH] CompileTest.pm: do not hardcode compiler flags --- t/CompileTest.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/CompileTest.pm b/t/CompileTest.pm index ede3336..2f3fab8 100644 --- a/t/CompileTest.pm +++ b/t/CompileTest.pm @@ -5,10 +5,12 @@ use warnings; use Config; -my $cc = $Config{ccname}; +my $cc = $Config{ccname}.' '.$Config{lddlflags}.' '.$Config{cccdlflags}; sub compile { my ($file, $out) = @_; - system($cc, '-shared', '-fPIC', '-o', $out, $file); + $cc .= " -o $out $file"; + + system $cc; }