Page MenuHomeFreeBSD

Determine whether to build clang 3.5.0 by checking C++11 support
ClosedPublic

Authored by dim on Dec 10 2014, 8:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 3:58 AM
Unknown Object (File)
Oct 15 2024, 1:40 AM
Unknown Object (File)
Oct 1 2024, 9:16 PM
Unknown Object (File)
Sep 30 2024, 5:25 AM
Unknown Object (File)
Sep 30 2024, 5:25 AM
Unknown Object (File)
Sep 30 2024, 5:24 AM
Unknown Object (File)
Sep 30 2024, 5:20 AM
Unknown Object (File)
Sep 28 2024, 3:03 PM

Details

Summary

NOTE: This commit is meant to go into the projects/clang350-import branch first!

For the import of clang 3.5.0, the logic in src.opts.mk for when to enable clang must be revised, to also check whether the "host compiler" is capable of C++11 support. This is important specifically for PowerPC builds. I have added this check to src.opts.mk.

Also, I tried making the if statements in src.opts.mk a little more readable, by just explicitly listing the different cases below each other, and clearly specifying all the DEFAULT_YES and DEFAULT_NO values per case.

E.g, the logic is now:

  • If the host compiler is not C++11 capable, use gcc and disable clang
  • On x86, enable clang, make it default cc, and disable gcc
  • On little-endian ARM, enable clang, but not the full build, make it default cc, and disable gcc
  • On PowerPC, enable clang, but enable gcc and make that the default cc
  • On everything else, use gcc, and disable clang

Of course this could be amended later, if we get e.g. sparc64 or BE ARM working.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dim retitled this revision from to Determine whether to build clang 3.5.0 by checking C++11 support.
dim updated this object.
dim edited the test plan for this revision. (Show Details)
dim added reviewers: imp, brooks, emaste.
dim added subscribers: theraven, nwhitehorn, jhibbits.
imp edited edge metadata.

This looks like it passes all my (in)sanity checks. Still don't like defaults being different for different systems in general, but given that we've decided it is OK for this feature, I'm OK with these changes.

share/mk/src.opts.mk
195 โ†—(On Diff #2709)

I believe this isn't needed at all due to other insanity.

But it is good to have it here.

This revision is now accepted and ready to land.Dec 10 2014, 8:44 PM
share/mk/src.opts.mk
195 โ†—(On Diff #2709)

Yes, I just moved it up from the stanza below.

brooks edited edge metadata.

Looks good to me.

dim updated this revision to Diff 2710.

Closed by commit rS275691 (authored by @dim).