tcl global directive outside proc body does nothing (ld)
authorAlan Modra <amodra@gmail.com>
Thu, 4 Jun 2020 05:27:12 +0000 (14:57 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 4 Jun 2020 06:41:19 +0000 (16:11 +0930)
* testsuite/config/default.exp: Remove global directive outside
proc body.
* testsuite/ld-bootstrap/bootstrap.exp: Likewise.
* testsuite/ld-elf/compress.exp: Likewise.
* testsuite/ld-elf/elf.exp: Likewise.
* testsuite/ld-elf/exclude.exp: Likewise.
* testsuite/ld-elf/frame.exp: Likewise.
* testsuite/ld-elf/indirect.exp: Likewise.
* testsuite/ld-elf/linux-x86.exp: Likewise.
* testsuite/ld-elf/shared.exp: Likewise.
* testsuite/ld-elf/tls.exp: Likewise.
* testsuite/ld-elf/tls_common.exp: Likewise.
* testsuite/ld-elfcomm/elfcomm.exp: Likewise.
* testsuite/ld-elfweak/elfweak.exp: Likewise.
* testsuite/ld-frv/fdpic.exp: Likewise.
* testsuite/ld-frv/tls.exp: Likewise.
* testsuite/ld-gc/gc.exp: Likewise.
* testsuite/ld-i386/i386.exp: Likewise.
* testsuite/ld-i386/no-plt.exp: Likewise.
* testsuite/ld-ifunc/ifunc.exp: Likewise.
* testsuite/ld-mips-elf/mips-elf-flags.exp: Likewise.
* testsuite/ld-nios2/nios2.exp: Likewise.
* testsuite/ld-plugin/lto.exp: Likewise.
* testsuite/ld-plugin/plugin.exp: Likewise.
* testsuite/ld-powerpc/export-class.exp: Likewise.
* testsuite/ld-scripts/align.exp: Likewise.
* testsuite/ld-scripts/crossref.exp: Likewise.
* testsuite/ld-scripts/defined.exp: Likewise.
* testsuite/ld-scripts/overlay-size.exp: Likewise.
* testsuite/ld-scripts/provide.exp: Likewise.
* testsuite/ld-scripts/weak.exp: Likewise.
* testsuite/ld-selective/selective.exp: Likewise.
* testsuite/ld-sh/rd-sh.exp: Likewise.
* testsuite/ld-size/size.exp: Likewise.
* testsuite/ld-srec/srec.exp: Likewise.
* testsuite/ld-x86-64/mpx.exp: Likewise.
* testsuite/ld-x86-64/no-plt.exp: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Likewise.

38 files changed:
ld/ChangeLog
ld/testsuite/config/default.exp
ld/testsuite/ld-bootstrap/bootstrap.exp
ld/testsuite/ld-elf/compress.exp
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-elf/exclude.exp
ld/testsuite/ld-elf/frame.exp
ld/testsuite/ld-elf/indirect.exp
ld/testsuite/ld-elf/linux-x86.exp
ld/testsuite/ld-elf/shared.exp
ld/testsuite/ld-elf/tls.exp
ld/testsuite/ld-elf/tls_common.exp
ld/testsuite/ld-elfcomm/elfcomm.exp
ld/testsuite/ld-elfweak/elfweak.exp
ld/testsuite/ld-frv/fdpic.exp
ld/testsuite/ld-frv/tls.exp
ld/testsuite/ld-gc/gc.exp
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/no-plt.exp
ld/testsuite/ld-ifunc/ifunc.exp
ld/testsuite/ld-mips-elf/mips-elf-flags.exp
ld/testsuite/ld-nios2/nios2.exp
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/plugin.exp
ld/testsuite/ld-powerpc/export-class.exp
ld/testsuite/ld-scripts/align.exp
ld/testsuite/ld-scripts/crossref.exp
ld/testsuite/ld-scripts/defined.exp
ld/testsuite/ld-scripts/overlay-size.exp
ld/testsuite/ld-scripts/provide.exp
ld/testsuite/ld-scripts/weak.exp
ld/testsuite/ld-selective/selective.exp
ld/testsuite/ld-sh/rd-sh.exp
ld/testsuite/ld-size/size.exp
ld/testsuite/ld-srec/srec.exp
ld/testsuite/ld-x86-64/mpx.exp
ld/testsuite/ld-x86-64/no-plt.exp
ld/testsuite/ld-x86-64/x86-64.exp

index 518d40ce4f3ef0e9aa91d773ef71b6d11ad2cb0c..d8e7e001f76baa303ccc9e53eac42d3beae284a4 100644 (file)
@@ -1,3 +1,44 @@
+2020-06-04  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/config/default.exp: Remove global directive outside
+       proc body.
+       * testsuite/ld-bootstrap/bootstrap.exp: Likewise.
+       * testsuite/ld-elf/compress.exp: Likewise.
+       * testsuite/ld-elf/elf.exp: Likewise.
+       * testsuite/ld-elf/exclude.exp: Likewise.
+       * testsuite/ld-elf/frame.exp: Likewise.
+       * testsuite/ld-elf/indirect.exp: Likewise.
+       * testsuite/ld-elf/linux-x86.exp: Likewise.
+       * testsuite/ld-elf/shared.exp: Likewise.
+       * testsuite/ld-elf/tls.exp: Likewise.
+       * testsuite/ld-elf/tls_common.exp: Likewise.
+       * testsuite/ld-elfcomm/elfcomm.exp: Likewise.
+       * testsuite/ld-elfweak/elfweak.exp: Likewise.
+       * testsuite/ld-frv/fdpic.exp: Likewise.
+       * testsuite/ld-frv/tls.exp: Likewise.
+       * testsuite/ld-gc/gc.exp: Likewise.
+       * testsuite/ld-i386/i386.exp: Likewise.
+       * testsuite/ld-i386/no-plt.exp: Likewise.
+       * testsuite/ld-ifunc/ifunc.exp: Likewise.
+       * testsuite/ld-mips-elf/mips-elf-flags.exp: Likewise.
+       * testsuite/ld-nios2/nios2.exp: Likewise.
+       * testsuite/ld-plugin/lto.exp: Likewise.
+       * testsuite/ld-plugin/plugin.exp: Likewise.
+       * testsuite/ld-powerpc/export-class.exp: Likewise.
+       * testsuite/ld-scripts/align.exp: Likewise.
+       * testsuite/ld-scripts/crossref.exp: Likewise.
+       * testsuite/ld-scripts/defined.exp: Likewise.
+       * testsuite/ld-scripts/overlay-size.exp: Likewise.
+       * testsuite/ld-scripts/provide.exp: Likewise.
+       * testsuite/ld-scripts/weak.exp: Likewise.
+       * testsuite/ld-selective/selective.exp: Likewise.
+       * testsuite/ld-sh/rd-sh.exp: Likewise.
+       * testsuite/ld-size/size.exp: Likewise.
+       * testsuite/ld-srec/srec.exp: Likewise.
+       * testsuite/ld-x86-64/mpx.exp: Likewise.
+       * testsuite/ld-x86-64/no-plt.exp: Likewise.
+       * testsuite/ld-x86-64/x86-64.exp: Likewise.
+
 2020-06-04  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-dynamic/export-dynamic-symbol-2.d: Match output for
index 4f0b76d8317e875cfd1dcc539ae805c3c809f16f..b2097ce7af25a02f29c3a791e3f263ba616982d3 100644 (file)
@@ -121,7 +121,6 @@ if {![info exists CXXFLAGS]} {
 # \param Edit - The override command to perform.
 # \param SavedStrings - Set to use for storing string representations.
 
-global env
 # Only set up the environment variable if the user has not already provided one.
 if {! [info exists env(CCC_OVERRIDE_OPTIONS)]} {
     set env(CCC_OVERRIDE_OPTIONS) "#\
index ba51e50a0253eb4fb1de91abec0772773f0013e6..43928fb6483fd2d2f11dbb03c27686bf281d6543 100644 (file)
@@ -29,8 +29,6 @@ if ![isnative] {
     return
 }
 
-global STATIC_LDFLAGS
-
 # Determine if plugin support is present.
 remote_exec host "$nm --help" "" "/dev/null" "plugin-support"
 set tmp [file_contents "plugin-support"]
index db1993c41502e4ed4735b5a6f0c506760b05f494..8b55f86ea9a0b580cd6c7940b3dd04e552bfdf73 100644 (file)
@@ -36,7 +36,6 @@ if { ![check_compiler_available] } {
     return
 }
 
-global as
 if { ![ld_assemble $as "--compress-debug-sections $srcdir/$subdir/empty.s" tmpdir/empty.o ] } {
     fail "linker compressed debug sections"
 }
@@ -124,8 +123,6 @@ if { [catch {exec cmp tmpdir/libfoo.so tmpdir/libfoozlib.so}] } then {
     pass "$test_name"
 }
 
-global READELF
-
 set test_name "Link -r with zlib compressed debug output"
 set test zlibbegin
 send_log "$READELF -S -W tmpdir/$test.o > tmpdir/$test.out\n"
index 096b8af4f99a0fec7a50f31b0b32b3de072aab68..3ae769e3bf9d133f59f612c4f59431851c420a85 100644 (file)
@@ -121,7 +121,6 @@ if [is_underscore_target] {
     set ASFLAGS "$ASFLAGS --defsym UNDERSCORE=1"
 }
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
     set ASFLAGS "$ASFLAGS -mx86-used-note=no"
index 8ea1edff97b7a64cd75b10a2fc7485d54eefce6f..b9d24c2d4aad8e1fed59a95f3a983817088fd47d 100644 (file)
@@ -39,12 +39,6 @@ if { [istarget "tic6x-*-*"] } {
     set as_opt "-mpic -mpid=near"
 }
 
-global ar
-global as
-global ld
-global nm
-global nm_output
-
 set test1 "ld link shared library"
 set test2 "ld export symbols from archive"
 set test3 "ld link shared library with --exclude-libs"
index 2acc8ba84a583a015d4bd45d80e3ac55a0c1f21a..0bd0fb2d4c7c80a11ac69ab99c64386f76872df4 100644 (file)
@@ -55,9 +55,6 @@ if { [istarget "tic6x-*-*"] } {
 set test1      "read-only .eh_frame section"
 set test2      "read-only .gcc_except_table section"
 
-global as
-global ld
-
 if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/tbss.s tmpdir/tbss.o ]
      || ![ld_assemble_flags $as $as_opt $srcdir/$subdir/frame.s tmpdir/frame.o] } {
     unresolved "$test1"
index 7d5b494f041d3eb50eb97c2fe187efa2e4ec47c8..acda39ef38f7ba2b74242158dd52a28e200b77f6 100644 (file)
@@ -110,8 +110,6 @@ set build_tests {
 
 run_cc_link_tests $build_tests
 
-global ld
-
 set string ": final link failed: bad value"
 set string1 ": local symbol \`foo\' in tmpdir/indirect1b.o is referenced by DSO"
 
@@ -128,8 +126,6 @@ set testname "Indirect symbol 2"
 set cmd "$ld -shared  -o tmpdir/indirect2.so tmpdir/indirect2.o"
 check_link_message "$cmd" [list $string2] "$testname"
 
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-
 set run_tests {
     {"Run with libindirect3c.so 1"
      "-Wl,--no-as-needed tmpdir/indirect3a.o tmpdir/indirect3b.o tmpdir/libindirect3c.so" ""
index 39322df2b6c136fa5c557da07349d51f4a8194c5..eeaf4590e3835bad77ec89adef40dcf73acf0bf4 100644 (file)
@@ -52,12 +52,6 @@ if { ![isnative] || ![check_compiler_available] } {
     return
 }
 
-# Add $PLT_CFLAGS if PLT is expected.
-global PLT_CFLAGS
-# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-global NOSANTIZE_CFLAGS
-
 run_ld_link_exec_tests [list \
     [list \
        "Run PR ld/23428 test" \
index fe7a56de9adcba75261aa259e5f01dfa59b276ec..da750b224a8bc37672fdbb0e3e606b7a2922fbb0 100644 (file)
@@ -31,10 +31,6 @@ if ![check_shared_lib_support] {
     return
 }
 
-# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-global NOSANTIZE_CFLAGS
-
 set old_ASFLAGS $ASFLAGS
 
 # This target requires extra GAS options when building code for shared
index 352d7ecca23f0aefe943cbfd306acc4e4a82b774..15c382fcb4f9869d25b01811745c6475c787daee 100644 (file)
@@ -39,8 +39,6 @@ if [istarget "sparc*-*-*"] {
     append AFLAGS_PIC " -K PIC"
 }
 
-global NOSANTIZE_CFLAGS
-
 run_ld_link_tests [list \
     [list \
        "Build pr22263-1" \
index f71e8ce9e013c911ed9bbc18be76b2f37173e3c0..3e14ccfc21565bd2719b519d4a54674d104744cf 100644 (file)
@@ -30,13 +30,6 @@ if { ![istarget *-*-linux*]
     return
 }
 
-global as
-global ld
-global READELF
-global srcdir
-global subdir
-global link_output
-
 if { ![ld_assemble $as "--elf-stt-common=no $srcdir/$subdir/tls_common.s" tmpdir/tls_commona.o]
       || ![ld_assemble $as "--elf-stt-common=yes $srcdir/$subdir/tls_common.s" tmpdir/tls_commonb.o] } {
     unresolved "tls_common"
index 883cf6f4a99fe58782ae225a94bff8553ca7ede5..d23929ea0b1a46adb848aa33a855b1cf103a489a 100644 (file)
@@ -177,9 +177,6 @@ if {   ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1a.c tmpdir/com
     return
 }
 
-global ld
-global link_output
-
 set options "-r tmpdir/common1a.o tmpdir/common1b.o"
 
 if { [ld_link $ld tmpdir/common1.o $options] } {
index f9e2b3ea72ed379dec7484efcb67773731eb063b..dbc0c0321b8af45bad487854d709d02fe3e11550 100644 (file)
@@ -65,8 +65,6 @@ set DOBJDUMP_FLAGS --dynamic-syms
 set SOBJDUMP_FLAGS --syms
 set shared "--shared -Wl,--no-as-needed"
 
-global NOSANTIZE_CFLAGS
-
 #
 # objdump_symstuff
 #      Dump non-dynamic symbol stuff and make sure that it is sane.
index 268f56b5513b3ccb51ad74e80caa614ad08101c7..8d7e9176c56ed5663661a28ff0008b5c143aa1bc 100644 (file)
@@ -23,11 +23,9 @@ if {![istarget frv*-*-*] || ![is_elf_format]} {
     return
 }
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 set ASFLAGS "$ASFLAGS -mfdpic"
 
-global LDFLAGS
 set saved_LDFLAGS "$LDFLAGS"
 set LDFLAGS "$LDFLAGS -melf32frvfd"
 
index 5a14a27cc8fefb5fbcd69d14c675b412e5170440..85eb370c69958e0b49c8a35dc2ce4c67316809ea 100644 (file)
@@ -23,11 +23,9 @@ if {![istarget frv*-*-*] || ![is_elf_format]} {
     return
 }
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 set ASFLAGS "$ASFLAGS -mfdpic"
 
-global LDFLAGS
 set saved_LDFLAGS "$LDFLAGS"
 set LDFLAGS "$LDFLAGS -melf32frvfd"
 
index 16ded5d9ab391c4961685980607db9c5b7ef0c80..97ccf6a7a9be658793c7af9e5d99564992e3e05a 100644 (file)
@@ -23,14 +23,9 @@ if ![check_gc_sections_available] {
     return
 }
 
-global NOSANTIZE_CFLAGS
-
 set cflags "-ffunction-sections -fdata-sections $NOSANTIZE_CFLAGS"
 set objfile "tmpdir/gc.o"
 
-# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-
 if [istarget powerpc64*-*-*] {
     # otherwise with -mcmodel=medium gcc we get XPASSes.
     set cflags "$cflags -mminimal-toc"
index 2956c44c73a76a3b00aad1b499e3e680019e6ba3..e1bbcddcd315d71051a94951960bd988b105f28a 100644 (file)
@@ -19,7 +19,6 @@
 # MA 02110-1301, USA.
 #
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 if { [is_elf_format] \
      && ([istarget "i?86-*-*"] || [istarget "x86_64-*-*"]) } {
@@ -581,9 +580,6 @@ proc undefined_weak {cflags ldflags} {
     }
 }
 
-# Add $PLT_CFLAGS if PLT is expected.
-global PLT_CFLAGS
-
 # Must be Linux native with the C compiler
 if { [isnative]
      && [istarget "i?86-*-linux*"]
@@ -1193,8 +1189,6 @@ if { [isnative]
     undefined_weak "-fPIE" "-pie -z nodynamic-undefined-weak"
 }
 
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-
 # Must be native with the C compiler and working IFUNC support,
 if { [isnative]
      && [check_ifunc_available]
index 54e41a2e263d5d74ef85bcd166a700988ddf0e6a..44d1a398c53289415514444ba141fdff864400ce 100644 (file)
@@ -39,9 +39,6 @@ if { ![check_compiler_available] } {
     return
 }
 
-# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-
 run_cc_link_tests [list \
     [list \
        "Build no-plt-func1.o no-plt-main1.o" \
index 384ded0507e2eb5357501113b02f703ed95876ac..ce3434b30fa33350682053b6800aec6c91276520 100644 (file)
@@ -54,7 +54,6 @@ if ![check_shared_lib_support] {
     return
 }
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
     set ASFLAGS "$ASFLAGS -mx86-used-note=no"
index afbf84c35f799b257987decfce2e579d8fa3a13d..5160d67d2437b35f67721182965b71aaf1937f13 100644 (file)
@@ -21,7 +21,6 @@ if {![istarget mips*-*-*] || ![is_elf_format]} {
     return
 }
 
-global ldemul
 if {[istarget mips*-*-irix6*]} {
     set ldemul "-melf32bsmip"
 } elseif {[istarget mips*el-*-linux*]} {
index b712e9e9e92931736814b14eb8baed36329ed771..1af0c9212e23a29a133945afa8f53ba8bec6dd44 100644 (file)
@@ -6,9 +6,6 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.d]] {
     run_dump_test [file rootname $test]
 }
 
-global link_output
-global ld
-
 set test_name "NIOS2 Mixed R1 and R2 objects"
 set test mixed1
 
index 5bd4c5f09b7bc04e9fd50bbd3ba7a3a2efb477fa..383b1950bbd33679b0d63c35120359369c71002d 100644 (file)
@@ -29,17 +29,11 @@ if { ![check_plugin_api_available]
     return
 }
 
-global INT128_CFLAGS
-
-global CFLAGS
-global CXXFLAGS
 set saved_CFLAGS "$CFLAGS"
 set saved_CXXFLAGS "$CXXFLAGS"
 regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS
 regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS
 
-global NOSANTIZE_CFLAGS
-
 proc restore_notify { } {
   global saved_CFLAGS
   global saved_CXXFLAGS
index 381fc798d45f5795471f64c3fedf43a077c55d41..dc8f007397a00642537115a3ef75eea1f6a9c947 100644 (file)
@@ -34,8 +34,6 @@ if { ![check_compiler_available] } {
 
 pass "plugin API enabled"
 
-global base_dir
-
 # Look for the name we can dlopen in the test plugin's libtool control script.
 set plugin_name [file_contents "$base_dir/libldtestplug.la"]
 set plugin_name [regsub "'.*" [regsub ".*dlname='" "$plugin_name" ""] ""]
@@ -95,7 +93,6 @@ if { [istarget m681*-*-*] || [istarget m68hc1*-*-*] || [istarget m9s12x*-*-*] }
 set failed_compile 0
 set _ ""
 set plugin_nm_output ""
-global NOSANTIZE_CFLAGS
 set old_CFLAGS "$CFLAGS"
 append CFLAGS " $NOSANTIZE_CFLAGS"
 if { $can_compile && \
index e244be329051e90e583083855015e29b171ed6fd..884c4ebd79abd04ecf3fa7ea436a23f1e57f5794 100644 (file)
@@ -87,7 +87,6 @@ proc powerpc_export_class_test { abi endian emul } {
 
 set abis { 32 be elf32ppclinux 32 le elf32lppclinux 64 be elf64ppc 64 le elf64lppc }
 
-global ld
 catch "exec $ld --help | grep emulations" ldemul
 
 foreach { abi endian emul } $abis {
index 7d79bad2f3f7f58fec443ad5af6a0683405971b1..1520fa333d2dce52151fef4504e4cbec13de7623 100644 (file)
@@ -32,7 +32,6 @@ if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] {
 }
 
 # mingw on x86_64 targets need to set the image base to 0 to avoid auto image-basing.
-global LDFLAGS
 set saved_LDFLAGS "$LDFLAGS"
 if [istarget "x86_64-*-mingw*"] then {
   set LDFLAGS "$LDFLAGS --image-base 0"
index 75544ba36225eb67524d5a363f8baba0a7fa3451..b2f72313e39df5654f1893cc5efdbd6d095f5891 100644 (file)
@@ -38,12 +38,10 @@ if { ![check_compiler_available] } {
     return
 }
 
-global CFLAGS
 set old_CFLAGS "$CFLAGS"
 
 # Pass -fplt to CC since -fno-plt doesn't work with NOCROSSREFS tests.
 # Also add $NOPIE_CFLAGS since PIE doesn't work NOCROSSREFS tests.
-global PLT_CFLAGS NOPIE_CFLAGS
 set old_CC "$CC"
 set CC "$CC $PLT_CFLAGS $NOPIE_CFLAGS"
 
index bd046e2f89fb8e2fe4718bea11c229a981f81a0c..404333fb8c2530f9eac25ce2f2c11e4207bd07cc 100644 (file)
@@ -27,7 +27,6 @@ if ![ld_assemble $as $srcdir/$subdir/defined.s tmpdir/def.o] {
     return
 }
 
-global LDFLAGS
 set saved_LDFLAGS "$LDFLAGS"
 if [istarget "x86_64-*-mingw*"] then {
   set LDFLAGS "$LDFLAGS --image-base 0"
@@ -62,7 +61,6 @@ if ![ld_link $ld tmpdir/def "$LDFLAGS -T $srcdir/$subdir/defined.t tmpdir/def.o"
     }
 }
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 if { [is_elf_format] \
      && ([istarget "i?86-*-*"] || [istarget "x86_64-*-*"]) } {
index 6aa233add21de723222eb6baa8c39a60080d46ec..ad7e0e442b42a7a80dac0be5227686bc0925c666 100644 (file)
@@ -22,7 +22,6 @@ if ![is_elf_format] {
     return
 }
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 if { [is_elf_format] \
      && ([istarget "i?86-*-*"] || [istarget "x86_64-*-*"]) } {
index 396ba025f7a31faa0630931bd0bee21b9061b46e..a4aee5205b191aa805f4c2b6b4eed12ac254396f 100644 (file)
@@ -30,7 +30,6 @@ if {[istarget "powerpc*-*-aix*"] || [istarget "rs6000-*-aix*"] || [is_aout_forma
     return
 }
 
-global LDFLAGS
 set saved_LDFLAGS "$LDFLAGS"
 if [istarget "x86_64-*-mingw*"] then {
   set LDFLAGS "$LDFLAGS --image-base 0"
index 1bb22426bc98a628e051f7619bc93cdcd371e172..b0ca4ab66e7a6437079d73dea62fc3ec33dc6e8f 100644 (file)
@@ -43,7 +43,6 @@ if {! [ld_assemble $as $srcdir/$subdir/weak1.s tmpdir/weak1.o]
     return
 }
 
-global LDFLAGS
 set saved_LDFLAGS "$LDFLAGS"
 if [istarget "x86_64-*-mingw*"] then {
   set LDFLAGS "$LDFLAGS --image-base 0"
index f25b0e20cf144f5e4bd7de1fcacf4fed287cf337..bb16140ef2bfea8e8b1ad06739be2d4c759dd712 100644 (file)
@@ -46,7 +46,6 @@ set seltests {
     {A::foo() B::foo() dropme1() dropme2()} {*-*-*}}
 }
 
-global NOSANTIZE_CFLAGS
 set cflags "-w -O -ffunction-sections -fdata-sections $NOSANTIZE_CFLAGS"
 set cxxflags "-fno-exceptions -fno-rtti $NOSANTIZE_CFLAGS"
 set ldflags "--gc-sections -Bstatic"
index b6c9adfcd9d6f655ba58c9b1ac6bdc8f52465912..c01d50d6a90c34236f2104b8b73eff85d46a05f9 100644 (file)
@@ -31,8 +31,6 @@ if ![istarget sh*-*-*] {
     return
 }
 
-global ASFLAGS
-global LDFLAGS
 set asflags_save "$ASFLAGS"
 set ldflags_save "$LDFLAGS"
 
index 20ebc01cc6fbcbb021e7408fdfc421875bf263c2..8a9459993a084a55e41c5eb225ee9fee86c88ca0 100644 (file)
@@ -53,9 +53,6 @@ if { ![check_compiler_available] } {
     return
 }
 
-# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-
 run_cc_link_tests [list \
     [list \
        "Build libsize-1.so" \
index 0d607f53d0be2e58b65a1ce0638e944517375551..69570a8a91c958bbff8ba40a59b5d38822301b79 100644 (file)
@@ -352,7 +352,6 @@ if { ![check_compiler_available] } {
 # tests. Also add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if PIE doesn't work
 # with S-records.  Also add $NOCF_PROTECTION_CFLAGS for S-records.
 # Also add $NOSANTIZE_CFLAGS for S-records.
-global PLT_CFLAGS NOPIE_CFLAGS NOPIE_LDFLAGS NOCF_PROTECTION_CFLAGS NOSANTIZE_CFLAGS
 set old_CC "$CC"
 set CC "$CC $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS $NOCF_PROTECTION_CFLAGS $NOSANTIZE_CFLAGS"
 set old_CXX "$CXX"
index 4cc5ed4d79977bb4f0a9f690d77096f7c2caf372..3a0f4b1469578657a53e6a5e12cd9321fb4aeca9 100644 (file)
@@ -36,9 +36,6 @@ if { ![check_compiler_available] } {
     return
 }
 
-# Add $PLT_CFLAGS if PLT is expected.
-global PLT_CFLAGS
-
 run_cc_link_tests [list \
     [list \
        "Build libmpx1a.a" \
index 4f8371c011e8e7a8736774ee36160c10cd5cef05..8a1667ba53d387ef8b893497d7648abe9e42c837 100644 (file)
@@ -39,9 +39,6 @@ if { ![check_compiler_available] } {
     return
 }
 
-# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-
 run_cc_link_tests [list \
     [list \
        "Build no-plt-func1.o no-plt-main1.o" \
index cc2c6cc30aac2cc1ba67ceccd1f005b768ed23cc..fd8fd34a7798c270171b1bc8ceea817d3ccac2e8 100644 (file)
@@ -34,7 +34,6 @@ if [istarget "*-*-nacl*"] {
     set emul "elf_x86_64"
 }
 
-global ASFLAGS
 set saved_ASFLAGS "$ASFLAGS"
 set ASFLAGS "$ASFLAGS -mx86-used-note=no"
 
@@ -265,9 +264,6 @@ if [istarget "*-*-nacl*"] {
 
 run_ld_link_tests $x86_64tests
 
-global link_output
-global ld
-
 set test_name "Mixed x86_64 and i386 input test 1"
 set test mixed1
 if { ![ld_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}b.o"] } {
@@ -742,14 +738,6 @@ proc undefined_weak {cflags ldflags} {
     }
 }
 
-# Add $PLT_CFLAGS if PLT is expected.
-global PLT_CFLAGS
-# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
-global NOPIE_CFLAGS NOPIE_LDFLAGS
-# Add $NOCF_PROTECTION_CFLAGS if -fcf-protection=none is required.
-global NOCF_PROTECTION_CFLAGS
-global NOSANTIZE_CFLAGS
-
 # Must be native with the C compiler
 if { [isnative] && [check_compiler_available] } {
     run_cc_link_tests [list \
@@ -2148,7 +2136,6 @@ run_ld_link_tests [list \
 ]
 
 # Linux only tests
-global LD_CLASS
 if { "$LD_CLASS" == "64bit" } then {
     # This test needs 64-bit linker.
     run_dump_test "pr17618"
This page took 0.040406 seconds and 4 git commands to generate.