From: Simon Ruderich Date: Mon, 12 Mar 2012 16:32:47 +0000 (+0100) Subject: bin/blhc: Another fix for libtool --mode=link. X-Git-Tag: 0.01~135 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=752679b4479c6db9322e0845a151e6d4d4716894;p=blhc%2Fblhc.git bin/blhc: Another fix for libtool --mode=link. --- diff --git a/bin/blhc b/bin/blhc index 30bc35a..6156282 100755 --- a/bin/blhc +++ b/bin/blhc @@ -272,7 +272,7 @@ foreach my $line (@input) { # Linker commands. if ($line =~ /\s-l[A-Za-z0-9.-]+(\s|\\|$)/ or $line =~ /^libtool: link: / - or $line =~ m{\s*/bin/bash .+?libtool\s+.+?\s+--mode=(re)?link}) { + or $line =~ m{\s*/bin/bash .+?libtool\s+(.+?\s+)?--mode=(re)?link}) { $compiler = 0; $linker = 1; } diff --git a/t/logs/libtool b/t/logs/libtool index d85ca49..4447a20 100644 --- a/t/logs/libtool +++ b/t/logs/libtool @@ -4,6 +4,7 @@ libtool: link: g++ -shared test-a.o test-b.o test-b.o test-c.o -O2 -pie -Wl,relr libtool: link: g++ -shared test-a.o test-b.o test-b.o test-c.o -O2 -Wl,relro -o test.so libtool: link: gcc -Wl,-z -Wl,relro -o test test.o +/bin/bash ../../../libtool --mode=link cc -Wl,-z,relro -o test.so test.o /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.o /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.o /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.o diff --git a/t/tests.t b/t/tests.t index 6904a7d..5af0780 100644 --- a/t/tests.t +++ b/t/tests.t @@ -308,6 +308,7 @@ is_blhc 'libtool', '--bindnow', 4, LDFLAGS missing (-fPIE): libtool: link: g++ -shared test-a.o test-b.o test-b.o test-c.o -O2 -pie -Wl,relro -Wl,now -o test.so LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: g++ -shared test-a.o test-b.o test-b.o test-c.o -O2 -Wl,relro -o test.so LDFLAGS missing (-fPIE -pie -Wl,-z,now): libtool: link: gcc -Wl,-z -Wl,relro -o test test.o +LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash ../../../libtool --mode=link cc -Wl,-z,relro -o test.so test.o LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.o LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.o LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.o