# Linker commands.
if ($line =~ /\s-l[A-Za-z0-9.-]+(\s|\\|$)/
or $line =~ /^libtool: link: /
- or $line =~ m{\s*/bin/bash (\.\./)+libtool\s+--tag=CC\s+--mode=link}) {
+ or $line =~ m{\s*/bin/bash .+?libtool\s+.+?\s+--mode=(re)?link}) {
$compiler = 0;
$linker = 1;
}
/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
+/bin/bash ../../libtool --tag=CC --preserve-dup-deps --mode=link gcc -Wl,-z,relro -o test.so test.o
+ /bin/bash /tmp/test/build/libtool --silent --tag CC --mode=relink gcc -Wl,-z,relro -o test.so test.o
+ /bin/bash /tmp/test/build/libtool --tag CXX --mode=relink g++ -Wl,-z,relro -o test.la test.o
# Just to be sure, libtool won't do this. Note the test.c.
/bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.c
libtool: install: /usr/bin/install -c ...
+/bin/bash ./libtool --mode=install /usr/bin/install -c ...
/bin/bash ../../libtool --mode=install /usr/bin/install -c ...
/bin/bash ../../libtool --mode=install /usr/bin/install -c ...
/bin/bash ../../../libtool --mode=install /usr/bin/install -c ...
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
+LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash ../../libtool --tag=CC --preserve-dup-deps --mode=link gcc -Wl,-z,relro -o test.so test.o
+LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash /tmp/test/build/libtool --silent --tag CC --mode=relink gcc -Wl,-z,relro -o test.so test.o
+LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash /tmp/test/build/libtool --tag CXX --mode=relink g++ -Wl,-z,relro -o test.la test.o
CFLAGS missing (-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIE): /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.c
CPPFLAGS missing (-D_FORTIFY_SOURCE=2): /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.c
LDFLAGS missing (-fPIE -pie -Wl,-z,now): /bin/bash ../libtool --tag=CC --mode=link gcc -Wl,-z,relro -o test.so test.c