This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch,testsuite,AVR]: target-supports.exp: AVR does not support TLS


The auto-detect machinery fails to correctly detect that TLS is not supported
on AVR.  This leads to gross noise of several hundreds of FAILs in testsuite.

This patch explicitly tells that AVR doesn't support TLS.

Lightly tested with testsuite run on avr-unknown-none where tests like
gcc.dg/debug/tls-1.c ran into ICE are UNSUPPORTED now.

Okay for trunk?

testsuite/
	* lib/target-supports.exp (check_effective_target_tls): AVR has no
	support for TLS.
	(check_effective_target_tls_native): Ditto.
	(check_effective_target_tls_emulated): Ditto.
	(check_effective_target_tls_runtime): Ditto.
Index: testsuite/lib/target-supports.exp
===================================================================
--- testsuite/lib/target-supports.exp	(revision 179738)
+++ testsuite/lib/target-supports.exp	(working copy)
@@ -607,6 +607,11 @@ proc add_options_for_tls { flags } {
 # Return 1 if thread local storage (TLS) is supported, 0 otherwise.
 
 proc check_effective_target_tls {} {
+    # AVR has no support for TLS.  Auto-detect fails here.    
+    if { [istarget avr-*-*] } {
+	return 0
+    }
+
     return [check_no_compiler_messages tls assembly {
 	__thread int i;
 	int f (void) { return i; }
@@ -623,6 +628,11 @@ proc check_effective_target_tls_native {
 	return 0
     }
     
+    # AVR has no support for TLS.  Auto-detect fails here.    
+    if { [istarget avr-*-*] } {
+	return 0
+    }
+
     return [check_no_messages_and_pattern tls_native "!emutls" assembly {
 	__thread int i;
 	int f (void) { return i; }
@@ -639,6 +649,11 @@ proc check_effective_target_tls_emulated
 	return 1
     }
     
+    # AVR has no support for TLS.  Auto-detect fails here.    
+    if { [istarget avr-*-*] } {
+	return 0
+    }
+
     return [check_no_messages_and_pattern tls_emulated "emutls" assembly {
 	__thread int i;
 	int f (void) { return i; }
@@ -649,6 +664,11 @@ proc check_effective_target_tls_emulated
 # Return 1 if TLS executables can run correctly, 0 otherwise.
 
 proc check_effective_target_tls_runtime {} {
+    # AVR has no support for TLS.  Auto-detect fails here.    
+    if { [istarget avr-*-*] } {
+	return 0
+    }
+
     return [check_runtime tls_runtime {
 	__thread int thr = 0;
 	int main (void) { return thr; }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]