Currently, we can build a static-only zlib, but not a shared-only one.
This is because zlib's build-system is a custom ./configure (not using
autotools), and does not allow building/installing only the shared
library.
Simply remove the .a as a post-staging install hook. We don't care
removing it from target, since it is not used at link time to build
other packages, and it is anyway removed later before assembling the
filesystem images anyway.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.
As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.
This also helps preparing the addition of other options to select
shared, shared+static or just static.
Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Finally get rid of all := used for variable definitions in packages,
as we suggest in our manual and during the review of new packages.
While I was at it, I also sometimes added a few missing new lines
between the header and the first variable definition.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Thanks to the pkgparentdir and pkgname functions, we can rewrite the
GENTARGETS macro in a way that avoids the need for each package to
repeat its name and the directory in which it is present.
[Peter: pkgdir->pkgparentdir]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Host libraries should always be built using dynamic linking, rather than
static if BR2_PREFER_STATIC_LIB is enabled, as that then breaks dependent
libraries expecting a shared library.
Reported-by: Andy Kennedy <andy.kennedy@adtran.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
By default, zlib installation procedure calls ldconfig, which takes
time uselessly. ldconfig is only useful if you install libraries on
the host (in directories listed in /etc/ld.so.conf, or in /usr/lib or
/lib), so calling it after installing libraries in $(STAGING_DIR),
$(TARGET_DIR) or $(HOST_DIR) is just a lenghty no-op.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Commit ab2f5567c1 (cleanup, fix install for static only build) forgot
to add the patch for static only builds, even though the commit message
mentioned it.
Thanks to Mike for noticing.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Use 'make install' for installation, add a patch to make it work for
static only builds, and add uninstall/clean targets while we're at it.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Using "make -j $(N)" with N > 1 sometimes breaks zlib build.
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
zlib is needed on the host, to build xlib_libfontenc on the host, to
build xapp_mkfontscale on the host, in order to finally build xfonts
encodings on the target.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fix typo introduced by 1e32e0700a (remove dedicated target-headers option).
Noticed by Alexander Clouter <alex@digriz.org.uk>.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Positive logic is easier to read and understand than something
like 'if not option=yes then foo else bar'.
Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
A C library will have been built by the toolchain makefiles, so there is no
need for packages to explicitly depend on uclibc.
Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This patch will install zlib keeping the symlinks. The usage of
$(INSTALL) here did not take into account symbolic links.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
The ARM uClinux BFLT format apparently doesn't support shared libs nor
-fPIC. So let's distinguish between shared and non shared builds by
having split rules for libz.a and libz.so based on BR2_PREFER_STATIC_LIB.
Signed-off-by: Nicolas Pitre <nico@cam.org>