source:
patches/binutils-2.17-ppc64_fix_testsuite-1.patch@
1e6c309
Last change on this file since 1e6c309 was 61534bf, checked in by , 18 years ago | |
---|---|
|
|
File size: 3.4 KB |
-
ld/testsuite/ld-elfvsb/elfvsb.exp
Submitted By: Ken Moffat <ken at linuxfromscratch dot org> Date: 2006-07-22 Initial Package Version: 2.17 Origin: Jakub Jelinek, http://sourceware.org/ml/binutils/2004-08/msg00030.html Upstream Status: unknown Description: 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. diff -Naur binutils-2.17vanilla/ld/testsuite/ld-elfvsb/elfvsb.exp binutils-2.17/ld/testsuite/ld-elfvsb/elfvsb.exp
old new 315 315 316 316 # Now compile the code using -fpic. 317 317 318 if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]319 || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {318 if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o] 319 || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } { 320 320 unresolved "visibility ($visibility)" 321 321 } else { 322 322 if { [ string match $visibility "protected" ] … … 337 337 } 338 338 339 339 # Now do the same tests again, but this time compile main.c PIC. 340 if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {340 if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] { 341 341 unresolved "visibility ($visibility) (PIC main, non PIC so)" 342 342 unresolved "visibility ($visibility) (PIC main)" 343 343 } else { … … 446 446 if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } { 447 447 unresolved "weak hidden symbol" 448 448 } else { 449 if { ![ld_compile "$CC -g $CFLAGS $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {449 if { ![ld_compile "$CC -g $CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } { 450 450 unresolved "weak hidden symbol" 451 451 } else { 452 452 if ![ld_simple_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] { -
ld/testsuite/ld-elfvsb/sh1.c
diff -Naur binutils-2.17vanilla/ld/testsuite/ld-elfvsb/sh1.c binutils-2.17/ld/testsuite/ld-elfvsb/sh1.c
old new 13 13 /* This variable is defined in the shared library, and overridden by 14 14 the main program. */ 15 15 #ifndef XCOFF_TEST 16 #ifdef SHARED 16 17 int overriddenvar = -1; 18 #else 19 extern int overriddenvar; 20 #endif 17 21 #endif 18 22 19 23 /* This variable is defined in the shared library. */ … … 76 80 return shlib_overriddencall2 (); 77 81 } 78 82 83 #ifdef SHARED 79 84 int 80 85 shlib_overriddencall2 () 81 86 { 82 87 return 7; 83 88 } 84 89 #endif 90 #endif 85 91 86 92 /* This function calls a function defined by the main program. */ 87 93 -
ld/testsuite/ld-elfvsb/sh2.c
diff -Naur binutils-2.17vanilla/ld/testsuite/ld-elfvsb/sh2.c binutils-2.17/ld/testsuite/ld-elfvsb/sh2.c
old new 44 44 return 2; 45 45 } 46 46 #endif 47 48 #if !defined (XCOFF_TEST) && !defined (SHARED) 49 int overriddenvar = -1; 50 51 int 52 shlib_overriddencall2 () 53 { 54 return 7; 55 } 56 #endif
Note:
See TracBrowser
for help on using the repository browser.