Add -fcommon compiler command line option to linker tests that need common symbols.
authorNick Clifton <nickc@redhat.com>
Mon, 6 Jan 2020 16:24:23 +0000 (16:24 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 6 Jan 2020 16:24:23 +0000 (16:24 +0000)
PR 25327
* testsuite/ld-elf/shared.exp: Add -fcommon option to compiler
command line when building libcomm1.o and pr13250 tests.
* testsuite/ld-plugin/lto.exp: Likewise for pr20267 tests.

ld/ChangeLog
ld/testsuite/ld-elf/shared.exp
ld/testsuite/ld-plugin/lto.exp

index fa7534da892ad8ed9063151f2c2d688d664b2ac0..a9871938ef1d615e5bec5cceb1b436267d42d98e 100644 (file)
@@ -1,3 +1,10 @@
+2020-01-06  Nick Clifton  <nickc@redhat.com>
+
+       PR 25327
+       * testsuite/ld-elf/shared.exp: Add -fcommon option to compiler
+       command line when building libcomm1.o and pr13250 tests.
+       * testsuite/ld-plugin/lto.exp: Likewise for pr20267 tests.
+
 2020-01-06  Nick Clifton  <nickc@redhat.com>
 
        PR 25326
index 7852890999a1b8fc5234a5f050d491ddeb2879f2..e03906a142d3153336e03949ae291c4bc8c5155c 100644 (file)
@@ -603,7 +603,7 @@ set build_tests {
    "-shared" "-fPIC"
    {data2.c} {} "libdata2.so"}
   {"Build libcomm1.o"
-   "-r -nostdlib" ""
+   "-r -nostdlib" "-fcommon"
    {comm1.c} {} "libcomm1.o"}
   {"Build libfunc1.so"
    "-shared" "-fPIC"
@@ -634,16 +634,16 @@ set build_tests {
    "-r -nostdlib" ""
    {pr11138-2.c} {} "libpr11138-2.o"}
   {"Build pr13250-1.so"
-   "-shared" "-fPIC"
+   "-shared" "-fPIC -fcommon"
    {pr13250-1.c} {} "libpr13250-1.so"}
   {"Build pr13250-2.so with libpr13250-1.so"
-   "-shared -Wl,--no-as-needed tmpdir/libpr13250-1.so" "-fPIC"
+   "-shared -Wl,--no-as-needed tmpdir/libpr13250-1.so" "-fPIC -fcommon"
    {pr13250-2.c} {} "libpr13250-2.so"}
   {"Build libpr13250-3.o"
-   "-r -nostdlib" ""
+   "-r -nostdlib" "-fcommon"
    {pr13250-3.c} {} "libpr13250-3.o"}
   {"Build libpr14323-2.so"
-   "-shared" "-fPIC"
+   "-shared" "-fPIC -fcommon"
    {pr14323-2.c} {} "libpr14323-2.so"}
   {"Build pr14862-1.o"
    "-r -nostdlib" ""
@@ -879,7 +879,7 @@ set run_tests [list \
      "-Wl,--no-as-needed,--version-script=pr11138-2.map tmpdir/libpr11138-1.so tmpdir/pr11138-2.o" "" \
      {dummy.c} "pr11138b" "pr11138.out" ] \
     [list "Run with pr13250-3.c, libpr13250-1.so and libpr13250-2.so" \
-     "-Wl,--as-needed tmpdir/pr13250-3.o tmpdir/libpr13250-1.so tmpdir/libpr13250-2.so" "" \
+     "-Wl,--as-needed tmpdir/pr13250-3.o tmpdir/libpr13250-1.so tmpdir/libpr13250-2.so" "-fcommon" \
      {dummy.c} "pr13250" "pass.out" ] \
     [list "Run with pr14323-1.c pr14323-2.so" \
      "-Wl,--no-as-needed tmpdir/libpr14323-2.so" "" \
index cf30ab5c55b4b6243b5d24771a6df98503e852ac..9b03b7b397730955e10808463c75c259e711f874 100644 (file)
@@ -192,19 +192,19 @@ set lto_link_tests [list \
    "$plug_opt" "-flto $lto_no_fat" \
    {pr19317.c} {} "libpr19317.a"] \
   [list "Build pr20276a.o" \
-   "" "-fno-lto" \
+   "" "-fno-lto -fcommon" \
    {pr20276a.c}] \
   [list "Build pr20276b.o" \
-   "$plug_opt" "-flto $lto_no_fat" \
+   "$plug_opt" "-flto $lto_no_fat -fcommon" \
    {pr20276b.c}] \
   [list "Build pr20267a.o" \
-   "" "" \
+   "" "-fcommon" \
    {pr20267a.c}] \
   [list "Build libpr20267a.a" \
-   "$plug_opt" "-flto $lto_fat" \
+   "$plug_opt" "-flto $lto_fat -fcommon" \
    {pr20267b.c} {} "libpr20267a.a"] \
   [list "Build libpr20267b.a" \
-   "$plug_opt" "-flto $lto_no_fat" \
+   "$plug_opt" "-flto $lto_no_fat -fcommon" \
    {pr20267b.c} {} "libpr20267b.a"] \
   [list "Build pr20321" \
    "-flto -Wl,-plugin,$plug_so" "-flto" \
@@ -437,14 +437,14 @@ set lto_run_tests [list \
    "-O2 -flto tmpdir/pr20276a.o tmpdir/pr20276b.o" "" \
    {dummy.c} "pr20276" "pass.out" "-flto -O2" "c"] \
   [list "Run pr20267a" \
-   "-O2 -flto tmpdir/pr20267a.o tmpdir/libpr20267a.a" "" \
-   {dummy.c} "pr20267a" "pass.out" "-flto -O2" "c"] \
+   "-O2 -flto -fcommon tmpdir/pr20267a.o tmpdir/libpr20267a.a" "" \
+   {dummy.c} "pr20267a" "pass.out" "-flto -O2 -fcommon" "c"] \
   [list "Run pr20267b" \
-   "-O2 -flto tmpdir/pr20267a.o tmpdir/libpr20267b.a" "" \
-   {dummy.c} "pr20267b" "pass.out" "-flto -O2" "c"] \
+   "-O2 -flto -fcommon tmpdir/pr20267a.o tmpdir/libpr20267b.a" "" \
+   {dummy.c} "pr20267b" "pass.out" "-flto -O2 -fcommon" "c"] \
   [list "Run pr22502" \
    "-O2 -flto tmpdir/pr22502a.o tmpdir/pr22502b.o" "" \
-   {dummy.c} "pr20267" "pass.out" "-flto -O2" "c"] \
+   {dummy.c} "pr20267" "pass.out" "-flto -O2 -fcommon" "c"] \
   [list "Run pr22751" \
    "-O2 -flto" "" \
    {dummy.c} "pr22751" "pass.out" "-flto -O2" "c" "" \
This page took 0.026662 seconds and 4 git commands to generate.