diff options
| author | tb <> | 2022-09-21 15:24:45 +0000 |
|---|---|---|
| committer | tb <> | 2022-09-21 15:24:45 +0000 |
| commit | a1ab11b512a48638b18c6decdb5824adc3a3a139 (patch) | |
| tree | 3a58de776e16d675dc31f3f0ba2a6f978ea835db /src | |
| parent | 8c6b171d46b1c38f2d049466913944f62bc162e2 (diff) | |
| download | openbsd-a1ab11b512a48638b18c6decdb5824adc3a3a139.tar.gz openbsd-a1ab11b512a48638b18c6decdb5824adc3a3a139.tar.bz2 openbsd-a1ab11b512a48638b18c6decdb5824adc3a3a139.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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/symbols/Makefile | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 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 | ||
| 3 | TESTS = \ | 3 | TESTS = \ |
| 4 | symbols | 4 | symbols |
| @@ -23,7 +23,8 @@ include_headers.c: ${BSDSRCDIR}/lib/libcrypto/Symbols.list | |||
| 23 | LDADD= -lcrypto | 23 | LDADD= -lcrypto |
| 24 | DPADD= ${LIBCRYPTO} | 24 | DPADD= ${LIBCRYPTO} |
| 25 | LDFLAGS+= -lcrypto | 25 | LDFLAGS+= -lcrypto |
| 26 | CFLAGS+= -Wno-deprecated-declarations | 26 | LDFLAGS+= -Wl,--no-allow-shlib-undefined |
| 27 | CFLAGS+= -Wno-deprecated-declarations | ||
| 27 | 28 | ||
| 28 | CLEANFILES+= include_headers.c symbols.c symbols.c.tmp | 29 | CLEANFILES+= 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 | ||
| 119 | END { | 124 | END { |
