This is an archive of the discontinued LLVM Phabricator instance.

[Solaris] get rid of _RESTRICT_KYWD warning during the build
ClosedPublic

Authored by fedor.sergeev on Jul 6 2017, 6:32 AM.

Details

Summary

(re)definition of _RESTRICT_KYWD rightfully causes a warning message during the Solaris build.
This hack is not needed if build compiler is properly configured (.e.g /usr/bin/gcc) so just remove it.

Diff Detail

Event Timeline

fedor.sergeev created this revision.Jul 6 2017, 6:32 AM

The hack was introduced as part of rL192185 Solaris-11 build change.
After removing this hack I have no problems building LLVM on Solaris 11 (intel/SPARC).

Vladimir V (the guy who did the original fix) does not really remember what was his exact build setup that exposed the problem with _RESTRICT_KYWD.
I just suppose that his gcc had no include-fixed feature_tests.h (which has a fix for _RESTRICT_KYWD) and that resulted in _RESTRICT_KYWD
being defined as "restrict" (leading to g++ errors on majority of its uses in Solaris headers).

I wonder if anybody can check what happens on non-Oracle Solarii...

krytarowski edited edge metadata.Jul 6 2017, 7:41 AM

Removal of this hack is needed on SmartOS.

pkgsrc: lang/libLLVM/patches/patch-lib_Support_Unix_Program.inc

It reappeared in libLLVM setup.

joerg accepted this revision.Jul 6 2017, 8:38 AM

LGTM, as Kamil said, we have the same change in pkgsrc for Illumos.

This revision is now accepted and ready to land.Jul 6 2017, 8:38 AM

Joerg, Kamil, mind to integrate this?
I still have no commit rights...

regards,

Fedor.
krytarowski closed this revision.Jul 8 2017, 4:29 AM

Committed as SVN r.307469