diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-06-06 05:36:23 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-06-09 10:05:40 -0700 |
commit | c8d581bdf731714977b1592e74d05e000535e338 (patch) | |
tree | a729df00ab3d3e00866c8636ed4cada57cdc904e | |
parent | 4a0c4eaea320a418400afc4d63359ed6c4af5548 (diff) | |
download | gcc-c8d581bdf731714977b1592e74d05e000535e338.zip gcc-c8d581bdf731714977b1592e74d05e000535e338.tar.gz gcc-c8d581bdf731714977b1592e74d05e000535e338.tar.bz2 |
libgomp: Compile tests with -march=i486 only if needed
Don't add -march=i486 if atomic compare-and-swap is supported on 'int'.
This fixes libgomp tests with "-march=x86-64 -m32 -fcf-protection".
* testsuite/lib/libgomp.exp (libgomp_init): Don't add -march=i486
if atomic compare-and-swap is supported on 'int'.
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 45c78d8..a205015 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -210,7 +210,8 @@ proc libgomp_init { args } { # We use atomic operations in the testcases to validate results. if { ([istarget i?86-*-*] || [istarget x86_64-*-*]) - && [check_effective_target_ia32] } { + && [check_effective_target_ia32] + && ![check_effective_target_cas_char] } { lappend ALWAYS_CFLAGS "additional_flags=-march=i486" } |