diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index cfea09b5143d95c478f04619daa4214857206966..a36eabc9bed91bd36ca74204ef1059c4598ea5ce 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-28  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* testsuite/binutils-all/ar.exp: Use `supports_gnu_unique' with
+	the `unique_symbol' test.
+
 2016-06-28  Alan Modra  <amodra@gmail.com>
 
 	PR 20304
diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp
index b8e0e20a1a5e3d6a3dc5b1eff224e4a8f04107bf..604ebdc16a9c198b3191354ad7fdb2e280012a17 100644
--- a/binutils/testsuite/binutils-all/ar.exp
+++ b/binutils/testsuite/binutils-all/ar.exp
@@ -619,8 +619,6 @@ delete_an_element
 move_an_element
 empty_archive
 
-if { [is_elf_format]
-     && ![istarget "*-*-hpux*"]
-     && ![istarget "msp*-*-*"] } {
+if { [is_elf_format] && [supports_gnu_unique] } {
     unique_symbol
 }
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 14adc82cd883006c74dbb5a77feeff2e0b10f284..c49d9dc45a7ee631ce646d57278e4beaadb5c4b7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-28  Maciej W. Rozycki  <macro@imgtec.com>
+
+	* testsuite/gas/elf/elf.exp: Use `supports_gnu_unique' with the
+	`type' test.
+
 2016-06-28  Alan Modra  <amodra@gmail.com>
 
 	PR gas/20247
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 3e85ae21646699c3e02c465331e2ba6cffe0ee23..d57665e5fd0c552d773b11feeb14704a806097a3 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -184,12 +184,12 @@ if { [is_elf_format] } then {
     # The non-eabi ARM ports sets it to ELFOSABI_ARM.
     # So for these targets we cannot include an IFUNC symbol type
     # in the symbol type test.
-    # The Alpha FreeBSD target does not support unique objects.
+    # We also need to exclude targets that do not support unique objects.
     if {    [istarget "*-*-hpux*"]
-	 || [istarget "alpha*-*-*freebsd*"]
 	 || [istarget "arm*-*-*"]
 	 || [istarget "msp*-*-*"]
 	 || [istarget "visium-*-*"]
+	 || ![supports_gnu_unique]
      } then {
 	# hppa64 has a non-standard common directive
 	if { ![istarget "hppa64*-*-hpux*"] } then {