| 1 |
# Copyright (C) 2014-2025 Free Software Foundation, Inc. |
| 2 |
|
| 3 |
# This program is free software; you can redistribute it and/or modify |
| 4 |
# it under the terms of the GNU General Public License as published by |
| 5 |
# the Free Software Foundation; either version 3 of the License, or |
| 6 |
# (at your option) any later version. |
| 7 |
# |
| 8 |
# This program is distributed in the hope that it will be useful, |
| 9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
# GNU General Public License for more details. |
| 12 |
# |
| 13 |
# You should have received a copy of the GNU General Public License |
| 14 |
# along with GCC; see the file COPYING3. If not see |
| 15 |
# <http://www.gnu.org/licenses/>. |
| 16 |
|
| 17 |
# Clear hardware capabilities on Solaris. |
| 18 |
if [istarget *-*-solaris2*] { |
| 19 |
set clearcap_ldflags "-mclear-hwcap" |
| 20 |
} |
| 21 |
|
| 22 |
# |
| 23 |
# clearcap-init -- called at the start of each subdir of tests |
| 24 |
# |
| 25 |
|
| 26 |
proc clearcap-init { args } { |
| 27 |
global TEST_ALWAYS_FLAGS |
| 28 |
global ALWAYS_CXXFLAGS |
| 29 |
global clearcap_saved_TEST_ALWAYS_FLAGS |
| 30 |
global clearcap_ldflags |
| 31 |
|
| 32 |
if [info exists TEST_ALWAYS_FLAGS] { |
| 33 |
set clearcap_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS |
| 34 |
} |
| 35 |
if [info exists clearcap_ldflags] { |
| 36 |
if [info exists ALWAYS_CXXFLAGS] { |
| 37 |
set ALWAYS_CXXFLAGS [concat "{ldflags=$clearcap_ldflags}" $ALWAYS_CXXFLAGS] |
| 38 |
} else { |
| 39 |
append TEST_ALWAYS_FLAGS " $clearcap_ldflags" |
| 40 |
} |
| 41 |
} |
| 42 |
return 0 |
| 43 |
} |
| 44 |
|
| 45 |
# |
| 46 |
# clearcap-finish -- called at the start of each subdir of tests |
| 47 |
# |
| 48 |
|
| 49 |
proc clearcap-finish { args } { |
| 50 |
global TEST_ALWAYS_FLAGS |
| 51 |
global clearcap_saved_TEST_ALWAYS_FLAGS |
| 52 |
|
| 53 |
if [info exists clearcap_saved_TEST_ALWAYS_FLAGS] { |
| 54 |
set TEST_ALWAYS_FLAGS $clearcap_saved_TEST_ALWAYS_FLAGS |
| 55 |
} else { |
| 56 |
unset TEST_ALWAYS_FLAGS |
| 57 |
} |
| 58 |
clear_effective_target_cache |
| 59 |
} |