From 0f8872f1a196034bb64d7278edf6eb898cb781df Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 5 Sep 2022 01:53:28 +0200 Subject: [PATCH] Fix various test link errors on MSVC. * modules/crypto/gc-arcfour-tests (Makefile.am): Link test-gc-arcfour with $(LIB_GETRANDOM). * modules/crypto/gc-arctwo-tests (Makefile.am): Link test-gc-arctwo with $(LIB_GETRANDOM). * modules/crypto/gc-des-tests (Makefile.am): Link test-gc-des with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-md5-tests (Makefile.am): Link test-gc-hmac-md5 with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-sha1-tests (Makefile.am): Link test-gc-hmac-sha1 with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-sha256-tests (Makefile.am): Link test-gc-hmac-sha256 with $(LIB_GETRANDOM). * modules/crypto/gc-hmac-sha512-tests (Makefile.am): Link test-gc-hmac-sha512 with $(LIB_GETRANDOM). * modules/crypto/gc-md2-tests (Makefile.am): Link test-gc-md2 with $(LIB_GETRANDOM). * modules/crypto/gc-md4-tests (Makefile.am): Link test-gc-md4 with $(LIB_GETRANDOM). * modules/crypto/gc-md5-tests (Makefile.am): Link test-gc-md5 with $(LIB_GETRANDOM). * modules/crypto/gc-pbkdf2-tests (Makefile.am): Link test-gc-pbkdf2 with $(LIB_GETRANDOM). * modules/crypto/gc-pbkdf2-sha1-tests (Makefile.am): Link test-gc-pbkdf2-sha1 with $(LIB_GETRANDOM). * modules/crypto/gc-rijndael-tests (Makefile.am): Link test-gc-rijndael with $(LIB_GETRANDOM). * modules/crypto/gc-sha1-tests (Makefile.am): Link test-gc-sha1 with $(LIB_GETRANDOM). * modules/crypto/gc-sha256-tests (Makefile.am): Link test-gc-sha256 with $(LIB_GETRANDOM). * modules/crypto/gc-sha512-tests (Makefile.am): Link test-gc-sha512 with $(LIB_GETRANDOM). * modules/crypto/gc-sm3-tests (Makefile.am): Link test-gc-sm3 with $(LIB_GETRANDOM). * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with $(LIB_GETRANDOM). * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ with $(LIB_GETRANDOM). --- ChangeLog | 42 +++++++++++++++++++++++++++++ modules/crypto/gc-arcfour-tests | 1 + modules/crypto/gc-arctwo-tests | 1 + modules/crypto/gc-des-tests | 2 +- modules/crypto/gc-hmac-md5-tests | 2 +- modules/crypto/gc-hmac-sha1-tests | 2 +- modules/crypto/gc-hmac-sha256-tests | 2 +- modules/crypto/gc-hmac-sha512-tests | 2 +- modules/crypto/gc-md2-tests | 2 +- modules/crypto/gc-md4-tests | 2 +- modules/crypto/gc-md5-tests | 2 +- modules/crypto/gc-pbkdf2-sha1-tests | 2 +- modules/crypto/gc-pbkdf2-tests | 2 +- modules/crypto/gc-rijndael-tests | 2 +- modules/crypto/gc-sha1-tests | 2 +- modules/crypto/gc-sha256-tests | 2 +- modules/crypto/gc-sha512-tests | 2 +- modules/crypto/gc-sm3-tests | 2 +- modules/sys_stat-c++-tests | 2 +- modules/unistd-c++-tests | 2 +- 20 files changed, 61 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e7854e1c3..7b2c109bee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,45 @@ +2022-09-04 Bruno Haible + + Fix various test link errors on MSVC. + * modules/crypto/gc-arcfour-tests (Makefile.am): Link test-gc-arcfour + with $(LIB_GETRANDOM). + * modules/crypto/gc-arctwo-tests (Makefile.am): Link test-gc-arctwo with + $(LIB_GETRANDOM). + * modules/crypto/gc-des-tests (Makefile.am): Link test-gc-des with + $(LIB_GETRANDOM). + * modules/crypto/gc-hmac-md5-tests (Makefile.am): Link test-gc-hmac-md5 + with $(LIB_GETRANDOM). + * modules/crypto/gc-hmac-sha1-tests (Makefile.am): Link + test-gc-hmac-sha1 with $(LIB_GETRANDOM). + * modules/crypto/gc-hmac-sha256-tests (Makefile.am): Link + test-gc-hmac-sha256 with $(LIB_GETRANDOM). + * modules/crypto/gc-hmac-sha512-tests (Makefile.am): Link + test-gc-hmac-sha512 with $(LIB_GETRANDOM). + * modules/crypto/gc-md2-tests (Makefile.am): Link test-gc-md2 with + $(LIB_GETRANDOM). + * modules/crypto/gc-md4-tests (Makefile.am): Link test-gc-md4 with + $(LIB_GETRANDOM). + * modules/crypto/gc-md5-tests (Makefile.am): Link test-gc-md5 with + $(LIB_GETRANDOM). + * modules/crypto/gc-pbkdf2-tests (Makefile.am): Link test-gc-pbkdf2 with + $(LIB_GETRANDOM). + * modules/crypto/gc-pbkdf2-sha1-tests (Makefile.am): Link + test-gc-pbkdf2-sha1 with $(LIB_GETRANDOM). + * modules/crypto/gc-rijndael-tests (Makefile.am): Link test-gc-rijndael + with $(LIB_GETRANDOM). + * modules/crypto/gc-sha1-tests (Makefile.am): Link test-gc-sha1 with + $(LIB_GETRANDOM). + * modules/crypto/gc-sha256-tests (Makefile.am): Link test-gc-sha256 with + $(LIB_GETRANDOM). + * modules/crypto/gc-sha512-tests (Makefile.am): Link test-gc-sha512 with + $(LIB_GETRANDOM). + * modules/crypto/gc-sm3-tests (Makefile.am): Link test-gc-sm3 with + $(LIB_GETRANDOM). + * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with + $(LIB_GETRANDOM). + * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ with + $(LIB_GETRANDOM). + 2022-09-04 Bruno Haible count-leading-zeros: Fix a link error on 32-bit MSVC and a test failure. diff --git a/modules/crypto/gc-arcfour-tests b/modules/crypto/gc-arcfour-tests index b0ed0bd694..c6ebcb663f 100644 --- a/modules/crypto/gc-arcfour-tests +++ b/modules/crypto/gc-arcfour-tests @@ -8,3 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-arcfour check_PROGRAMS += test-gc-arcfour +test_gc_arcfour_LDADD = $(LDADD) $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-arctwo-tests b/modules/crypto/gc-arctwo-tests index d1cdaff991..6e74c80c2f 100644 --- a/modules/crypto/gc-arctwo-tests +++ b/modules/crypto/gc-arctwo-tests @@ -8,3 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-arctwo check_PROGRAMS += test-gc-arctwo +test_gc_arctwo_LDADD = $(LDADD) $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-des-tests b/modules/crypto/gc-des-tests index a041a1c419..5d1bd46ee8 100644 --- a/modules/crypto/gc-des-tests +++ b/modules/crypto/gc-des-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-des check_PROGRAMS += test-gc-des -test_gc_des_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_des_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-hmac-md5-tests b/modules/crypto/gc-hmac-md5-tests index 7ae3d2f79d..345ba872ac 100644 --- a/modules/crypto/gc-hmac-md5-tests +++ b/modules/crypto/gc-hmac-md5-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-hmac-md5 check_PROGRAMS += test-gc-hmac-md5 -test_gc_hmac_md5_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_hmac_md5_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-hmac-sha1-tests b/modules/crypto/gc-hmac-sha1-tests index 9cc23aea27..c1effd7864 100644 --- a/modules/crypto/gc-hmac-sha1-tests +++ b/modules/crypto/gc-hmac-sha1-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-hmac-sha1 check_PROGRAMS += test-gc-hmac-sha1 -test_gc_hmac_sha1_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_hmac_sha1_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-hmac-sha256-tests b/modules/crypto/gc-hmac-sha256-tests index 82f0b44ba2..de0370fe09 100644 --- a/modules/crypto/gc-hmac-sha256-tests +++ b/modules/crypto/gc-hmac-sha256-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-hmac-sha256 check_PROGRAMS += test-gc-hmac-sha256 -test_gc_hmac_sha256_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_hmac_sha256_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-hmac-sha512-tests b/modules/crypto/gc-hmac-sha512-tests index e308f986c0..e1c2e478f0 100644 --- a/modules/crypto/gc-hmac-sha512-tests +++ b/modules/crypto/gc-hmac-sha512-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-hmac-sha512 check_PROGRAMS += test-gc-hmac-sha512 -test_gc_hmac_sha512_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_hmac_sha512_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-md2-tests b/modules/crypto/gc-md2-tests index 74ccdf03cd..b7ef11ff7c 100644 --- a/modules/crypto/gc-md2-tests +++ b/modules/crypto/gc-md2-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-md2 check_PROGRAMS += test-gc-md2 -test_gc_md2_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_md2_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-md4-tests b/modules/crypto/gc-md4-tests index b2a4ce1a12..0b32e7e52f 100644 --- a/modules/crypto/gc-md4-tests +++ b/modules/crypto/gc-md4-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-md4 check_PROGRAMS += test-gc-md4 -test_gc_md4_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_md4_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-md5-tests b/modules/crypto/gc-md5-tests index 865e77e659..4e4b8f8023 100644 --- a/modules/crypto/gc-md5-tests +++ b/modules/crypto/gc-md5-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-md5 check_PROGRAMS += test-gc-md5 -test_gc_md5_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_md5_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-pbkdf2-sha1-tests b/modules/crypto/gc-pbkdf2-sha1-tests index d88b541701..b1d73c785e 100644 --- a/modules/crypto/gc-pbkdf2-sha1-tests +++ b/modules/crypto/gc-pbkdf2-sha1-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-pbkdf2-sha1 check_PROGRAMS += test-gc-pbkdf2-sha1 -test_gc_pbkdf2_sha1_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_pbkdf2_sha1_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-pbkdf2-tests b/modules/crypto/gc-pbkdf2-tests index 0b90547c78..f5eac92289 100644 --- a/modules/crypto/gc-pbkdf2-tests +++ b/modules/crypto/gc-pbkdf2-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-pbkdf2 check_PROGRAMS += test-gc-pbkdf2 -test_gc_pbkdf2_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_pbkdf2_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-rijndael-tests b/modules/crypto/gc-rijndael-tests index c7aaee2d63..7c87920df6 100644 --- a/modules/crypto/gc-rijndael-tests +++ b/modules/crypto/gc-rijndael-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-rijndael check_PROGRAMS += test-gc-rijndael -test_gc_rijndael_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_rijndael_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-sha1-tests b/modules/crypto/gc-sha1-tests index 7cfef60da6..afa1ba2f35 100644 --- a/modules/crypto/gc-sha1-tests +++ b/modules/crypto/gc-sha1-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-sha1 check_PROGRAMS += test-gc-sha1 -test_gc_sha1_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_sha1_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-sha256-tests b/modules/crypto/gc-sha256-tests index 677ed62da0..13c55c5930 100644 --- a/modules/crypto/gc-sha256-tests +++ b/modules/crypto/gc-sha256-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-sha256 check_PROGRAMS += test-gc-sha256 -test_gc_sha256_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_sha256_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-sha512-tests b/modules/crypto/gc-sha512-tests index b007cd108e..22cb3bab4c 100644 --- a/modules/crypto/gc-sha512-tests +++ b/modules/crypto/gc-sha512-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-sha512 check_PROGRAMS += test-gc-sha512 -test_gc_sha512_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_sha512_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/crypto/gc-sm3-tests b/modules/crypto/gc-sm3-tests index 006f41f374..f64322a6d9 100644 --- a/modules/crypto/gc-sm3-tests +++ b/modules/crypto/gc-sm3-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc-sm3 check_PROGRAMS += test-gc-sm3 -test_gc_sm3_LDADD = $(LDADD) @LIB_CRYPTO@ +test_gc_sm3_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GETRANDOM) diff --git a/modules/sys_stat-c++-tests b/modules/sys_stat-c++-tests index 576ef07014..3a612151b4 100644 --- a/modules/sys_stat-c++-tests +++ b/modules/sys_stat-c++-tests @@ -15,5 +15,5 @@ if ANSICXX TESTS += test-sys_stat-c++ check_PROGRAMS += test-sys_stat-c++ test_sys_stat_c___SOURCES = test-sys_stat-c++.cc -test_sys_stat_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_MBRTOWC) +test_sys_stat_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_MBRTOWC) $(LIB_GETRANDOM) endif diff --git a/modules/unistd-c++-tests b/modules/unistd-c++-tests index 739382b562..3aaf52bbe7 100644 --- a/modules/unistd-c++-tests +++ b/modules/unistd-c++-tests @@ -15,5 +15,5 @@ if ANSICXX TESTS += test-unistd-c++ check_PROGRAMS += test-unistd-c++ test_unistd_c___SOURCES = test-unistd-c++.cc -test_unistd_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIBSOCKET) $(LIB_GETLOGIN) +test_unistd_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIBSOCKET) $(LIB_GETLOGIN) $(LIB_GETRANDOM) endif -- 2.39.5