forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0015-resolv-Fix-tst-resolv-tests-for-2.35-ABIs-and-later.patch
84 lines (72 loc) · 2.8 KB
/
0015-resolv-Fix-tst-resolv-tests-for-2.35-ABIs-and-later.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From 264ad5d7d66c0f18587860d62498b8f2a9001400 Mon Sep 17 00:00:00 2001
From: Stafford Horne <shorne@gmail.com>
Date: Sat, 12 Feb 2022 08:17:55 +0900
Subject: [PATCH 15/28] resolv: Fix tst-resolv tests for 2.35 ABIs and later
The commit 737e873b30 ("resolv: Do not build libanl.so for ABIs starting
at 2.35") disabled building libanl for ports supporting only 2.35 and
later like OpenRISC.
However, the if statement was not updated quite correctly and the change
ends up disabling many tst-resolv* tests. This was not supposed to be
done and it causes test dependency errors like:
make: Entering directory 'gnu-home/glibc/resolv'
make: *** No rule to make target 'gnu-home/build-glibc/resolv/tst-resolv-res_ninit.out', needed by 'gnu-home/build-glibc/resolv/mtrace-tst-resolv-res_ninit.out'. Stop.
make: Leaving directory 'gnu-home/glibc/resolv'
This patch move the extra-libs += libanl definition and condition down
to be closer to other libanl definitions. The $(have-GLIBC_2.34)
condition now includes libanl-routines and libanl-shared-only-routines as
well.
Also, I have added a comment to endif of $(have-thread-library) to help
show the bondary of the have-thread-library definitions.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit ee5d27bea53626c0187f77feec2c883f2c6ac4b3)
---
resolv/Makefile | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/resolv/Makefile b/resolv/Makefile
index c465479e8b..438672786f 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -79,11 +79,6 @@ generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
extra-libs := libresolv libnss_dns
ifeq ($(have-thread-library),yes)
routines += gai_sigqueue
-endif
-
-ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
-# Empty compatibility library for old binaries.
-extra-libs += libanl
tests += \
tst-bug18665 \
@@ -144,7 +139,8 @@ xtests += tst-resolv-qtypes
# This test has dropped packet tests and runs for a long time.
xtests += tst-resolv-rotate
-endif
+endif # $(have-thread-library)
+
extra-libs-others = $(extra-libs)
libresolv-routines := \
base64 \
@@ -168,6 +164,13 @@ libresolv-routines := \
resolv-deprecated \
# libresolv-routines
+ifeq ($(have-GLIBC_2.34)$(have-thread-library),yesyes)
+# Empty compatibility library for old binaries.
+extra-libs += libanl
+libanl-routines += libanl-compat
+libanl-shared-only-routines += libanl-compat
+endif
+
$(libanl-routines-var) += \
gai_cancel \
gai_error \
@@ -177,9 +180,6 @@ $(libanl-routines-var) += \
getaddrinfo_a \
# $(libanl-routines-var)
-libanl-routines += libanl-compat
-libanl-shared-only-routines += libanl-compat
-
# Pretend that libanl.so is a linker script, so that the symbolic link
# is not installed.
install-lib-ldscripts = libanl.so
--
2.33.1