Re: [OE-core] [PATCH 3/7] btrfs-tools: update to 4.12

2017-08-08 Thread Khem Raj
On Tue, Aug 8, 2017 at 10:19 AM, Alexander Kanavin
 wrote:
> On 08/08/2017 06:48 PM, Khem Raj wrote:
>>
>> I think such a patch would be good upstream too. There are many
>> packages making distinction between
>> build host and target host and help cross compilation.
>
>
> btrfs-tools does not support this distinction. The host compiler is enforced
> in the patch through an openembedded-specific variable.

yes, however there are packages which define *_FOR_BUILD variables for
such distinctions, this
could do the same and upstream would most likely be happy to get this
improvement.

>
> Alex
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/7] btrfs-tools: update to 4.12

2017-08-08 Thread Alexander Kanavin

On 08/08/2017 06:48 PM, Khem Raj wrote:

I think such a patch would be good upstream too. There are many
packages making distinction between
build host and target host and help cross compilation.


btrfs-tools does not support this distinction. The host compiler is 
enforced in the patch through an openembedded-specific variable.


Alex
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/7] btrfs-tools: update to 4.12

2017-08-08 Thread Khem Raj
On Mon, Aug 7, 2017 at 4:45 AM, Alexander Kanavin
 wrote:
> Add a patch to force a native build for a helper binary
> (which is not installed or used outside of the build process).
>
> Signed-off-by: Alexander Kanavin 
> ---
>  ...-Makefile-build-mktables-using-native-gcc.patch | 30 
> ++
>  .../{btrfs-tools_4.11.1.bb => btrfs-tools_4.12.bb} |  6 +++--
>  2 files changed, 34 insertions(+), 2 deletions(-)
>  create mode 100644 
> meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
>  rename meta/recipes-devtools/btrfs-tools/{btrfs-tools_4.11.1.bb => 
> btrfs-tools_4.12.bb} (88%)
>
> diff --git 
> a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
>  
> b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
> new file mode 100644
> index 000..0a3b5fd7102
> --- /dev/null
> +++ 
> b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-build-mktables-using-native-gcc.patch
> @@ -0,0 +1,30 @@
> +From e58369f6d36bc51eb59d6afa34c1cae3ff0810ef Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin 
> +Date: Mon, 7 Aug 2017 14:10:38 +0300
> +Subject: [PATCH] Makefile: build mktables using native gcc
> +
> +It's a throwaway helper binary used during build, and so it needs to
> +be native.
> +
> +Upstream-Status: Inappropriate [oe specific]

I think such a patch would be good upstream too. There are many
packages making distinction between
build host and target host and help cross compilation.

> +Signed-off-by: Alexander Kanavin 
> +---
> + Makefile | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index b3e2b63..347aaf1 100644
> +--- a/Makefile
>  b/Makefile
> +@@ -323,7 +323,7 @@ version.h: version.sh version.h.in configure.ac
> +
> + mktables: kernel-lib/mktables.c
> +   @echo "[CC] $@"
> +-  $(Q)$(CC) $(CFLAGS) $< -o $@
> ++  $(Q)$(BUILD_CC) $(CFLAGS) $< -o $@
> +
> + kernel-lib/tables.c: mktables
> +   @echo "[TABLE]  $@"
> +--
> +2.13.2
> +
> diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.11.1.bb 
> b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
> similarity index 88%
> rename from meta/recipes-devtools/btrfs-tools/btrfs-tools_4.11.1.bb
> rename to meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
> index a7b42e9546b..c3cc89c2b0f 100644
> --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.11.1.bb
> +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.12.bb
> @@ -14,8 +14,10 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl"
>  DEPENDS_append_class-target = " udev"
>  RDEPENDS_${PN} = "libgcc"
>
> -SRCREV = "88221fc081a7a0979a012f243b66cf097382cc8f"
> -SRC_URI = 
> "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
> +SRCREV = "0607132c3200bcead1426e6dc685432008de95de"
> +SRC_URI = 
> "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
> +   file://0001-Makefile-build-mktables-using-native-gcc.patch \
> +   "
>
>  inherit autotools-brokensep pkgconfig manpages
>
> --
> 2.13.2
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/7] btrfs-tools: update to 4.12

2017-08-07 Thread Burton, Ross
Can you send a v2 instead?

Presumably they don't already use CC_FOR_BUILD and so on?

Ross

On 7 August 2017 at 13:59, Alexander Kanavin <
alexander.kana...@linux.intel.com> wrote:

> On 08/07/2017 03:59 PM, Burton, Ross wrote:
>
> +-  $(Q)$(CC) $(CFLAGS) $< -o $@
>> ++  $(Q)$(BUILD_CC) $(CFLAGS) $< -o $@
>>
>>
>> This won't work when CFLAGS contains arguments that the host compiler
>> doesn't recognise, or are inappropriate.
>>
>
> Right, should've been BUILD_CFLAGS? Can you amend the patch in-place?
>
> Alex
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/7] btrfs-tools: update to 4.12

2017-08-07 Thread Alexander Kanavin

On 08/07/2017 03:59 PM, Burton, Ross wrote:


+-  $(Q)$(CC) $(CFLAGS) $< -o $@
++  $(Q)$(BUILD_CC) $(CFLAGS) $< -o $@


This won't work when CFLAGS contains arguments that the host compiler 
doesn't recognise, or are inappropriate.


Right, should've been BUILD_CFLAGS? Can you amend the patch in-place?

Alex
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 3/7] btrfs-tools: update to 4.12

2017-08-07 Thread Burton, Ross
On 7 August 2017 at 12:45, Alexander Kanavin <
alexander.kana...@linux.intel.com> wrote:

> +-  $(Q)$(CC) $(CFLAGS) $< -o $@
> ++  $(Q)$(BUILD_CC) $(CFLAGS) $< -o $@
>

This won't work when CFLAGS contains arguments that the host compiler
doesn't recognise, or are inappropriate.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core