All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [mfgtools][PATCH] mfgtools: Allow target build
Date: Mon, 7 May 2018 17:27:40 +0200	[thread overview]
Message-ID: <20180507172740.129d7641@windsurf> (raw)
In-Reply-To: <1525444322-25581-1-git-send-email-vincent.prince.fr@gmail.com>

Hello Vincent,

Thanks for this contribution!

On Fri,  4 May 2018 16:32:02 +0200, Vincent Prince wrote:

> diff --git a/package/mfgtools/0001-Fix-CXXFLAGS-in-CMakeList.patch b/package/mfgtools/0001-Fix-CXXFLAGS-in-CMakeList.patch
> new file mode 100644
> index 0000000..91933df
> --- /dev/null
> +++ b/package/mfgtools/0001-Fix-CXXFLAGS-in-CMakeList.patch
> @@ -0,0 +1,58 @@
> +--- a/MfgToolLib/CMakeLists.txt
> ++++ b/MfgToolLib/CMakeLists.txt

All patches need a description + Signed-off-by. See
https://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.

> diff --git a/package/mfgtools/mfgtools.mk b/package/mfgtools/mfgtools.mk
> index e4663a8..24a9d9f 100644
> --- a/package/mfgtools/mfgtools.mk
> +++ b/package/mfgtools/mfgtools.mk
> @@ -11,19 +11,35 @@ MFGTOOLS_LICENSE = BSD-3-Clause or CPOL
>  MFGTOOLS_LICENSE_FILES = LICENSE README.txt
>  HOST_MFGTOOLS_DEPENDENCIES = host-libusb
>  
> +MFGTOOLS_CFLAGS = \
> +	$(CFLAGS) $(LDFLAGS) -std=c++11 -lpthread \

CFLAGS and LDFLAGS don't have any meaning in Buildroot, you probably
meant TARGET_CFLAGS and TARGET_LDFLAGS.

> +	-L$(@D)/MfgToolLib -lMfgToolLib -I$(@D)/MfgToolLib \
> +	-lusb-1.0 -I$(TARGET_DIR)/usr/include/libusb-1.0 \

You can't use header files from TARGET_DIR, since you have no guarantee
that they are installed here. The headers are in STAGING_DIR instead.

> +define MFGTOOLS_CLI_BUILD
> +	$(CONFIGURE_OPTS) $(MAKE) CC="$(TARGET_CXX)" \

CONFIGURE_OPTS don't exist in Buildroot, it's TARGET_CONFIGURE_OPTS.
THen you don't need to pass CC="$(TARGET_CXX)", because it's part of
TARGET_CONFIGURE_OPTS.

> +define MFGTOOLS_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 755 $(@D)/MfgToolLib/libMfgToolLib.so \
> +		$(TARGET_DIR)/usr/lib/libMfgToolLib.so
> +	$(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli \
> +		$(TARGET_DIR)/usr/bin/mfgtoolcli
> +endef

Add a blank line here.

>  define HOST_MFGTOOLS_INSTALL_CMDS
>  	$(INSTALL) -D -m 755 $(@D)/MfgToolLib/libMfgToolLib.so \
>  		$(HOST_DIR)/lib/libMfgToolLib.so
> @@ -31,4 +47,5 @@ define HOST_MFGTOOLS_INSTALL_CMDS
>  		$(HOST_DIR)/bin/mfgtoolcli
>  endef
>  
> +$(eval $(cmake-package))
>  $(eval $(host-cmake-package))

Could you rework your patch according to those comments, and send an
updated version ?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-05-07 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04 14:32 [Buildroot] [mfgtools][PATCH] mfgtools: Allow target build Vincent Prince
2018-05-07 15:27 ` Thomas Petazzoni [this message]
2018-05-14  9:11   ` [Buildroot] [PATCH v2] package/mfgtools: " Vincent Prince
2019-04-07 14:01     ` Thomas Petazzoni

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=20180507172740.129d7641@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 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.