summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-09-21 15:24:45 +0000
committertb <>2022-09-21 15:24:45 +0000
commite689045aa92403bda1b110ec413d27778c06eac2 (patch)
tree3a58de776e16d675dc31f3f0ba2a6f978ea835db
parent642b8e4c2c5b000e47bb94030ed3dcf44423a841 (diff)
downloadopenbsd-e689045aa92403bda1b110ec413d27778c06eac2.tar.gz
openbsd-e689045aa92403bda1b110ec413d27778c06eac2.tar.bz2
openbsd-e689045aa92403bda1b110ec413d27778c06eac2.zip
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.
-rw-r--r--src/regress/lib/libcrypto/symbols/Makefile5
-rw-r--r--src/regress/lib/libcrypto/symbols/symbols.awk7
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 @@
1# $OpenBSD: Makefile,v 1.2 2022/06/19 17:05:31 tb Exp $ 1# $OpenBSD: Makefile,v 1.3 2022/09/21 15:24:45 tb Exp $
2 2
3TESTS = \ 3TESTS = \
4 symbols 4 symbols
@@ -23,7 +23,8 @@ include_headers.c: ${BSDSRCDIR}/lib/libcrypto/Symbols.list
23LDADD= -lcrypto 23LDADD= -lcrypto
24DPADD= ${LIBCRYPTO} 24DPADD= ${LIBCRYPTO}
25LDFLAGS+= -lcrypto 25LDFLAGS+= -lcrypto
26CFLAGS+= -Wno-deprecated-declarations 26LDFLAGS+= -Wl,--no-allow-shlib-undefined
27CFLAGS+= -Wno-deprecated-declarations
27 28
28CLEANFILES+= include_headers.c symbols.c symbols.c.tmp 29CLEANFILES+= include_headers.c symbols.c symbols.c.tmp
29 30
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 @@
1# $OpenBSD: symbols.awk,v 1.6 2022/01/12 09:04:40 tb Exp $ 1# $OpenBSD: symbols.awk,v 1.7 2022/09/21 15:24:45 tb Exp $
2 2
3# Copyright (c) 2018,2020 Theo Buehler <tb@openbsd.org> 3# Copyright (c) 2018,2020 Theo Buehler <tb@openbsd.org>
4# 4#
@@ -114,6 +114,11 @@ BEGIN {
114 114
115{ 115{
116 symbols[$0] = $0 116 symbols[$0] = $0
117
118 # Undefine aliases, so we don't accidentally leave them in Symbols.list.
119 # The _cfb ciphers are aliased to _cfb64, so skip them.
120 if ($0 !~ "^EVP_.*cfb$")
121 printf("#ifdef %s\n#undef %s\n#endif\n", $0, $0)
117} 122}
118 123
119END { 124END {