--- /dev/null
+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
+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 --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
+
+# 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 ...