Use better test for usable compiler in ld testsuite.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / audit.exp
index 83ee35582e64b9048c073af38162ba4306a54e5a..5cc044ba7efed4a7cfe5b37a2a7ba38a3bce861e 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various ELF tests.
-#   Copyright (C) 2009-2017 Free Software Foundation, Inc.
+#   Copyright (C) 2009-2019 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -32,7 +32,7 @@ if ![check_shared_lib_support] {
 }
 
 # Check if compiler works
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
     return
 }
 
@@ -49,7 +49,7 @@ set build_tests {
   {"Run with shared with --audit"
      "-shared -Wl,--audit=tmpdir/audit.so" "-fPIC"
      {main.c} {} "libusesaudit.so"}
-  {"Run with shared with --audit"
+  {"Run with shared with three --audit"
      "-shared -Wl,--audit=tmpdir/audit.so -Wl,--audit=tmpdir/audit2.so \
      -Wl,--audit=tmpdir/audit3.so"
      "-fPIC"
@@ -60,6 +60,9 @@ set build_tests {
   {"Run with -lusesaudit -lusesaudit2"
      "-Ltmpdir/ -lusesaudit -lusesaudit2" ""
      {main.c} {{"readelf" {-d} "depaudit2.rd"}} "useslibusesaudit2.out"}
+  {"Link with -z globalaudit"
+     "-Wl,-Paudit.so -Wl,-z,globalaudit" ""
+     {main.c} {{"readelf" {-d} "globalaudit.rd"}} "globalaudit.out"}   
 }
 
 run_cc_link_tests $build_tests
This page took 0.025474 seconds and 4 git commands to generate.