1*6881a400Schristos# Copyright (C) 2021-2022 Free Software Foundation, Inc. 2*6881a400Schristos# 3*6881a400Schristos# This file is part of the GNU Binutils. 4*6881a400Schristos# 5*6881a400Schristos# This program is free software; you can redistribute it and/or modify 6*6881a400Schristos# it under the terms of the GNU General Public License as published by 7*6881a400Schristos# the Free Software Foundation; either version 3 of the License, or 8*6881a400Schristos# (at your option) any later version. 9*6881a400Schristos# 10*6881a400Schristos# This program is distributed in the hope that it will be useful, 11*6881a400Schristos# but WITHOUT ANY WARRANTY; without even the implied warranty of 12*6881a400Schristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*6881a400Schristos# GNU General Public License for more details. 14*6881a400Schristos# 15*6881a400Schristos# You should have received a copy of the GNU General Public License 16*6881a400Schristos# along with this program; if not, write to the Free Software 17*6881a400Schristos# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 18*6881a400Schristos# MA 02110-1301, USA. 19*6881a400Schristos# 20*6881a400Schristos 21*6881a400Schristosif {![check_ctf_available]} { 22*6881a400Schristos unsupported "no CTF format support in the compiler" 23*6881a400Schristos return 0 24*6881a400Schristos} 25*6881a400Schristos 26*6881a400Schristosif ![is_elf_format] { 27*6881a400Schristos unsupported "CTF needs bfd changes to be emitted on non-ELF" 28*6881a400Schristos return 0 29*6881a400Schristos} 30*6881a400Schristos 31*6881a400Schristosif {[info exists env(LC_ALL)]} { 32*6881a400Schristos set old_lc_all $env(LC_ALL) 33*6881a400Schristos} 34*6881a400Schristosset env(LC_ALL) "C" 35*6881a400Schristos 36*6881a400Schristosset ctf_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.lk]] 37*6881a400Schristos 38*6881a400Schristosforeach ctf_test $ctf_test_list { 39*6881a400Schristos verbose [file rootname $ctf_test] 40*6881a400Schristos verbose running lookup test on $ctf_test 41*6881a400Schristos run_lookup_test [file rootname $ctf_test] 42*6881a400Schristos} 43*6881a400Schristos 44*6881a400Schristosif {[info exists old_lc_all]} { 45*6881a400Schristos set env(LC_ALL) $old_lc_all 46*6881a400Schristos} else { 47*6881a400Schristos unset env(LC_ALL) 48*6881a400Schristos} 49