From: tb Date: Wed, 21 Sep 2022 15:24:45 +0000 (+0000) Subject: Tweak symbols test in such a way that it would have caught the recent X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0bc1405fd26f5e72962f0bac8d10eb64d9ecb7ff;p=openbsd Tweak symbols test in such a way that it would have caught the recent Symbols.list mistake: undefine aliases (except _cfb block ciphers which are aliases for historical reasons). Use -Wl,--no-allow-shlib-undefined. --- diff --git a/regress/lib/libcrypto/symbols/Makefile b/regress/lib/libcrypto/symbols/Makefile index 394bc08065a..b37fb87e7c5 100644 --- a/regress/lib/libcrypto/symbols/Makefile +++ b/regress/lib/libcrypto/symbols/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2022/06/19 17:05:31 tb Exp $ +# $OpenBSD: Makefile,v 1.3 2022/09/21 15:24:45 tb Exp $ TESTS = \ symbols @@ -23,7 +23,8 @@ include_headers.c: ${BSDSRCDIR}/lib/libcrypto/Symbols.list LDADD= -lcrypto DPADD= ${LIBCRYPTO} LDFLAGS+= -lcrypto -CFLAGS+= -Wno-deprecated-declarations +LDFLAGS+= -Wl,--no-allow-shlib-undefined +CFLAGS+= -Wno-deprecated-declarations CLEANFILES+= include_headers.c symbols.c symbols.c.tmp diff --git a/regress/lib/libcrypto/symbols/symbols.awk b/regress/lib/libcrypto/symbols/symbols.awk index d7c534272c5..9d7f5ceeeb8 100644 --- a/regress/lib/libcrypto/symbols/symbols.awk +++ b/regress/lib/libcrypto/symbols/symbols.awk @@ -1,4 +1,4 @@ -# $OpenBSD: symbols.awk,v 1.6 2022/01/12 09:04:40 tb Exp $ +# $OpenBSD: symbols.awk,v 1.7 2022/09/21 15:24:45 tb Exp $ # Copyright (c) 2018,2020 Theo Buehler # @@ -114,6 +114,11 @@ BEGIN { { symbols[$0] = $0 + + # Undefine aliases, so we don't accidentally leave them in Symbols.list. + # The _cfb ciphers are aliased to _cfb64, so skip them. + if ($0 !~ "^EVP_.*cfb$") + printf("#ifdef %s\n#undef %s\n#endif\n", $0, $0) } END {