Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Aug 2018 15:33:57 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Eric McCorkle <eric@metricspace.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: A few build system questions
Message-ID:  <20180802153357.GA25687@spindle.one-eyed-alien.net>
In-Reply-To: <bedd6e76-bbe4-7690-70ed-041bbe7970f7@metricspace.net>
References:  <bedd6e76-bbe4-7690-70ed-041bbe7970f7@metricspace.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--FCuugMFkClbJLl1L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 02, 2018 at 11:17:06AM -0400, Eric McCorkle wrote:
> Hi,
>=20
> I have a few questions about how to accomplish some things with the
> build system.
>=20
> First, I want to create some libraries that exist only as static
> archives, meaning no shared object (ex. libsomething.a, but no
> libsomething.so)

If it's something for use by only the base system PRIVATELIB=3D will
do it (and change the name to libprivatesomethi.a).  If you want to be
broadly available outside the base system, NO_SHARED=3D should do it IIRC.

> Second, how do I arrange to have sources be generated prior to the
> build?  I can probably get away with having a shell script that does it,
> but I may require a tool to be built.

If it's a shell script add a target for the sources.  If there's a
compiled tool then you need a build-tools target to build the tool in
the right stage of the bootstrap process.

> Third, how would I go about creating a kind of derived library- that is,
> one created by invoking a whole bunch of linker/objcopy/etc commands on
> some other library?  That is to say, "I want to get libsomething.a by
> running this script that processes libsomethingelse.a".

You'll probably want to add a libsomething.a target that depends on
libsomethingelse.a and the script and add libsomething.a to _LIBS in the
libsomethingelse Makefile.  You will also need to make certain the
script has the right failure modes (e.g. doesn't create libsomething.a
unless it succeeds even if it or it's children are killed with kill -9)
or life will get very confusing.  You'll want to get review from at
least bdrewery@ and brd@ for anything non-standard.

-- Brooks

--FCuugMFkClbJLl1L
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJbYyRkAAoJEKzQXbSebgfA8e0IAJ+AGiiSqnYI0Lztgy1C+QBY
30BNdUmkVnPUZn0x+HOO3GKDxFmTPhn2Zmg4C7Ugho3jpQI3ASssw0x2Fuen3VN0
C/rUxfNKu8OwkOZL73rai4slw93u47IlF+QRdfAcTvg0n+s/mrukPVLRXZRilKmh
JYKQ+qb44vIOzZ1qY2HihJoPRenvdASKDBU/DrY9vhvc0pig4/AvzwSBBdKWDyfU
tkZeekePYvSVZ8eyjdjXJ2HlKVKAzQR5puaSEteAkGEqfHLmZb8asmV7O1+NLQkd
Mt7c8k6Ise0hSm1C4fhAWv1LltPg7l43h/b6VHdNR6GdfobK/Nxv+ba5ptNW+kA=
=5QSc
-----END PGP SIGNATURE-----

--FCuugMFkClbJLl1L--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180802153357.GA25687>