Page MenuHomeFreeBSD

devel/freebsd-gcc*: also build libgcov.a
Needs ReviewPublic

Authored by siva on Tue, Sep 8, 7:53 PM.
Tags
None
Referenced Files
F174315636: D59510.id188316.diff
Fri, Oct 2, 7:54 AM
Unknown Object (File)
Thu, Oct 1, 8:47 PM
Unknown Object (File)
Sat, Sep 26, 3:48 PM
Unknown Object (File)
Fri, Sep 25, 9:30 PM
Unknown Object (File)
Tue, Sep 22, 10:30 PM
Unknown Object (File)
Mon, Sep 21, 9:45 PM
Unknown Object (File)
Mon, Sep 21, 9:40 AM
Unknown Object (File)
Mon, Sep 21, 1:19 AM
Subscribers
None

Details

Reviewers
jhb
Summary

This fixes the FreeBSD LINT[0] kernel build that includes GCOV[1].

Other changes:

  • explicit --disable-multilib is required to prevent the libgcc/libgcov.a submake build from building a multilib libgcov.a
  • armv7 requires additional _FOR_TARGET make args because it erroneously looks for 'armv7-' prefixed binutils
  • these changes require a workaround to ensure that build targets are processed sequentially, because at higher core counts, configure-target-libgcc fails when it can't find a prebuilt xgcc binary.

[0] https://cgit.freebsd.org/src/tree/sys/amd64/conf/NOTES?id=886164895f3f4805dc11171ac7980acaccf6ec77#n10
[1] https://cgit.freebsd.org/src/tree/sys/conf/kern.pre.mk?id=886164895f3f4805dc11171ac7980acaccf6ec77#n104

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77579
Build 74462: arc lint + arc unit

Event Timeline

siva requested review of this revision.Tue, Sep 8, 7:53 PM
siva created this revision.

To date we have purposely excluded libgcc from these ports and instead used libcompiler_rt (sometimes enabling other builtins only used by GCC in libgcc.a in base for example). I don't want these toolchains to ship libgcc to avoid linking with the wrong one, nor should they ship unwind.h, etc. I know that the old GCOV code was not built with these ports (bug the kernel was built with lang/gcc at the time). Does libgcov.a require libgcc.a from GCC or do you just need to use this to get it built and we could restrict the install step to only installing libgcov.a?

we could restrict the install step to only installing libgcov.a?

Thanks for the suggestion, applied this feedback in v2 and restricted
the build to only include libgcov.a. This is good enough and
the GCOV build continues to pass with v2 of this patch.

siva retitled this revision from devel/freebsd-gcc*: include libgcc in build to devel/freebsd-gcc*: also build libgcov.a.Thu, Oct 1, 3:34 PM