This is an archive of the discontinued LLVM Phabricator instance.

[test-suite][SPEC2000] Use -fcommon instead of -zmultidef.
ClosedPublic

Authored by Meinersbur on Mar 9 2021, 7:06 AM.

Details

Summary

This reverts D95276 and D95506 (pass -zmultidefs to the linker) and instead pass -fcommon to the compiler. This is the same solution as already applied to non-SPEC benchmarks in D75557, and caused by a change of the defaults in gcc and clang.

(D75557 adds -fcommon to CPPFLAGS which I think is incorrect because it is not a preprocessor option)

Diff Detail

Event Timeline

Meinersbur created this revision.Mar 9 2021, 7:06 AM
Meinersbur requested review of this revision.Mar 9 2021, 7:06 AM

Is there any negative impact to macOS X?

MaskRay accepted this revision.Mar 9 2021, 11:44 AM

LGTM. GCC 10 and Clang 11 switched to default -fno-common. The old code may be better compiling with the old behavior.

This revision is now accepted and ready to land.Mar 9 2021, 11:44 AM

Given that there were no issues with D75557 on MacOS, I don't expect any. -zmultidefs had a problem on MacOS because it is a GNU linker extension. While test-suite needs to work with multiple linkers, it only needs to be compatible with clang. That is, this solution should have fewer compatibility issues.