mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 02:35:00 +08:00
comment changes
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# Expect script for ld-shared tests
|
||||
# Copyright (C) 1994,1995 Free Software Foundation
|
||||
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -36,6 +36,10 @@ if { ![istarget i386-*-sysv4*] \
|
||||
&& ![istarget i386-*-elf*] \
|
||||
&& ![istarget i486-*-elf*] \
|
||||
&& ![istarget i586-*-elf*] \
|
||||
&& ![istarget i386-*-linux*] \
|
||||
&& ![istarget i486-*-linux*] \
|
||||
&& ![istarget i586-*-linux*] \
|
||||
&& ![istarget m68k-*-linux*] \
|
||||
&& ![istarget mips*-*-irix5*] \
|
||||
&& ![istarget sparc*-*-elf] \
|
||||
&& ![istarget sparc*-*-solaris2*] \
|
||||
@ -45,6 +49,16 @@ if { ![istarget i386-*-sysv4*] \
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget i386-*-linuxaout*] \
|
||||
|| [istarget i486-*-linuxaout*] \
|
||||
|| [istarget i586-*-linuxaout*] \
|
||||
|| [istarget i386-*-linuxoldld*] \
|
||||
|| [istarget i486-*-linuxoldld*] \
|
||||
|| [istarget i586-*-linuxoldld*] \
|
||||
|| [istarget m68k-*-linuxaout*] } {
|
||||
return
|
||||
}
|
||||
|
||||
set tmpdir tmpdir
|
||||
set SHCFLAG ""
|
||||
|
||||
@ -125,7 +139,7 @@ proc shared_test { progname testname main sh1 sh2 dat } {
|
||||
send_log "diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat\n"
|
||||
verbose "diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat"
|
||||
catch "exec diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat" exec_output
|
||||
set exec_output [prune_system_crud $host_triplet $exec_output]
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
|
||||
if {![string match "" $exec_output]} then {
|
||||
send_log "$exec_output\n"
|
||||
@ -137,9 +151,11 @@ proc shared_test { progname testname main sh1 sh2 dat } {
|
||||
pass "$testname"
|
||||
}
|
||||
|
||||
if [istarget mips*-*-*] {
|
||||
set picflag ""
|
||||
} else {
|
||||
# Unfortunately, the gcc argument is -fpic and the cc argument is
|
||||
# -KPIC. We have to try both.
|
||||
|
||||
set picflag "-fpic"
|
||||
send_log "$CC $picflag\n"
|
||||
verbose "$CC $picflag"
|
||||
@ -156,6 +172,7 @@ if { [string match "*illegal option*" $exec_output] \
|
||||
set picflag "-KPIC"
|
||||
}
|
||||
}
|
||||
}
|
||||
verbose "Using $picflag to compile PIC code"
|
||||
|
||||
# Compile the main program.
|
||||
@ -175,8 +192,13 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
|
||||
} else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
|
||||
shared_test shnp "shared (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff
|
||||
} else {
|
||||
# SunOS can not handle non PIC code in a shared library
|
||||
# SunOS non PIC shared libraries don't permit some cases of
|
||||
# overriding.
|
||||
setup_xfail "*-*-sunos4*"
|
||||
# On Linux/m68k this fails because non-pic references to symbols
|
||||
# in the same section may be resolved by the assembler if they
|
||||
# are pc-relative.
|
||||
setup_xfail "m68k-*-linux*"
|
||||
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
|
||||
} }
|
||||
|
||||
@ -206,8 +228,13 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
|
||||
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
|
||||
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o xcoff
|
||||
} else {
|
||||
# SunOS can not handle non PIC code in a shared library
|
||||
# SunOS non PIC shared libraries don't permit some cases of
|
||||
# overriding.
|
||||
setup_xfail "*-*-sunos4*"
|
||||
# On Linux/m68k this fails because non-pic references to symbols
|
||||
# in the same section may be resolved by the assembler if they
|
||||
# are pc-relative.
|
||||
setup_xfail "m68k-*-linux*"
|
||||
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user