ChangeLog rotatation and copyright year update
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / wrap.exp
CommitLineData
83ad0046 1# Expect script for wrap ELF tests.
b90efa5b 2# Copyright (C) 2006-2015 Free Software Foundation, Inc.
83ad0046 3#
f96b4a7b
NC
4# This file is part of the GNU Binutils.
5#
6# This program is free software; you can redistribute it and/or modify
83ad0046 7# it under the terms of the GNU General Public License as published by
f96b4a7b 8# the Free Software Foundation; either version 3 of the License, or
83ad0046
L
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
f96b4a7b
NC
18# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19# MA 02110-1301, USA.
83ad0046
L
20#
21
22# Exclude non-ELF targets.
23
24if ![is_elf_format] {
25 return
26}
27
28# The following tests require running the executable generated by ld.
29if ![isnative] {
30 return
31}
32
33# Check if compiler works
34if { [which $CC] == 0 } {
35 return
36}
37
38set build_tests {
39 {"Build libwrap1a.so"
40 "-shared" "-fPIC"
41 {wrap1a.c} {} "libwrap1a.so"}
42 {"Build libwrap1b.so"
43 "-shared tmpdir/libwrap1a.so" "-fPIC"
44 {wrap1b.c} {} "libwrap1b.so"}
45}
46
47set run_tests {
48 {"Run with libwrap1a.so and libwrap1b.so"
49 "--wrap par tmpdir/libwrap1a.so tmpdir/libwrap1b.so" ""
50 {wrap1.c} "wrap1" "wrap1.out"}
51 {"Run with libwrap1b.so and libwrap1a.so"
52 "--wrap par tmpdir/libwrap1b.so tmpdir/libwrap1a.so" ""
53 {wrap1.c} "wrap1" "wrap1.out"}
54}
55
56run_cc_link_tests $build_tests
57run_ld_link_exec_tests [] $run_tests
This page took 0.373744 seconds and 4 git commands to generate.