+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
"-shared" "-fPIC"
{data2.c} {} "libdata2.so"}
{"Build libcomm1.o"
- "-r -nostdlib" ""
+ "-r -nostdlib" "-fcommon"
{comm1.c} {} "libcomm1.o"}
{"Build libfunc1.so"
"-shared" "-fPIC"
"-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" ""
"-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" "" \
"$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" \
"-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" "" \