1 # Copyright
(C
) 2014-2017 Free Software Foundation
, Inc.
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.
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.
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
/>.
17 # Clear hardware capabilities
on Solaris.
18 if [istarget
*-*-solaris2
*] {
19 set clearcap_ldflags
"-mclear-hwcap"
23 # clearcap
-init
-- called at the start of each subdir of tests
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
32 if [info exists TEST_ALWAYS_FLAGS
] {
33 set clearcap_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
35 if [info exists clearcap_ldflags
] {
36 if [info exists ALWAYS_CXXFLAGS
] {
37 set ALWAYS_CXXFLAGS
[concat
"{ldflags=$clearcap_ldflags}" $ALWAYS_CXXFLAGS]
39 append TEST_ALWAYS_FLAGS
" $clearcap_ldflags"
46 # clearcap
-finish
-- called at the start of each subdir of tests
49 proc clearcap
-finish
{ args } {
50 global TEST_ALWAYS_FLAGS
51 global clearcap_saved_TEST_ALWAYS_FLAGS
53 if [info exists clearcap_saved_TEST_ALWAYS_FLAGS
] {
54 set TEST_ALWAYS_FLAGS $clearcap_saved_TEST_ALWAYS_FLAGS
56 unset TEST_ALWAYS_FLAGS
58 clear_effective_target_cache