Page MenuHomePhabricator

[External][SPEC2000] Add -Wl,-zmultidef linker option.
ClosedPublic

Authored by Meinersbur on Jan 22 2021, 4:39 PM.

Details

Summary

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.

Diff Detail

Repository
rT test-suite

Event Timeline

Meinersbur created this revision.Jan 22 2021, 4:39 PM
Meinersbur requested review of this revision.Jan 22 2021, 4:39 PM
Meinersbur retitled this revision from [External] Add -Wl,-zmultidef linker option. to [External][SPEC2000] Add -Wl,-zmultidef linker option..Jan 22 2021, 8:59 PM
naromero77 accepted this revision.Jan 22 2021, 9:02 PM
This revision is now accepted and ready to land.Jan 22 2021, 9:02 PM
This revision was automatically updated to reflect the committed changes.
fhahn added a subscriber: fhahn.Jan 26 2021, 7:29 AM
fhahn added inline comments.
External/SPEC/CINT2000/186.crafty/CMakeLists.txt
29

Do we need to set this conditionally? I think this breaks builds in macOS with newer versions of ld, which does not support -zmuldefs

Meinersbur added inline comments.Jan 26 2021, 11:56 AM
External/SPEC/CINT2000/186.crafty/CMakeLists.txt
29

This is probably not because it a new version, but because it is not GNU ld.

Does the macOS linker (I assume lld?) just ignore multiple definitions by default?

fhahn added inline comments.Jan 26 2021, 12:16 PM
External/SPEC/CINT2000/186.crafty/CMakeLists.txt
29

I am not sure I am afraid, but the benchmarks work fine without the flag and the flag causes an unsupported option error