source: patches/binutils-2.17-ppc64_fix_testsuite-1.patch@ 3b72a1e

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 3b72a1e was 61534bf, checked in by Jim Gifford <clfs@…>, 18 years ago

r4771@server (orig r2077): ken | 2006-07-22 14:51:13 -0700
patch to fix binutils ld visibility tests on ppc64.

  • Property mode set to 100644
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  
    315315
    316316        # Now compile the code using -fpic.
    317317
    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] } {
    320320            unresolved "visibility ($visibility)"
    321321        } else {
    322322            if { [ string match $visibility "protected" ]
     
    337337    }
    338338
    339339    # 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] {
    341341        unresolved "visibility ($visibility) (PIC main, non PIC so)"
    342342        unresolved "visibility ($visibility) (PIC main)"
    343343    } else {
     
    446446if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
    447447    unresolved "weak hidden symbol"
    448448} 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] } {
    450450        unresolved "weak hidden symbol"
    451451    } else {
    452452        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  
    1313/* This variable is defined in the shared library, and overridden by
    1414   the main program.  */
    1515#ifndef XCOFF_TEST
     16#ifdef SHARED
    1617int overriddenvar = -1;
     18#else
     19extern int overriddenvar;
     20#endif
    1721#endif
    1822
    1923/* This variable is defined in the shared library.  */
     
    7680  return shlib_overriddencall2 ();
    7781}
    7882
     83#ifdef SHARED
    7984int
    8085shlib_overriddencall2 ()
    8186{
    8287  return 7;
    8388}
    8489#endif
     90#endif
    8591
    8692/* This function calls a function defined by the main program.  */
    8793
  • 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  
    4444  return 2;
    4545}
    4646#endif
     47
     48#if !defined (XCOFF_TEST) && !defined (SHARED)
     49int overriddenvar = -1;
     50
     51int
     52shlib_overriddencall2 ()
     53{
     54  return 7;
     55}
     56#endif
Note: See TracBrowser for help on using the repository browser.