From e689045aa92403bda1b110ec413d27778c06eac2 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 21 Sep 2022 15:24:45 +0000 Subject: 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. --- src/regress/lib/libcrypto/symbols/Makefile | 5 +++-- src/regress/lib/libcrypto/symbols/symbols.awk | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/regress/lib/libcrypto/symbols/Makefile b/src/regress/lib/libcrypto/symbols/Makefile index 394bc08065..b37fb87e7c 100644 --- a/src/regress/lib/libcrypto/symbols/Makefile +++ b/src/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/src/regress/lib/libcrypto/symbols/symbols.awk b/src/regress/lib/libcrypto/symbols/symbols.awk index d7c534272c..9d7f5ceeeb 100644 --- a/src/regress/lib/libcrypto/symbols/symbols.awk +++ b/src/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 { -- cgit v1.2.3-55-g6feb