Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] uboot-tools: fix static linking with OpenSSL
Date: Sat, 16 May 2015 10:06:13 +0200	[thread overview]
Message-ID: <5556FA75.60903@openwide.fr> (raw)
In-Reply-To: <87sib0gb28.fsf@dell.be.48ers.dk>

Hi Thomas,

Le 13/05/2015 10:02, Peter Korsgaard a ?crit :
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 
>  > Had a patch to U-Boot to use pkg-config to get the OpenSSL link flags
> 
> s/Had/Add/
> 
>> when pkg-config is available. This allows to make sure that static
>  > linking works properly. The patch requires adding $(TARGET_MAKE_ENV)
>  > so that the Buildroot provided pkg-config is used instead of the host
>  > one.
> 
>  > The U-Boot patch has been submitted upstream.
> 
> Thanks!
> 
>  > Fixes:
> 
>  >   http://autobuild.buildroot.org/results/a9f/a9f316cd076a74b8730ce4cdcdb8176da4ed9eb3/
> 
>  > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
>> + # MXSImage needs LibSSL
>  > + ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
>  > +-HOSTLOADLIBES_mkimage += -lssl -lcrypto
>  > ++HOSTLOADLIBES_mkimage += \
>  > ++	$(shell pkg-config --libs libssl 2> /dev/null || echo "-lssl -lcrypto")


It doesn't work for BR2_SHARED_LIBS only:

http://autobuild.buildroot.net/results/483/48345d936c7972dc27ea12bdccfe0d02bbc4112b/build-end.log

-lcrypto is required for PEM_read_X509 and X509_free symbols.

What's about using 'pkg-config --libs openssl' instead ?

Best regards,
Romain

>  > + endif

> 
> This only works because we have a pkg-config wrapper adding --static to
> the real pkg-config. For people directly using pkg-config this won't fix
> anything.
> 
> But yeah, in the context of Buildroot it does, so committed -
> Thanks.
> 

  reply	other threads:[~2015-05-16  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 21:02 [Buildroot] [PATCH] uboot-tools: fix static linking with OpenSSL Thomas Petazzoni
2015-05-13  3:53 ` Gergely Imreh
2015-05-13  8:02 ` Peter Korsgaard
2015-05-16  8:06   ` Romain Naour [this message]
2015-05-16 11:55     ` Peter Korsgaard

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=5556FA75.60903@openwide.fr \
    --to=romain.naour@openwide.fr \
    --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