Skip to content

Commit

Permalink
[External][SPEC2000] Add -Wl,-zmultidef linker option.
Browse files Browse the repository at this point in the history
The SPEC CPU 2000 benchmarks 186.crafty and 300.twolf have symbols
defined in multiple source file. Add the -zmultidef option to the
linker for compatibility with older linkers.

Reviewed By: naromero77

Differential Revision: https://reviews.llvm.org/D95276
  • Loading branch information
Meinersbur committed Jan 23, 2021
1 parent d17d2e1 commit b14299f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions External/SPEC/CINT2000/186.crafty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ if(LONG_LONG_TYPE_SIZE GREATER 7)
list(APPEND CPPFLAGS -DHAS_LONGLONG)
endif()

list(APPEND LDFLAGS -Wl,-zmuldefs)

set(SourceNames
attacks.c
boolean.c
Expand Down
1 change: 1 addition & 0 deletions External/SPEC/CINT2000/300.twolf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
list(APPEND CPPFLAGS -DHAVE_SIGNED_CHAR)
list(APPEND LDFLAGS -lm)
list(APPEND LDFLAGS -Wl,-zmuldefs)
list(APPEND CFLAGS -Wno-return-type)

macro(test_input run_type)
Expand Down

0 comments on commit b14299f

Please sign in to comment.