aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-08-10 21:06:04 -0400
committerRob Austein <sra@hactrn.net>2016-08-10 21:06:04 -0400
commitef142cd0ba5e60baee56b8aaafac9a835958a679 (patch)
tree26378797d1325d1688afdf72a0129453bdc74177 /Makefile
parentf1a7e6578fe9efe81ab3e511e19c84a25049acb2 (diff)
Shared library symbol versioning support from Ondrej Sury (thanks!).
Apparently this is how the cool kids handle hiding library-internal symbols now, using objcopy is old hat. Ondrey tells us that this should work on GNU/Linux and on *BSD, which, at the moment, just leaves OSX, which we already handle with an OSX-specific kludge.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 1 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 95fce05..0eb86e3 100644
--- a/Makefile
+++ b/Makefile
@@ -179,9 +179,7 @@ ifeq "${UNAME}" "Darwin"
else
${SONAME}: pkcs11.o ${LIBS}
- ${CC} ${CFLAGS} -shared -o $@.tmp $^ ${SOFLAGS} ${LDFLAGS}
- ${OBJCOPY} -w -G 'C_*' $@.tmp $@
- rm -f $@.tmp
+ ${CC} ${CFLAGS} -Wl,--version-script=libcryptech-pkcs11.map -shared -o $@ $^ ${SOFLAGS} ${LDFLAGS}
endif