[PATCH] D75557: [test-suite] Add -fcommon
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 12:37:11 PST 2020
SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: jyknight, MaskRay, tstellar, MatzeB.
Herald added a subscriber: mgorny.
jyknight accepted this revision.
This revision is now accepted and ready to land.
D75056 <https://reviews.llvm.org/D75056> is going change Clang driver defaults from -fcommon to -fno-common. This change had to be reverted because of these failing test cases in the test-suite:
FAIL: MultiSource/Applications/JM/ldecod/ldecod.compile_time (1 of 2630)
FAIL: MultiSource/Applications/JM/lencod/lencod.compile_time (2 of 2630)
FAIL: MultiSource/Benchmarks/ASC_Sequoia/IRSmk/IRSmk.compile_time (3 of 2630)
FAIL: MultiSource/Benchmarks/DOE-ProxyApps-C/miniAMR/miniAMR.compile_time (4 of 2630)
FAIL: MultiSource/Benchmarks/Olden/bh/bh.compile_time (5 of 2630)
FAIL: MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/timberwolfmc.compile_time (6 of 2630)
FAIL: MultiSource/Benchmarks/Prolangs-C/compiler/compiler.compile_time (7 of 2630)
FAIL: MultiSource/Benchmarks/Prolangs-C/loader/loader.compile_time (8 of 2630)
FAIL: MultiSource/Benchmarks/Prolangs-C/simulator/simulator.compile_time (9 of 2630)
which all failed compiling with "multiple definition of .. " link errors as a result of this change. So, this adds -fcommon to the CMake files that need this.
https://reviews.llvm.org/D75557
Files:
MultiSource/Applications/JM/ldecod/CMakeLists.txt
MultiSource/Applications/JM/lencod/CMakeLists.txt
MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt
MultiSource/Benchmarks/DOE-ProxyApps-C/miniAMR/CMakeLists.txt
MultiSource/Benchmarks/Olden/bh/CMakeLists.txt
MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/CMakeLists.txt
MultiSource/Benchmarks/Prolangs-C/compiler/CMakeLists.txt
MultiSource/Benchmarks/Prolangs-C/loader/CMakeLists.txt
MultiSource/Benchmarks/Prolangs-C/simulator/CMakeLists.txt
Index: MultiSource/Benchmarks/Prolangs-C/simulator/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/Prolangs-C/simulator/CMakeLists.txt
+++ MultiSource/Benchmarks/Prolangs-C/simulator/CMakeLists.txt
@@ -1,2 +1,3 @@
+list(APPEND CPPFLAGS -fcommon)
list(APPEND LDFLAGS -lm)
llvm_multisource(simulator)
Index: MultiSource/Benchmarks/Prolangs-C/loader/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/Prolangs-C/loader/CMakeLists.txt
+++ MultiSource/Benchmarks/Prolangs-C/loader/CMakeLists.txt
@@ -1,2 +1,3 @@
+list(APPEND CPPFLAGS -fcommon)
list(APPEND LDFLAGS -lm)
llvm_multisource(loader)
Index: MultiSource/Benchmarks/Prolangs-C/compiler/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/Prolangs-C/compiler/CMakeLists.txt
+++ MultiSource/Benchmarks/Prolangs-C/compiler/CMakeLists.txt
@@ -1 +1,2 @@
+list(APPEND CPPFLAGS -fcommon)
llvm_multisource(compiler)
Index: MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/CMakeLists.txt
+++ MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/CMakeLists.txt
@@ -1,2 +1,3 @@
+list(APPEND CPPFLAGS -fcommon)
list(APPEND LDFLAGS -lm)
llvm_multisource(timberwolfmc)
Index: MultiSource/Benchmarks/Olden/bh/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/Olden/bh/CMakeLists.txt
+++ MultiSource/Benchmarks/Olden/bh/CMakeLists.txt
@@ -1,4 +1,4 @@
-list(APPEND CPPFLAGS -DTORONTO)
+list(APPEND CPPFLAGS -fcommon -DTORONTO)
list(APPEND LDFLAGS -lm)
if(LARGE_PROBLEM_SIZE)
set(RUN_OPTIONS 40000 30)
Index: MultiSource/Benchmarks/DOE-ProxyApps-C/miniAMR/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/DOE-ProxyApps-C/miniAMR/CMakeLists.txt
+++ MultiSource/Benchmarks/DOE-ProxyApps-C/miniAMR/CMakeLists.txt
@@ -1,4 +1,4 @@
-list(APPEND CPPFLAGS -I.)
+list(APPEND CPPFLAGS -fcommon -I.)
list(APPEND LDFLAGS -lm)
set(RUN_OPTIONS --nx 8 --ny 8 --nz 8 --num_tsteps 100)
llvm_multisource(miniAMR)
Index: MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt
+++ MultiSource/Benchmarks/ASC_Sequoia/IRSmk/CMakeLists.txt
@@ -1,3 +1,4 @@
+list(APPEND CFLAGS -fcommon)
list(APPEND LDFLAGS -lm)
set(RUN_OPTIONS irsmk_input)
llvm_multisource(IRSmk)
Index: MultiSource/Applications/JM/lencod/CMakeLists.txt
===================================================================
--- MultiSource/Applications/JM/lencod/CMakeLists.txt
+++ MultiSource/Applications/JM/lencod/CMakeLists.txt
@@ -1,4 +1,4 @@
-list(APPEND CPPFLAGS -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64)
+list(APPEND CPPFLAGS -fcommon -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64)
list(APPEND LDFLAGS -lm)
set(FP_TOLERANCE 0.025)
if(SMALL_PROBLEM_SIZE)
Index: MultiSource/Applications/JM/ldecod/CMakeLists.txt
===================================================================
--- MultiSource/Applications/JM/ldecod/CMakeLists.txt
+++ MultiSource/Applications/JM/ldecod/CMakeLists.txt
@@ -1,4 +1,4 @@
-list(APPEND CPPFLAGS -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64)
+list(APPEND CPPFLAGS -fcommon -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64)
list(APPEND LDFLAGS -lm)
set(RUN_OPTIONS -i data/test.264 -o Output/test_dec.yuv -r data/test_rec.yuv)
llvm_multisource(ldecod)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75557.247986.patch
Type: text/x-patch
Size: 3635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200303/0661172a/attachment.bin>
More information about the llvm-commits
mailing list