]> git.pld-linux.org Git - packages/glibc.git/blame - glibc-soversions-fix.patch
bogus
[packages/glibc.git] / glibc-soversions-fix.patch
CommitLineData
c1c4a746 12004-10-20 Roland McGrath <roland@redhat.com>
2
3 * Makeconfig ($(common-objpfx)shlib-versions.v.i): Check also
4 $(config-sysdirs) for shlib-versions files.
5
6 * Makeconfig ($(common-objpfx)soversions.i): Replace shell loop with
7 use of ...
8 * scripts/soversions.awk: ... this new file. Collect lib info and
9 match any DEFAULT line before emitting anything, so DEFAULT can come
10 later in the concatenation of shlib-versions files.
11
12Index: libc/Makeconfig
13===================================================================
14RCS file: /cvs/glibc/libc/Makeconfig,v
15retrieving revision 1.297
16retrieving revision 1.298
17diff -u -r1.297 -r1.298
18--- libc/Makeconfig 5 Aug 2004 03:34:28 -0000 1.297
19+++ libc/Makeconfig 21 Oct 2004 01:29:24 -0000 1.298
20@@ -799,26 +799,19 @@
21 # This lets add-ons give more-specific matches that override defaults
22 # in the top-level file.
23 $(common-objpfx)shlib-versions.v.i: \
24- $(wildcard $(patsubst %, $(..)%/shlib-versions,$(add-ons) $(subdirs)))\
25+ $(wildcard $(patsubst %, $(..)%/shlib-versions,$(add-ons) \
26+ $(config-sysdirs) \
27+ $(subdirs))) \
28 $(..)shlib-versions
29-$(common-objpfx)soversions.i: $(common-objpfx)shlib-versions.v
30- default_setname='$(filter-out %_default,$(oldest-abi:%=GLIBC_%))'; \
31- while read conf version setname; do \
32- test -n "$$version" && \
33- test `expr '$(config-machine)-$(config-vendor)-$(config-os)' \
34- : "$$conf"` != 0 || continue; \
35- if test "x$$version" = xDEFAULT; then \
36- default_setname="$$setname"; \
37- else \
38- $(abi-default_setname) \
39- lib=`echo $$version | sed 's/=.*$$//'`; \
40- if eval test -z "\$${versioned_$${lib}}"; then \
41- eval versioned_$${lib}=yes; \
42- number=`echo $$version | sed "s/^.*=//"`; \
43- echo $$lib $$number $${setname:-$${default_setname}}; \
44- fi; \
45- fi; \
46- done < $< > $@T; exit 0
47+
48+soversions-default-setname = $(patsubst %, %,\
49+ $(filter-out %_default,\
50+ $(oldest-abi:%=GLIBC_%)))
51+$(common-objpfx)soversions.i: $(..)scripts/soversions.awk \
52+ $(common-objpfx)shlib-versions.v
53+ $(AWK) -v default_setname='$(soversions-default-setname)' \
54+ -v config='$(config-machine)-$(config-vendor)-$(config-os)' \
55+ -f $^ > $@T
56 mv -f $@T $@
57 $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i
58 (while read lib number setname; do \
59Index: libc/scripts/soversions.awk
60===================================================================
61RCS file: /cvs/glibc/libc/scripts/soversions.awk,v
62retrieving revision 1.1
63diff -u -r1.1 soversions.awk
64--- libc/scripts/soversions.awk 21 Oct 2004 08:31:45 -0000
65+++ libc/scripts/soversions.awk 21 Oct 2004 01:29:26 -0000 1.1
66@@ -0,0 +1,38 @@
67+# awk script for shlib-versions.v.i -> soversions.i; see Makeconfig.
68+
69+# Only lines matching `config' (set with -v) are relevant to us.
70+config !~ $1 { next }
71+
72+# Obey the first matching DEFAULT line.
73+$2 == "DEFAULT" {
74+ if (!matched_default) {
75+ matched_default = 1;
76+ $1 = $2 = "";
77+ default_setname = $0;
78+ }
79+ next
80+}
81+
82+# Collect all lib lines before emitting anything, so DEFAULT
83+# can be interspersed.
84+{
85+ lib = number = $2;
86+ sub(/=.*$/, "", lib);
87+ sub(/^.*=/, "", number);
88+ if (lib in numbers) next;
89+ numbers[lib] = number;
90+ if (NF > 2) {
91+ $1 = $2 = "";
92+ versions[lib] = $0
93+ }
94+}
95+
96+END {
97+ for (lib in numbers) {
98+ set = (lib in versions) ? versions[lib] : default_setname;
99+ if (set)
100+ print lib, numbers[lib], set;
101+ else
102+ print lib, numbers[lib];
103+ }
104+}
This page took 0.092335 seconds and 4 git commands to generate.