source: patches/binutils-2.18-ppc64_fix_testsuite-1.patch@ 8e66c60c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8e66c60c was 6267f3b, checked in by Jim Gifford <clfs@…>, 17 years ago

Updated to Binutils 2.18.

  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[61534bf]1Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
2Date: 2006-07-22
3Initial Package Version: 2.17
4Origin: Jakub Jelinek, http://sourceware.org/ml/binutils/2004-08/msg00030.html
5Upstream Status: unknown
6Description: Fixes ld visibility errors on ppc64, rediffed to apply with -p1. The original was for a much earlier version of binutils, but still applies. I couldn't find why this wasn't committed, but at the time it only fixed some of the failures he was seeing.
7
8diff -Naur binutils-2.17vanilla/ld/testsuite/ld-elfvsb/elfvsb.exp binutils-2.17/ld/testsuite/ld-elfvsb/elfvsb.exp
9--- binutils-2.17vanilla/ld/testsuite/ld-elfvsb/elfvsb.exp 2005-05-12 08:32:06.000000000 +0100
10+++ binutils-2.17/ld/testsuite/ld-elfvsb/elfvsb.exp 2006-07-22 20:19:41.000000000 +0100
11@@ -315,8 +315,8 @@
12
13 # Now compile the code using -fpic.
14
15- if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
16- || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
17+ if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
18+ || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
19 unresolved "visibility ($visibility)"
20 } else {
21 if { [ string match $visibility "protected" ]
22@@ -337,7 +337,7 @@
23 }
24
25 # Now do the same tests again, but this time compile main.c PIC.
26- if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
27+ if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
28 unresolved "visibility ($visibility) (PIC main, non PIC so)"
29 unresolved "visibility ($visibility) (PIC main)"
30 } else {
31@@ -446,7 +446,7 @@
32 if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
33 unresolved "weak hidden symbol"
34 } else {
35- if { ![ld_compile "$CC -g $CFLAGS $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {
36+ if { ![ld_compile "$CC -g $CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {
37 unresolved "weak hidden symbol"
38 } else {
39 if ![ld_simple_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] {
40diff -Naur binutils-2.17vanilla/ld/testsuite/ld-elfvsb/sh1.c binutils-2.17/ld/testsuite/ld-elfvsb/sh1.c
41--- binutils-2.17vanilla/ld/testsuite/ld-elfvsb/sh1.c 2003-05-05 06:46:53.000000000 +0100
42+++ binutils-2.17/ld/testsuite/ld-elfvsb/sh1.c 2006-07-22 20:19:41.000000000 +0100
43@@ -13,7 +13,11 @@
44 /* This variable is defined in the shared library, and overridden by
45 the main program. */
46 #ifndef XCOFF_TEST
47+#ifdef SHARED
48 int overriddenvar = -1;
49+#else
50+extern int overriddenvar;
51+#endif
52 #endif
53
54 /* This variable is defined in the shared library. */
55@@ -76,12 +80,14 @@
56 return shlib_overriddencall2 ();
57 }
58
59+#ifdef SHARED
60 int
61 shlib_overriddencall2 ()
62 {
63 return 7;
64 }
65 #endif
66+#endif
67
68 /* This function calls a function defined by the main program. */
69
70diff -Naur binutils-2.17vanilla/ld/testsuite/ld-elfvsb/sh2.c binutils-2.17/ld/testsuite/ld-elfvsb/sh2.c
71--- binutils-2.17vanilla/ld/testsuite/ld-elfvsb/sh2.c 2003-04-28 04:31:36.000000000 +0100
72+++ binutils-2.17/ld/testsuite/ld-elfvsb/sh2.c 2006-07-22 20:19:41.000000000 +0100
73@@ -44,3 +44,13 @@
74 return 2;
75 }
76 #endif
77+
78+#if !defined (XCOFF_TEST) && !defined (SHARED)
79+int overriddenvar = -1;
80+
81+int
82+shlib_overriddencall2 ()
83+{
84+ return 7;
85+}
86+#endif
Note: See TracBrowser for help on using the repository browser.