Page MenuHomeFreeBSD

Rework PRIVATELIBS
ClosedPublic

Authored by bapt on Apr 24 2015, 8:54 PM.
Tags
None
Referenced Files
F103124894: D2365.diff
Thu, Nov 21, 8:11 AM
Unknown Object (File)
Wed, Nov 20, 2:15 AM
Unknown Object (File)
Sun, Nov 10, 8:59 AM
Unknown Object (File)
Thu, Nov 7, 4:43 AM
Unknown Object (File)
Oct 18 2024, 10:44 AM
Unknown Object (File)
Oct 18 2024, 10:39 AM
Unknown Object (File)
Oct 17 2024, 4:34 AM
Unknown Object (File)
Oct 16 2024, 4:01 PM
Subscribers

Details

Summary

Rework privatelibs, it now renamed the libs a libprivate${LIB}
If it installs headers they are automatically installed in usr/include/private/${LIB}
Use libucl as an example
Automatically defines LIB${LIB} for PRIVATELIBS in src.libnames.mk
Keep the regular name in LIBADD to allow to promote PRIVATELIBS into regular libs without having to rework all Makefiles listing it

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt retitled this revision from to Rework PRIVATELIBS.
bapt updated this object.
bapt edited the test plan for this revision. (Show Details)
bapt added reviewers: des, imp, brooks, bdrewery.
brooks edited edge metadata.

The changes look good to me.

ObsoleteFiles.inc
65 ↗(On Diff #4994)

Seems to duplicate the second half of the above list.

This revision is now accepted and ready to land.Apr 24 2015, 9:36 PM

Can you please explain the reasoning behind renaming the libraries themselves? I created PRIVATELIBS precisely to avoid having to do that.

What is the issues of PRIVATELIB:
any application linking to a library from base (a regular one) that does itself
links to a PRIVATELIB cannot anymore statically link to the said application.

There is no mechanism to handle PRIVATELIBS in compat*x ports which can be a
problem if one of our regular lib is linked to a privatelib and ends up into
compat one day.

It prevents easy linking for 3rd party application using those privatelibs on
purpose (aka with the knowledge abi can break) like libbsdstat.

Also notes, that when packaging base current PRIVATLIB implementation results in exposing the libraries in private as provided (provide libucl) which theory can be satisfied by something ports will provide while with the new mechanism it will provide libprivateucl which prevents having to add new hacks in pkg

@des is that ok with you?

des edited edge metadata.
This revision was automatically updated to reflect the committed changes.