Skip to content

Commit 361a7aa

Browse files
[SPEC2017] Add -fcommon to build ldecod in x264
As stated in https://www.spec.org/cpu2017/Docs/benchmarks/525.x264_r.html#portability, building ldecod requires -fcommon as -fno-common is the default; otherwise linking errors like the following will occur. ``` /usr/bin/ld: .../525.x264_r/decoder_test.c.o:(.bss+0x0): multiple definition of `cfgparams'; .../525.x264_r/configfile.c.o:(.bss+0x0): first defined here /usr/bin/ld: .../525.x264_r/config_common.c.o:(.bss+0x0): multiple definition of `cfgparams'; .../525.x264_r/configfile.c.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status ``` Differential Revision: https://reviews.llvm.org/D139658
1 parent 3720649 commit 361a7aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

External/SPEC/CINT2017rate/525.x264_r/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ foreach (_file IN LISTS ldecod_SourceNames)
181181
endforeach ()
182182
llvm_add_host_executable(ldecod_${SUFFIX}-host
183183
ldecod_${SUFFIX} ${ldecod_Sources}
184-
CPPFLAGS -I "${SRC_DIR}/ldecod_src/inc" -DSPEC
184+
CPPFLAGS -I "${SRC_DIR}/ldecod_src/inc" -DSPEC -fcommon
185185
LDFLAGS -lm
186186
)
187187

0 commit comments

Comments
 (0)