All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Kamel Bouhara <kamel.bouhara@bootlin.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3] package/cryptopp: add a target build configuration
Date: Sat, 8 Jan 2022 00:10:47 +0100	[thread overview]
Message-ID: <20220108001047.79e8bc24@windsurf> (raw)
In-Reply-To: <20200728095346.2103418-1-kamel.bouhara@bootlin.com>

Hello Kamel,

I finally applied, but with a good number of changes, see below.

On Tue, 28 Jul 2020 11:53:46 +0200
Kamel Bouhara <kamel.bouhara@bootlin.com> wrote:

> diff --git a/package/cryptopp/0001-Add-fully-qualified-SONAME-to-shared-object-for-Linu.patch b/package/cryptopp/0001-Add-fully-qualified-SONAME-to-shared-object-for-Linu.patch
> new file mode 100644
> index 0000000000..11f3090767
> --- /dev/null
> +++ b/package/cryptopp/0001-Add-fully-qualified-SONAME-to-shared-object-for-Linu.patch
> @@ -0,0 +1,30 @@
> +From 78eb43f50978ffd780cf31b1cea6736dadc6b155 Mon Sep 17 00:00:00 2001
> +From: Kamel Bouhara <kamel.bouhara@bootlin.com>
> +Date: Mon, 6 Jul 2020 17:10:55 +0200
> +Subject: [PATCH] Add fully-qualified SONAME to shared object for Linux

That's not really what the patch does. What it does is create a symlink
that matches with the SONAME of the library. The question is: how was
it working before. Answer: because of the ldconfig call that creates
such symlinks. But of course, we don't call ldconfig when
cross-compiling, hence the need for your change.

So, I improved the commit log, also changed the GNUmakefile-cross file,
and submitted that upstream:

  https://github.com/weidai11/cryptopp/pull/1101


>  define HOST_CRYPTOPP_INSTALL_CMDS
> -	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install-lib
> +	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(HOST_DIR)" LDCONFIG=/bin/true install-lib

These are unrelated changes, so I dropped them.

>  endef
> 
> +define CRYPTOPP_EXTRACT_CMDS
> +	$(UNZIP) $(CRYPTOPP_DL_DIR)/$(CRYPTOPP_SOURCE) -d $(@D)
> +endef
> +
> +CRYPTOPP_CXXFLAGS = $(TARGET_CFLAGS) -fPIC
> +
> +CRYPTOPP_MAKE_OPTS = \
> +	$(TARGET_CONFIGURE_OPTS) \
> +	CXXFLAGS="$(CRYPTOPP_CXXFLAGS)"

You were missing the logic to handle gcc < 4.9 that exists for the host
package, and that we also need for the target package.

> +
> +define CRYPTOPP_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(CRYPTOPP_MAKE_OPTS) shared
> +endef
> +
> +define CRYPTOPP_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" LDCONFIG=/bin/true install-lib

PREFIX=$(TARGET_DIR) is wrong. It should have been PREFIX=/usr DESTDIR=$(TARGET_DIR)

> +endef
> +
> +define CRYPTOPP_INSTALL_STAGING_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" libcryptopp.pc

Building the libcryptopp.pc file is really a build step, so I moved
this to the build step.

> +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" LDCONFIG=/bin/true install-lib

Same as above, PREFIX=$(STAGING_DIR) is wrong, it should be PREFIX=/usr
DESTDIR=$(STAGING_DIR)

Applied with those changes. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2022-01-07 23:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  9:53 [Buildroot] [PATCH v3] package/cryptopp: add a target build configuration Kamel Bouhara
2022-01-07 23:10 ` 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=20220108001047.79e8bc24@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=kamel.bouhara@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.