Page MenuHomeFreeBSD

Add STATIC_LIBS option to allow disabling build/install of optional static archives.
AcceptedPublic

Authored by bdrewery on Apr 14 2016, 10:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 11 2024, 1:59 AM
Unknown Object (File)
Feb 3 2024, 8:26 AM
Unknown Object (File)
Jan 10 2024, 1:42 PM
Unknown Object (File)
Dec 25 2023, 11:30 PM
Unknown Object (File)
Nov 24 2023, 3:39 AM
Unknown Object (File)
Nov 15 2023, 11:04 AM
Unknown Object (File)
Nov 8 2023, 11:24 PM
Unknown Object (File)
Oct 14 2023, 10:05 AM

Details

Reviewers
ngie
bapt
imp
Summary

This is useful for systems that don't need static support and are tight
on space. Libraries that do not provide a shared library (by setting
NO_PIC) will still build and install a static library. Internal libraries
continue to function as before.

DPADD is ignored for non-internallibs in this case as there will no file to
track.

It is not redundant with defining SHLIB_NAME with LIB since this feature will
apply to all builds, not just ones that use LIB.

It is close to what WITHOUT_INSTALLLIB is but better since it is not broken by
ensuring lonely static libraries such as libgcc are still installed. Most of
these are critical for compiling. INSTALLLIB was originally added in r96512
(and is still useful for) building static libpam modules but not installing
them since they are linked into the static libpam. The INSTALLLIB option is
not very useful overall since it creates a system which cannot build, nor can
it be used during the build. It could easily be replaced by users with a "find
${DESTDIR} -name '*.a' -delete".

Sponsored by: EMC / Isilon Storage Division

Test Plan

Little testing so far except spot checking the special cases and normal cases.
No buildworld yet.
Wanted it out for review sooner.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3275
Build 3309: arc lint + arc unit

Event Timeline

bdrewery retitled this revision from to Add STATIC_LIBS option to allow disabling build/install of optional static archives..
bdrewery updated this object.
bdrewery edited the test plan for this revision. (Show Details)
bdrewery added reviewers: bapt, imp.
bdrewery added a subscriber: ngie.
bapt edited edge metadata.

I do like it and it will be useful in my case @work at quick glance it looks good to me. I will try to test it soon

This revision is now accepted and ready to land.Apr 14 2016, 10:20 PM

Will this work [from ports] without pulling in src.opts.mk?

In D5953#126928, @ngie wrote:

Will this work [from ports] without pulling in src.opts.mk?

Yes it should, I put it into bsd.opts.mk.

It will of course only affect ports built using /usr/share/mk which for us is only 2 or 3 ports right now I think.

ngie added a reviewer: ngie.
In D5953#126928, @ngie wrote:

Will this work [from ports] without pulling in src.opts.mk?

Yes it should, I put it into bsd.opts.mk.

It will of course only affect ports built using /usr/share/mk which for us is only 2 or 3 ports right now I think.

Ok -- that was my only concern; I haven't followed the whole re-architecture of *.opts.mk too terribly closely..

Definitely worth an -exp run.

I'm not sure if this change should be committed or abandoned (not sure if it was destined to ^/head after its proposal).