From 631bce18651ddfffb2702d7bb56556bb1b0359d2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 15 Mar 2012 20:57:30 +0100 Subject: [PATCH] Accept libraries with version numbers before ".so". --- bin/blhc | 3 ++- t/logs/bad-library | 1 + t/logs/good-library | 1 + t/tests.t | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/blhc b/bin/blhc index 5d018ee..b2188ee 100755 --- a/bin/blhc +++ b/bin/blhc @@ -279,7 +279,8 @@ foreach my $line (@input) { [\s\\]*\s+ # possible line continuation ([A-Za-z0-9_/.-]+/)? # path to file [A-Za-z0-9_-]+ # binary name (no dots!) - (\.so[0-9.]*[a-z]?|\.la)? # library (including version) + ([0-9.]*\.so[0-9.]*[a-z]? # library (including version) + |\.la)? (\s|\\|\$) # end of file name }x or $line =~ /^libtool: link: / diff --git a/t/logs/bad-library b/t/logs/bad-library index 8ddd78c..d4c5c23 100644 --- a/t/logs/bad-library +++ b/t/logs/bad-library @@ -5,3 +5,4 @@ gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,--as-needed -o libtest.so gcc -shared -fPIC test.o -Wl,-z -Wl,relro -o .libs/libtest.so.1.0.0 gcc -shared -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,now -lpthread -ldl +/usr/bin/g++ -shared -fPIC -o libtest-6.1.so.0 test.o -ltiff -lz diff --git a/t/logs/good-library b/t/logs/good-library index 76d461f..6c21470 100644 --- a/t/logs/good-library +++ b/t/logs/good-library @@ -6,3 +6,4 @@ gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,relro -Wl,now -Wl,--as-neede gcc -shared -fPIC test.o -Wl,-z -Wl,relro -Wl,now -o .libs/libtest.so.1.0.0 gcc -shared -fPIE -pie -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,relro -Wl,-z,now -lpthread -ldl +/usr/bin/g++ -shared -fPIC -Wl,-z,relro -Wl,-z,now -o libtest-6.1.so.0 test.o -ltiff -lz diff --git a/t/tests.t b/t/tests.t index 2aea3be..b94d976 100644 --- a/t/tests.t +++ b/t/tests.t @@ -288,6 +288,7 @@ LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -W LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -shared -fPIC -DPIC libtest.o -lpthread -O2 -Wl,--as-needed -o libtest.so LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC test.o -Wl,-z -Wl,relro -o .libs/libtest.so.1.0.0 LDFLAGS missing (-Wl,-z,relro -fPIE -pie): gcc -shared -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,now -lpthread -ldl +LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): /usr/bin/g++ -shared -fPIC -o libtest-6.1.so.0 test.o -ltiff -lz "; -- 2.43.2