44 lines
1.7 KiB
Plaintext
44 lines
1.7 KiB
Plaintext
|
# Copyright (C) 1988, 90-96, 1997, 2000 Free Software Foundation, Inc.
|
||
|
|
||
|
# This program is free software; you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU General Public License as published by
|
||
|
# the Free Software Foundation; either version 2 of the License, or
|
||
|
# (at your option) any later version.
|
||
|
#
|
||
|
# This program is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with this program; if not, write to the Free Software
|
||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
|
|
||
|
# This file used to be gcc.c-torture/special/special.exp, which
|
||
|
# was written by Rob Savoye. (rob@cygnus.com)
|
||
|
# All the other tests driven by that file have since been moved elsewhere.
|
||
|
|
||
|
if [isnative] then {
|
||
|
set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}]
|
||
|
if ![string match "" $lines] then {
|
||
|
fail "linkage.c"
|
||
|
} else {
|
||
|
# This is a completely bogus test. Sorry.
|
||
|
catch { exec rm -f linkage-y.o }
|
||
|
send_log "cc -c $srcdir/$subdir/linkage-y.c >&/dev/null\n"
|
||
|
catch { exec cc -c "$srcdir/$subdir/linkage-y.c" >&/dev/null }
|
||
|
if ![file exists "linkage-y.o"] then {
|
||
|
send_log "c89 -c $srcdir/$subdir/linkage-y.c >&/dev/null\n"
|
||
|
catch { exec c89 -c "$srcdir/$subdir/linkage-y.c" >&/dev/null }
|
||
|
}
|
||
|
if [file exists "linkage-y.o"] then {
|
||
|
set lines [gcc_target_compile "linkage-y.o linkage-x.o" "x" executable ""]
|
||
|
if [string match "" $lines] then {
|
||
|
pass "linkage.c"
|
||
|
} else {
|
||
|
fail "linkage.c"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|