[RESEND] Enable building of libatomic on AArch64

2013-10-17 Thread Michael Hudson-Doyle
Resending as the previous attempt went missing...

  2013-10-04  Michael Hudson-Doyle  

* libatomic/configure.tgt (aarch64*): Remove code preventing
  build.

* gcc/testsuite/lib/target-supports.exp
  (check_effective_target_sync_long_long): AArch64 supports
  atomic operations on "long long".
  (check_effective_target_sync_long_long_runtime): AArch64 can
  execute atomic operations on "long long".

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 7eb4dfe..5557c06 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4508,6 +4508,7 @@ proc check_effective_target_sync_int_128_runtime { } {
 proc check_effective_target_sync_long_long { } {
 if { [istarget x86_64-*-*]
 	 || [istarget i?86-*-*])
+	 || [istarget aarch64*-*-*]
 	 || [istarget arm*-*-*]
 	 || [istarget alpha*-*-*]
 	 || ([istarget sparc*-*-*] && [check_effective_target_lp64]) } {
@@ -4537,6 +4538,8 @@ proc check_effective_target_sync_long_long_runtime { } {
 		}
 	} ""
 	}]
+} elseif { [istarget aarch64*-*-*] } {
+	return 1
 } elseif { [istarget arm*-*-linux-*] } {
 	return [check_runtime sync_longlong_runtime {
 	#include 
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
index b9e5d6c..7eaab38 100644
--- a/libatomic/configure.tgt
+++ b/libatomic/configure.tgt
@@ -95,11 +95,6 @@ fi
 
 # Other system configury
 case "${target}" in
-  aarch64*)
-	# This is currently not supported in AArch64.
-	UNSUPPORTED=1
-	;;
-
   arm*-*-linux*)
 	# OS support for atomic primitives.
 	config_path="${config_path} linux/arm posix"


Re: [RESEND] Enable building of libatomic on AArch64

2013-10-17 Thread Marcus Shawcroft
On 17 October 2013 10:43, Michael Hudson-Doyle
 wrote:
> Resending as the previous attempt went missing...
>
>   2013-10-04  Michael Hudson-Doyle  
>
> * libatomic/configure.tgt (aarch64*): Remove code preventing
>   build.
>
> * gcc/testsuite/lib/target-supports.exp
>   (check_effective_target_sync_long_long): AArch64 supports
>   atomic operations on "long long".
>   (check_effective_target_sync_long_long_runtime): AArch64 can
>   execute atomic operations on "long long".
>

OK, and committed.
/Marcus