summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc/glibc-2.4/zecke-sane-readelf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/glibc/glibc-2.4/zecke-sane-readelf.patch')
-rw-r--r--meta/packages/glibc/glibc-2.4/zecke-sane-readelf.patch149
1 files changed, 149 insertions, 0 deletions
diff --git a/meta/packages/glibc/glibc-2.4/zecke-sane-readelf.patch b/meta/packages/glibc/glibc-2.4/zecke-sane-readelf.patch
new file mode 100644
index 0000000000..023b6a51bc
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/zecke-sane-readelf.patch
@@ -0,0 +1,149 @@
1Index: glibc-2.4/configure
2===================================================================
3--- glibc-2.4.orig/configure 2006-03-06 12:18:56.000000000 +0100
4+++ glibc-2.4/configure 2006-08-06 14:10:51.000000000 +0200
5@@ -5488,6 +5488,95 @@
6 fi
7 fi
8
9+### XXXX copy and pasted
10+# Check for readelf
11+# Extract the first word of "$target_alias-readelf", so it can be a program name with args.
12+set dummy $target_alias-readelf; ac_word=$2
13+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
14+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15+if test "${ac_cv_prog_READELF+set}" = set; then
16+ echo $ECHO_N "(cached) $ECHO_C" >&6
17+else
18+ if test -n "$READELF"; then
19+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
20+else
21+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22+for as_dir in $PATH
23+do
24+ IFS=$as_save_IFS
25+ test -z "$as_dir" && as_dir=.
26+ for ac_exec_ext in '' $ac_executable_extensions; do
27+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
28+ ac_cv_prog_READELF="$target_alias-readelf"
29+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
30+ break 2
31+ fi
32+done
33+done
34+IFS=$as_save_IFS
35+
36+fi
37+fi
38+READELF=$ac_cv_prog_READELF
39+if test -n "$READELF"; then
40+ { echo "$as_me:$LINENO: result: $READELF" >&5
41+echo "${ECHO_T}$READELF" >&6; }
42+else
43+ { echo "$as_me:$LINENO: result: no" >&5
44+echo "${ECHO_T}no" >&6; }
45+fi
46+
47+
48+if test -z "$ac_cv_prog_READELF"; then
49+ if test "$build" = "$target"; then
50+ ac_ct_READELF=$READELF
51+ # Extract the first word of "readelf", so it can be a program name with args.
52+set dummy readelf; ac_word=$2
53+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
54+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
55+if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then
56+ echo $ECHO_N "(cached) $ECHO_C" >&6
57+else
58+ if test -n "$ac_ct_READELF"; then
59+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
60+else
61+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62+for as_dir in $PATH
63+do
64+ IFS=$as_save_IFS
65+ test -z "$as_dir" && as_dir=.
66+ for ac_exec_ext in '' $ac_executable_extensions; do
67+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
68+ ac_cv_prog_ac_ct_READELF="readelf"
69+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
70+ break 2
71+ fi
72+done
73+done
74+IFS=$as_save_IFS
75+
76+ test -z "$ac_cv_prog_ac_ct_READELF" && ac_cv_prog_ac_ct_READELF="readelf"
77+fi
78+fi
79+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
80+if test -n "$ac_ct_READELF"; then
81+ { echo "$as_me:$LINENO: result: $ac_ct_READELF" >&5
82+echo "${ECHO_T}$ac_ct_READELF" >&6; }
83+else
84+ { echo "$as_me:$LINENO: result: no" >&5
85+echo "${ECHO_T}no" >&6; }
86+fi
87+
88+ READELF=ac_ct_READELF
89+ else
90+ READELF="readelf"
91+ fi
92+else
93+ READELF="$ac_cv_prog_READELF"
94+fi
95+
96+### XXXX copy and pasted
97+
98 echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
99 echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
100 if test "${libc_cv_initfini_array+set}" = set; then
101@@ -5507,7 +5596,7 @@
102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
103 (exit $ac_status); }; }
104 then
105- if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
106+ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
107 libc_cv_initfini_array=yes
108 else
109 libc_cv_initfini_array=no
110@@ -5801,7 +5890,7 @@
111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
112 (exit $ac_status); }; }
113 then
114- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
115+ if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
116 libc_cv_z_combreloc=yes
117 else
118 libc_cv_z_combreloc=no
119Index: glibc-2.4/configure.in
120===================================================================
121--- glibc-2.4.orig/configure.in 2006-03-01 10:17:40.000000000 +0100
122+++ glibc-2.4/configure.in 2006-08-06 14:09:31.000000000 +0200
123@@ -1350,6 +1350,8 @@
124 fi
125 fi
126
127+ AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
128+
129 AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
130 libc_cv_initfini_array, [dnl
131 cat > conftest.c <<EOF
132@@ -1361,7 +1363,7 @@
133 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
134 -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
135 then
136- if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
137+ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
138 libc_cv_initfini_array=yes
139 else
140 libc_cv_initfini_array=no
141@@ -1543,7 +1545,7 @@
142 dnl introducing new options this is not easily doable. Instead use a tool
143 dnl which always is cross-platform: readelf. To detect whether -z combreloc
144 dnl look for a section named .rel.dyn.
145- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
146+ if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
147 libc_cv_z_combreloc=yes
148 else
149 libc_cv_z_combreloc=no