Page MenuHomeFreeBSD

Remove tests for obsolete compilers in the build system
ClosedPublic

Authored by vangyzen on May 10 2020, 10:09 PM.

Details

Summary

Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree.
Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions
for older compilers.

Test Plan
  1. tinderbox with in-tree toolchain
  2. amd64 buildworld/buildkernel with amd64-gcc xtoolchain (6.4.0)
  3. amd64 buildworld/buildkernel on 11.2-RELEASE

(There were unrelated failures in 1 and 2.)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

share/mk/bsd.sys.mk
74 ↗(On Diff #71625)

I just realized I can completely remove these three conditions.

  • remove unnecessary if-clang conditions

overall LGTM

share/mk/bsd.sys.mk
217 ↗(On Diff #71627)

do we need this conditional at all?

share/mk/bsd.sys.mk
217 ↗(On Diff #71627)

I'm glad you asked. I don't know. Are there other compilers capable of building FreeBSD?

Intel released a FreeBSD version of their 2016 compiler. I intend to try building FreeBSD with it (in my copious spare time).

Follow on work may include assuming c++11 or c++14, but this is a great start and should be committed as is, module units from the review.

share/mk/bsd.sys.mk
142 ↗(On Diff #71627)

We should note that we should clean up warnings produced with these flags. They were originally there as a quick hack to enable gcc5/6

217 ↗(On Diff #71627)

We don't need it. Intel compiler support needs to be based on someone using it successfully. Changes to support it are likely more extensive than this one line...

stand/efi/boot1/Makefile
46 ↗(On Diff #71627)

Do we still need this?

stand/efi/loader/Makefile
36 ↗(On Diff #71627)

Ditto

This revision is now accepted and ready to land.May 10 2020, 10:59 PM
lib/libthr/Makefile
32 ↗(On Diff #71627)

Shouldn't this -Wno option be removed instead ? I do not even see this warning option (either with or without no-) in gcc 10.1 manual.

lib/libthr/Makefile
32 ↗(On Diff #71627)

The test was not GCC-before-4.3 so I think the patch is what's intended?
Perhaps we need to separately check this option though.

vangyzen added inline comments.
lib/libthr/Makefile
32 ↗(On Diff #71627)

It is still needed for in-tree clang, at least.

share/mk/bsd.sys.mk
217 ↗(On Diff #71627)

I love the deadpan delivery of this understatement.

stand/efi/boot1/Makefile
46 ↗(On Diff #71627)

Apparently not.

This revision now requires review to proceed.May 11 2020, 3:22 PM
This revision is now accepted and ready to land.May 11 2020, 3:26 PM
jhb added inline comments.
share/mk/bsd.sys.mk
84 ↗(On Diff #71636)

Can't this be removed since we only support armv6 and armv7 now? If so, that probably should be a separate commit though.