Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] pakcage/libasio: new package
Date: Mon, 23 Dec 2019 20:34:40 +0100	[thread overview]
Message-ID: <20191223203440.5b9bb215@windsurf> (raw)
In-Reply-To: <20191130232931.2482617-1-aduskett@gmail.com>

Hello Adam,

Minor nit: pakcage -> package in the commit title. See below for more
comments.

On Sat, 30 Nov 2019 15:29:31 -0800
aduskett at gmail.com wrote:


> diff --git a/package/libasio/0002-fix-static-linking-with-openssl-support.patch b/package/libasio/0002-fix-static-linking-with-openssl-support.patch
> new file mode 100644
> index 0000000000..e450212938
> --- /dev/null
> +++ b/package/libasio/0002-fix-static-linking-with-openssl-support.patch
> @@ -0,0 +1,30 @@
> +From 70f76fdcd127d1bd59b43f46267a21949c552026 Mon Sep 17 00:00:00 2001
> +From: Adam Duskett <Aduskett@gmail.com>
> +Date: Sat, 30 Nov 2019 14:17:10 -0800
> +Subject: [PATCH] fix static linking with openssl support
> +
> +Dynamic builds of libcrypto would also include libz, but during static builds
> +this is not true. Always specifying -lz fixes building against static builds of
> +openssl.
> +
> +Signed-off-by: Adam Duskett <Aduskett@gmail.com>
> +---
> + asio/configure.ac | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/asio/configure.ac b/asio/configure.ac
> +index 2e20b84..ca74108 100644
> +--- a/asio/configure.ac
> ++++ b/asio/configure.ac
> +@@ -60,7 +60,7 @@ AC_CHECK_HEADER([openssl/ssl.h],,
> + ],[])
> + 
> + if test x$OPENSSL_FOUND != xno; then
> +-  LIBS="$LIBS -lssl -lcrypto"
> ++  LIBS="$LIBS -lssl -lcrypto -lz"

It is a bit sad that this is forced in all builds. We generally handle
this either by using pkg-config in the .ac file (best) or
alternatively, by using pkg-config in the .mk file, and passing the
appropriate LIBS option in <pkg>_CONF_ENV.

However, this library is a header-only library, so it doesn't really
need to link with OpenSSL or bother with static linking issues. Only
the examples/tests need that.

So I'd say that a better solution is a patch that adds
--disable-examples/--disable-tests options, and then uses them.

> diff --git a/package/libasio/Config.in b/package/libasio/Config.in
> new file mode 100644
> index 0000000000..8689018d8a
> --- /dev/null
> +++ b/package/libasio/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_LIBASIO
> +	bool "libasio"
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_USE_MMU # fork()
> +	depends on BR2_USE_WCHAR
> +	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS

Could you explain this dependency? Indeed, this dependency is already
part of BR2_TOOLCHAIN_HAS_GCC_BUG_64735. 

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2019-12-23 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-30 23:29 [Buildroot] [PATCH 1/1] pakcage/libasio: new package aduskett at gmail.com
2019-12-23 19:34 ` Thomas Petazzoni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191223203440.5b9bb215@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox