Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [PATCH v2 00/10] wic: bugfixes & --fixed-size support, tests, selftest: minor fixes
From: Maciej Borzęcki @ 2016-11-14 10:35 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Paul Eggleton, Maciej Borzecki, OE-core
In-Reply-To: <CAJTo0LaLwE+VOJwa3vad2XOc0FmwPpcGOxUvev=7RbnatnOKRg@mail.gmail.com>

On Mon, Nov 14, 2016 at 11:16 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 14 November 2016 at 10:02, Maciej Borzęcki <maciej.borzecki@rndity.com>
> wrote:
>>
>> I see that the builds were running with qemux85-64 MACHINE, shouldn't
>> TARGET_ARCH be set to x86-64 then? There's a check that builds
>> syslinux(-native) for x86 archs only since it's not buildable for
>> anything else. Same for HDDIMG.
>
>
> Not quite:
>
> $ MACHINE=qemux86 bitbake core-image-minimal -e | grep ^TARGET_ARCH=
> TARGET_ARCH="i586"
>
> $ MACHINE=qemux86-64 bitbake core-image-minimal -e | grep ^TARGET_ARCH=
> TARGET_ARCH="x86_64"
>
> (had to patch bitbake.conf to export TARGET_ARCH)

Do you think it makes sense to replace TARGET_ARCH check with something
like this instead:

        arch = get_bb_var('HOST_ARCH', 'core-image-minimal')

        is_x86 = arch in ['i586', 'i686', 'x86-64']
        if is_x86:
            self.write_config('IMAGE_FSTYPES += " hddimg"\n'
                              'MACHINE_FEATURES_append = " efi"\n')

Basically, I do not want to build syslinux or set config options that
are usable on x86 target when building for other targets.


>
>>
>> One more question, the assert raised when comparing parted's output is
>> caused by different locale. Do you think it would be ok to just enforce
>> LC_ALL=C when running commands under wic?
>
>
> Yes, enforcing a  locale is essential when comparing output of commands.
> Bitbake switches to en_US.UTF8 on startup for the same reason, so feel free
> to use that or C.

I suppose I'll just enforce that in oe-selftest.



-- 
Maciej Borzecki
RnDity


^ permalink raw reply

* libdbus-c++
From: thilo.cestonaro @ 2016-11-14 10:33 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 332 bytes --]

Hey!

I wanted to build an executable using libdbus-c++ but OE-Core has no recipe providing libdbus-c++, please correct me if I'm wrong here!

Is there a reason, other than no one wanted a recipe for libdbus-c++ yet, against the usage of dbus-c++ implementation or why isn't there a recipe for libdbus-c++?

Regards,
Thilo

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3847 bytes --]

^ permalink raw reply

* Re: [PATCH v2 00/10] wic: bugfixes & --fixed-size support, tests, selftest: minor fixes
From: Burton, Ross @ 2016-11-14 10:16 UTC (permalink / raw)
  To: Maciej Borzęcki; +Cc: Paul Eggleton, Maciej Borzecki, OE-core
In-Reply-To: <CAD4b0_J6hKetcbiXvUS3wAeo19QSGF=5DCFZnLK-0Lz904-6DA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

On 14 November 2016 at 10:02, Maciej Borzęcki <maciej.borzecki@rndity.com>
wrote:

> I see that the builds were running with qemux85-64 MACHINE, shouldn't
> TARGET_ARCH be set to x86-64 then? There's a check that builds
> syslinux(-native) for x86 archs only since it's not buildable for
> anything else. Same for HDDIMG.
>

Not quite:

$ MACHINE=qemux86 bitbake core-image-minimal -e | grep ^TARGET_ARCH=
TARGET_ARCH="i586"

$ MACHINE=qemux86-64 bitbake core-image-minimal -e | grep ^TARGET_ARCH=
TARGET_ARCH="x86_64"

(had to patch bitbake.conf to export TARGET_ARCH)


> One more question, the assert raised when comparing parted's output is
> caused by different locale. Do you think it would be ok to just enforce
> LC_ALL=C when running commands under wic?
>

Yes, enforcing a  locale is essential when comparing output of commands.
Bitbake switches to en_US.UTF8 on startup for the same reason, so feel free
to use that or C.

Ross

[-- Attachment #2: Type: text/html, Size: 1887 bytes --]

^ permalink raw reply

* Re: [PATCH v2 00/10] wic: bugfixes & --fixed-size support, tests, selftest: minor fixes
From: Maciej Borzęcki @ 2016-11-14 10:02 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Paul Eggleton, Maciej Borzecki, OE-core
In-Reply-To: <CAJTo0LZiXenXy8WC28z+5a4+ibJekaqeD+0_O84aejyi9XNH4w@mail.gmail.com>

On Mon, Nov 14, 2016 at 10:24 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 10 November 2016 at 12:18, Maciej Borzecki <maciej.borzecki@rndity.com>
> wrote:
>>
>> v2 of patch series previously posted here [1].
>>
>> The series introduces anumber of fixes to wic, as well as a new
>> --fixed-size
>> option applicable to `part` entries in kickstart files. The option makes
>> it
>> possible to have a fixed size partition, with additional verification that
>> the
>> file system image fits into the allocated disk space. This is in cotrast
>> with
>> --size option, which the minimum size, and partition may in fact be larger
>> in
>> the final disk image.
>>
>> The series introduces two tests that verify if wic has created the image
>> with
>> properly sized partition and that partition size checks work as expected.
>>
>> Patch `oe-selftest: fix handling of test cases without ID in
>> --list-tests-by` is
>> a small bugfix for oe-selftes tool which resolves an issue triggered by
>> Python
>> 3.x being more strict than 2.x.
>
>
> This series appears to be causing selftest to fail on the autobuilders:
>
> https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/732/steps/Running%20oe-selftest/logs/stdio

I see that the builds were running with qemux85-64 MACHINE, shouldn't
TARGET_ARCH be set to x86-64 then? There's a check that builds
syslinux(-native) for x86 archs only since it's not buildable for
anything else. Same for HDDIMG.

One more question, the assert raised when comparing parted's output is
caused by different locale. Do you think it would be ok to just enforce
LC_ALL=C when running commands under wic?

-- 
Maciej Borzecki
RnDity


^ permalink raw reply

* [PATCH] tiff: Security fix CVE-2016-3658
From: Zhixiong Chi @ 2016-11-14  9:46 UTC (permalink / raw)
  To: openembedded-core

The TIFFWriteDirectoryTagLongLong8Array function in tif_dirwrite.c in the tiffset tool
allows remote attackers to cause a denial of service (out-of-bounds read) via vectors
involving the ma variable.

External References:
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3658
http://bugzilla.maptools.org/show_bug.cgi?id=2546

Patch from:
https://github.com/vadz/libtiff/commit/45c68450bef8ad876f310b495165c513cad8b67d

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
---
 .../libtiff/files/CVE-2016-3658.patch              | 111 +++++++++++++++++++++
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb      |   1 +
 2 files changed, 112 insertions(+)
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3658.patch

diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-3658.patch b/meta/recipes-multimedia/libtiff/files/CVE-2016-3658.patch
new file mode 100644
index 0000000..2f464cd
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-3658.patch
@@ -0,0 +1,111 @@
+From: 45c68450bef8ad876f310b495165c513cad8b67d
+From: Even Rouault <even.rouault@spatialys.com>
+
+* libtiff/tif_dir.c: discard values of SMinSampleValue and
+SMaxSampleValue when they have been read and the value of
+SamplesPerPixel is changed afterwards (like when reading a
+OJPEG compressed image with a missing SamplesPerPixel tag,
+and whose photometric is RGB or YCbCr, forcing SamplesPerPixel
+being 3). Otherwise when rewriting the directory (for example
+with tiffset, we will expect 3 values whereas the array had been
+allocated with just one), thus causing a out of bound read access.
+Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
+(CVE-2014-8127, duplicate: CVE-2016-3658)
+
+* libtiff/tif_write.c: avoid null pointer dereference on td_stripoffset
+when writing directory, if FIELD_STRIPOFFSETS was artificially set
+for a hack case	in OJPEG case.
+Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
+(CVE-2014-8127, duplicate: CVE-2016-3658)
+
+CVE: CVE-2016-3658
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/45c68450bef8ad876f310b495165c513cad8b67d
+
+Signed-off-by: Zhixiong.Chi <zhixiong.chi@windriver.com>
+
+Index: tiff-4.0.6/ChangeLog
+===================================================================
+--- tiff-4.0.6.orig/ChangeLog	2016-11-14 10:52:10.008748230 +0800
++++ tiff-4.0.6/ChangeLog	2016-11-14 16:17:46.140884438 +0800
+@@ -1,3 +1,22 @@
++2016-10-25 Even Rouault <even.rouault at spatialys.com>
++
++	* libtiff/tif_dir.c: discard values of SMinSampleValue and
++	SMaxSampleValue when they have been read and the value of
++	SamplesPerPixel is changed afterwards (like when reading a
++	OJPEG compressed image with a missing SamplesPerPixel tag,
++	and whose photometric is RGB or YCbCr, forcing SamplesPerPixel
++	being 3). Otherwise when rewriting the directory (for example
++	with tiffset, we will expect 3 values whereas the array had been
++	allocated with just one), thus causing a out of bound read access.
++	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
++	(CVE-2014-8127, duplicate: CVE-2016-3658)
++
++	* libtiff/tif_write.c: avoid null pointer dereference on td_stripoffset
++	when writing directory, if FIELD_STRIPOFFSETS was artificially set
++	for a hack case	in OJPEG case.
++	Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
++	(CVE-2014-8127, duplicate: CVE-2016-3658)
++
+ 2016-09-24  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
+ 
+ 	* libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to
+Index: tiff-4.0.6/libtiff/tif_dir.c
+===================================================================
+--- tiff-4.0.6.orig/libtiff/tif_dir.c	2015-06-01 07:11:43.000000000 +0800
++++ tiff-4.0.6/libtiff/tif_dir.c	2016-11-14 16:20:17.800885495 +0800
+@@ -254,6 +254,28 @@
+ 		v = (uint16) va_arg(ap, uint16_vap);
+ 		if (v == 0)
+ 			goto badvalue;
++		if( v != td->td_samplesperpixel )
++		{
++		    /* See http://bugzilla.maptools.org/show_bug.cgi?id=2500 */
++		    if( td->td_sminsamplevalue != NULL )
++		    {
++		        TIFFWarningExt(tif->tif_clientdata,module,
++		            "SamplesPerPixel tag value is changing, "
++		            "but SMinSampleValue tag was read with a different value. Cancelling it");
++		        TIFFClrFieldBit(tif,FIELD_SMINSAMPLEVALUE);
++		        _TIFFfree(td->td_sminsamplevalue);
++		        td->td_sminsamplevalue = NULL;
++		    }
++		    if( td->td_smaxsamplevalue != NULL )
++		    {
++		        TIFFWarningExt(tif->tif_clientdata,module,
++		            "SamplesPerPixel tag value is changing, "
++		            "but SMaxSampleValue tag was read with a different value. Cancelling it");
++		        TIFFClrFieldBit(tif,FIELD_SMAXSAMPLEVALUE);
++		        _TIFFfree(td->td_smaxsamplevalue);
++		        td->td_smaxsamplevalue = NULL;
++		    }
++		}
+ 		td->td_samplesperpixel = (uint16) v;
+ 		break;
+ 	case TIFFTAG_ROWSPERSTRIP:
+Index: tiff-4.0.6/libtiff/tif_dirwrite.c
+===================================================================
+--- tiff-4.0.6.orig/libtiff/tif_dirwrite.c	2015-05-31 08:38:46.000000000 +0800
++++ tiff-4.0.6/libtiff/tif_dirwrite.c	2016-11-14 16:23:54.688887007 +0800
+@@ -542,7 +542,19 @@
+ 			{
+ 				if (!isTiled(tif))
+ 				{
+-					if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset))
++					/* td_stripoffset might be NULL in an odd OJPEG case. See
++					 *  tif_dirread.c around line 3634.
++					 * XXX: OJPEG hack.
++					 * If a) compression is OJPEG, b) it's not a tiled TIFF,
++					 * and c) the number of strips is 1,
++					 * then we tolerate the absence of stripoffsets tag,
++					 * because, presumably, all required data is in the
++					 * JpegInterchangeFormat stream.
++					 * We can get here when using tiffset on such a file.
++					 * See http://bugzilla.maptools.org/show_bug.cgi?id=2500
++					*/
++					if (tif->tif_dir.td_stripoffset != NULL &&
++					    !TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset))
+ 						goto bad;
+ 				}
+ 				else
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
index 796d86e..edd560f 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -15,6 +15,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
            file://CVE-2016-3991.patch \
            file://CVE-2016-3623.patch \
            file://CVE-2016-3622.patch \
+           file://CVE-2016-3658.patch \
           "
 
 SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
-- 
1.9.1



^ permalink raw reply related

* [PATCH v2] [krogoth] nss: Disable warning on deprecated API usage
From: Zeeshan Ali @ 2016-11-14  9:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zeeshan Ali

nss itself enables Werror if gcc is version 4.8 of greater, which fails
the build against new glibc (2.24) because of use of readdir_r(), which
is now deprecated. Let's just disable warnings on deprecated API usage.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=10644

Signed-off-by: Zeeshan Ali <zeeshan.ali@pelagicore.com>
---

This patch is not needed for master or morty, cause they use the latest version of nss.

 .../nss/nss-disable-werror-on-deprecated-api.patch | 22 ++++++++++++++++++++++
 meta/recipes-support/nss/nss_3.21.bb               |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-support/nss/nss/nss-disable-werror-on-deprecated-api.patch

diff --git a/meta/recipes-support/nss/nss/nss-disable-werror-on-deprecated-api.patch b/meta/recipes-support/nss/nss/nss-disable-werror-on-deprecated-api.patch
new file mode 100644
index 0000000..fbaa6a6
--- /dev/null
+++ b/meta/recipes-support/nss/nss/nss-disable-werror-on-deprecated-api.patch
@@ -0,0 +1,22 @@
+Disable Werror on deprecated API
+
+nss itself enables Werror if gcc is version 4.8 of greater, which fails
+the build against new glibc (2.24) because of use of readdir_r(), which is
+now deprecated. Let's just disable warnings on deprecated API usage.
+
+Upstream-Status: Inappropriate [Dev branch on newer version w/o this issue]
+
+Signed-off-by: Zeeshan Ali <zeeshan.ali@pelagicore.com>
+===================================================
+diff -u -r a/nss/coreconf/Werror.mk b/nss/coreconf/Werror.mk
+--- a/nss/coreconf/Werror.mk	2015-11-09 06:12:59.000000000 +0100
++++ b/nss/coreconf/Werror.mk	2016-11-11 14:36:36.301062957 +0100
+@@ -60,7 +60,7 @@
+   endif #ndef NSS_ENABLE_WERROR
+ 
+   ifeq ($(NSS_ENABLE_WERROR),1)
+-    WARNING_CFLAGS += -Werror
++    WARNING_CFLAGS += -Werror -Wno-deprecated -Wno-deprecated-declarations
+   else
+     # Old versions of gcc (< 4.8) don't support #pragma diagnostic in functions.
+     # Use this to disable use of that #pragma and the warnings it suppresses.
diff --git a/meta/recipes-support/nss/nss_3.21.bb b/meta/recipes-support/nss/nss_3.21.bb
index 05d81c2..7933883 100644
--- a/meta/recipes-support/nss/nss_3.21.bb
+++ b/meta/recipes-support/nss/nss_3.21.bb
@@ -22,6 +22,7 @@ SRC_URI = "\
     file://nss-fix-nsinstall-build.patch \
     file://0001-Fix-build-failure-on-opensuse-13.1.patch \
     file://nss-gcc6-fix.patch \
+    file://nss-disable-werror-on-deprecated-api.patch \
     file://nss.pc.in \
     file://signlibs.sh \
 "
-- 
2.9.3



^ permalink raw reply related

* Re: [PATCH v2 00/10] wic: bugfixes & --fixed-size support, tests, selftest: minor fixes
From: Burton, Ross @ 2016-11-14  9:24 UTC (permalink / raw)
  To: Maciej Borzecki; +Cc: Paul Eggleton, Maciej Borzecki, OE-core
In-Reply-To: <cover.1478779674.git.maciej.borzecki@rndity.com>

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

On 10 November 2016 at 12:18, Maciej Borzecki <maciej.borzecki@rndity.com>
wrote:

> v2 of patch series previously posted here [1].
>
> The series introduces anumber of fixes to wic, as well as a new
> --fixed-size
> option applicable to `part` entries in kickstart files. The option makes it
> possible to have a fixed size partition, with additional verification that
> the
> file system image fits into the allocated disk space. This is in cotrast
> with
> --size option, which the minimum size, and partition may in fact be larger
> in
> the final disk image.
>
> The series introduces two tests that verify if wic has created the image
> with
> properly sized partition and that partition size checks work as expected.
>
> Patch `oe-selftest: fix handling of test cases without ID in
> --list-tests-by` is
> a small bugfix for oe-selftes tool which resolves an issue triggered by
> Python
> 3.x being more strict than 2.x.
>

This series appears to be causing selftest to fail on the autobuilders:

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/732/steps/Running%20oe-selftest/logs/stdio

Ross

[-- Attachment #2: Type: text/html, Size: 1926 bytes --]

^ permalink raw reply

* Re: [PATCH] kernel.bbclass: Allow ${S} to be overridden
From: Patrick Ohly @ 2016-11-14  7:59 UTC (permalink / raw)
  To: Paul Barker; +Cc: OpenEmbedded Core
In-Reply-To: <20161111193902.3e34bf60@nuc.betafive.co.uk>

On Fri, 2016-11-11 at 19:39 +0000, Paul Barker wrote:
> On Wed, 9 Nov 2016 15:42:29 -0800
> Andre McCurdy <armccurdy@gmail.com> wrote:
> 
> > The solution I use (learned the hard way) is to ensure that "S = ..."
> > comes after "inherit kernel" in the kernel recipe.
> > 
> 
> Ok, yea, this works for me.
> 
> Is this expected? S is set to ${STAGING_KERNEL_DIR} at the start of
> kernel.bbclass. The base_do_unpack_append() function is defined later
> in kernel.bbclass. If S is set to ${WORKDIR}/${BP} only after
> kernel.bbclass is inherited, then that's after base_do_unpack_append()
> has been parsed.

Parsing itself does not expand variable references (*), so it is
possible to use a variable that gets changed later on and use the value
that the variable eventually ends up having.

(*) There's one exception - the := assignment expands based on the
currently defined variables at the time of parsing the assignment.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





^ permalink raw reply

* [PATCH] cmake.bbclass: Set CXXFLAGS and CFLAGS
From: Khem Raj @ 2016-11-14  5:35 UTC (permalink / raw)
  To: openembedded-core

We strip the TOOLCHAIN_OPTIONS and HOST_CC_ARCH from CC/CXX in cmake.bbclass
whereas CFLAFS and CXXFLAGS assume that TOOLCHAIN_OPTIONS are
part of CC/CXX variables, this causes compile failures when cmake
is running compiler tests during configure on some architectures
especially armhf, because hf ABI information -mfloat-abi is part
of TOOLCHAIN_OPTIONS, so what happens is that testcase gets compiled
without hard-float, howver, during linking the float ABI option
is passed via LDFLAGS, now linker rejects this and fails like
/mnt/a/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.2.0/ld: error: cmTC_27947 uses VFP register arguments, CMakeFiles/cmTC_27947.dir/src.cxx.o does not
mnt/a/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.2.0/ld: failed to merge target specific data of file CMakeFiles/cmTC_27947.dir/src.cxx.o
collect2: error: ld returned 1 exit status

This means that CMake now fails the configure time test too
which is not right, e.g. it might disable features which actually do exist
and should be enabled e.g. in case above it is resulting as below

Performing C++ SOURCE FILE Test HAS_BUILTIN_SYNC_SUB_AND_FETCH failed with the following output:

Its actually a bug in CMake see
https://gitlab.kitware.com/cmake/cmake/issues/16421

CMake is ignoring CMAKE_CXX_FLAGS when using CHECK_CXX_SOURCE_COMPILES
function.

Until it is fixed upstream, we add HOST_CC_ARCH and TOOLCHAIN_OPTIONS
to CFLAGS and CXXFLAGS, so that we can ensure that compiler invocation
remains consistent.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/cmake.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 3e762de..fad0baa 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -19,6 +19,8 @@ OECMAKE_C_FLAGS_RELEASE ?= "-DNDEBUG"
 OECMAKE_CXX_FLAGS_RELEASE ?= "-DNDEBUG"
 OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
 OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"
+CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
+CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
 
 OECMAKE_RPATH ?= ""
 OECMAKE_PERLNATIVE_DIR ??= ""
-- 
2.10.2



^ permalink raw reply related

* Re: [PATCH 2/2] go-examples: Add an example, helloworld written in go
From: Khem Raj @ 2016-11-14  2:07 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CABcZANmkhnCF0-p75sAC-p2fOrYmjSPo9==OqDjPDwnZd-uUzQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1675 bytes --]



On 11/10/16 6:59 PM, Christopher Larson wrote:
> 
> On Wed, Nov 9, 2016 at 5:39 PM, Khem Raj <raj.khem@gmail.com
> <mailto:raj.khem@gmail.com>> wrote:
> 
>     diff --git a/meta/recipes-extended/go-examples/go-examples.inc
>     b/meta/recipes-extended/go-examples/go-examples.inc
>     new file mode 100644
>     index 0000000..c632681
>     --- /dev/null
>     +++ b/meta/recipes-extended/go-examples/go-examples.inc
>     @@ -0,0 +1,10 @@
>     +DESCRIPTION = "This is a simple example recipe that cross-compiles a Go
>     program."
>     +SECTION = "examples"
>     +HOMEPAGE = "https://golang.org/"
>     +
>     +LICENSE = "MIT"
>     +LIC_FILES_CHKSUM =
>     "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
>     +
>     +S = "${WORKDIR}"
>     +
>     +inherit go
>     diff --git a/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
>     <http://go-helloworld_0.1.bb>
>     b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
>     <http://go-helloworld_0.1.bb>
>     new file mode 100644
>     index 0000000..af9d3b7
>     --- /dev/null
>     +++ b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
>     <http://go-helloworld_0.1.bb>
>     @@ -0,0 +1,15 @@
>     +require go-examples.inc
>     +
>     +
>     +SRC_URI += " \
>     +  file://helloworld.go \
>     +"
>     +
>     +do_compile() {
>     +  go build helloworld.go
>     +}
> 
> 
> Under what circumstances would one use the go_do_compile from go.bbclass vs this?

I think this is a good point. It would be more appropriate to use
the primitives from go.bbclass in this example. I will try to rework it


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply

* Re: WRL error: "Can't locate Config_heavy-target.pl in @INC" -- OE versus WRL
From: Mark Hatle @ 2016-11-13 16:16 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1611130434570.28277@localhost.localdomain>

On 11/13/16 4:49 AM, Robert P. J. Day wrote:
> 
>   sorry, i'm still confused, let me make sure i understand this ...
> 
> On Sat, 12 Nov 2016, Mark Hatle wrote:
> 
>> On 11/12/16 2:45 PM, Robert P. J. Day wrote:
>>>
>>>   (note: this is actually an error i'm getting under wind river linux
>>> 8, i'm just curious as to why OE works just fine.)
>>>
>>>   as mentioned, when trying to build a trivial hand-rolled perl recipe
>>> under wind river linux 8, i'm getting:
>>>
>>> | Can't locate Config_heavy-target.pl in @INC (@INC contains: ... long
>>> path snipped ...) at
>>> .../tmp/sysroots/x86_64-linux/usr/lib/perl-native/perl/5.22.0/Config.pm
>>> line 88.
>>
>> My suspicion is that you are not using the buildtools-tarball with
>> your OE build, ...
> 
>   that would be correct, i've never used that, never needed to, on my
> fedora system. which means (correct me if i'm wrong) that i *am* using

You are using host content to build instead of the buildtools-tarball content.
(buildtools-tarball is supposed to include all of the host's tools necessary to
build a reasonable system with the correct versions.)

> some natively-installed content, based on ASSUME_PROVIDED from
> bitbake.conf. and i notice there's a few extra lines there than what i
> remember from quite some time back, including

All the assumed provide says is if anything requires one of those items, assume
it exists -- don't complain or try to build it.

>     hostperl-runtime-native \
> 
> so i'll have to look at what that means. but the point here is that
> the OE build *does* work.
> 
>> but Wind River Linux automatically uses this in an attempt to avoid
>> host incompatibilities with all of the random hosts our customers
>> use.
> 
>   ok, so WRL builds and uses the buildtools-tarball, and that's where
> i get the aforementioned error.

if there is a bug in the buildtools-tarball content (nativesdk packages) then it
can manifest itself like this.

>> To use the OE version of buildtools-tarball, you will have to build
>> it, extract it and then source the environment file.
> 
>   and that's where i'm confused ... i'm not using the OE version of
> buildtools-tarball with my OE build and things *work*, so why would i
> want to use it *now*? this seems backwards.

If your host is missing content and you don't have root access.. you don't have
a choice but to build the components yourself -- or the easier way to build and
use the buildtools-tarball.

A -lot- of commercial customers do not have root access on their build machines
(either at their desk or elsewhere).  So when they find something is missing,
say python3 or the right version or tar or make or git... they don't have any
easy way to fix the problem.  The buildtools-tarball content provides these and
other components.

>>>   but building precisely the same recipe under regular OE (actually,
>>> poky) works just fine. i did some searching, and found this:
>>>
>>> https://patchwork.openembedded.org/patch/111047/
>>>
>>> but i have no idea what it means. i also notice that the standard
>>> bitbake.conf (which i haven't looked at in a while), now contains a
>>> few more ASSUME_PROVIDED entries, including:
>>>
>>>     hostperl-runtime-native \
>>>     hostpython-runtime-native \
>>
>> f4dade8e meta/conf/bitbake.conf         (Ed Bartosh                2016-01-07
>> 13:39:39 +0200 179)     hostperl-runtime-native \
>> 8a474057 meta/conf/bitbake.conf         (Ed Bartosh                2016-01-13
>> 10:03:04 +0200 180)     hostpython-runtime-native \
>>
>> These are newer then Wind River Linux 8, which is based on Yocto Project 2.0 /
>> Jethro which was released around Nov 2015.
>>
>>> while the WRL version contains:
>>>
>>>     perl-native-runtime \
>>>     python-native-runtime \
>>
>> You you look at Jethro you will see:
>>
>> 34927dfa meta/conf/bitbake.conf         (Richard Purdie          2007-12-18
>> 15:04:06 +0000 174)     perl-native-runtime \
>> 34927dfa meta/conf/bitbake.conf         (Richard Purdie          2007-12-18
>> 15:04:06 +0000 175)     python-native-runtime \
>>
>> So you are attempting to compare apples to oranges (master/morty/krogoth against
>> jethro.)
> 
>   so ... what is the solution here? how would i tweak my WRL build to
> resolve this issue? again, apologies for asking a WRL question on the
> OE list, i'm just trying to understand the difference.

First if you are comparing any commercial embedded Linux to OE, be sure to be
comparing the same version.  In this case WRL 8 to master, morty or krogoth is
not a reasonable comparison as it is based on Jethro.  (The commercial vendor
will be able to tell you what version they are based on.)

If you are having a specific problem with a commercial distribution you should
contact them for support.  Our support organization can help you determine if
it's a usage problem, or something broken in our product.

I've not run across this issue, so I can't help any further on the product side.

--Mark

> rday
> 



^ permalink raw reply

* Re: WRL error: "Can't locate Config_heavy-target.pl in @INC" -- OE versus WRL
From: Robert P. J. Day @ 2016-11-13  9:49 UTC (permalink / raw)
  To: Mark Hatle; +Cc: OE Core mailing list
In-Reply-To: <ca53cb96-5c1e-35f1-55f3-8f61897de18f@windriver.com>


  sorry, i'm still confused, let me make sure i understand this ...

On Sat, 12 Nov 2016, Mark Hatle wrote:

> On 11/12/16 2:45 PM, Robert P. J. Day wrote:
> >
> >   (note: this is actually an error i'm getting under wind river linux
> > 8, i'm just curious as to why OE works just fine.)
> >
> >   as mentioned, when trying to build a trivial hand-rolled perl recipe
> > under wind river linux 8, i'm getting:
> >
> > | Can't locate Config_heavy-target.pl in @INC (@INC contains: ... long
> > path snipped ...) at
> > .../tmp/sysroots/x86_64-linux/usr/lib/perl-native/perl/5.22.0/Config.pm
> > line 88.
>
> My suspicion is that you are not using the buildtools-tarball with
> your OE build, ...

  that would be correct, i've never used that, never needed to, on my
fedora system. which means (correct me if i'm wrong) that i *am* using
some natively-installed content, based on ASSUME_PROVIDED from
bitbake.conf. and i notice there's a few extra lines there than what i
remember from quite some time back, including

    hostperl-runtime-native \

so i'll have to look at what that means. but the point here is that
the OE build *does* work.

> but Wind River Linux automatically uses this in an attempt to avoid
> host incompatibilities with all of the random hosts our customers
> use.

  ok, so WRL builds and uses the buildtools-tarball, and that's where
i get the aforementioned error.

> To use the OE version of buildtools-tarball, you will have to build
> it, extract it and then source the environment file.

  and that's where i'm confused ... i'm not using the OE version of
buildtools-tarball with my OE build and things *work*, so why would i
want to use it *now*? this seems backwards.

> >   but building precisely the same recipe under regular OE (actually,
> > poky) works just fine. i did some searching, and found this:
> >
> > https://patchwork.openembedded.org/patch/111047/
> >
> > but i have no idea what it means. i also notice that the standard
> > bitbake.conf (which i haven't looked at in a while), now contains a
> > few more ASSUME_PROVIDED entries, including:
> >
> >     hostperl-runtime-native \
> >     hostpython-runtime-native \
>
> f4dade8e meta/conf/bitbake.conf         (Ed Bartosh                2016-01-07
> 13:39:39 +0200 179)     hostperl-runtime-native \
> 8a474057 meta/conf/bitbake.conf         (Ed Bartosh                2016-01-13
> 10:03:04 +0200 180)     hostpython-runtime-native \
>
> These are newer then Wind River Linux 8, which is based on Yocto Project 2.0 /
> Jethro which was released around Nov 2015.
>
> > while the WRL version contains:
> >
> >     perl-native-runtime \
> >     python-native-runtime \
>
> You you look at Jethro you will see:
>
> 34927dfa meta/conf/bitbake.conf         (Richard Purdie          2007-12-18
> 15:04:06 +0000 174)     perl-native-runtime \
> 34927dfa meta/conf/bitbake.conf         (Richard Purdie          2007-12-18
> 15:04:06 +0000 175)     python-native-runtime \
>
> So you are attempting to compare apples to oranges (master/morty/krogoth against
> jethro.)

  so ... what is the solution here? how would i tweak my WRL build to
resolve this issue? again, apologies for asking a WRL question on the
OE list, i'm just trying to understand the difference.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply

* Re: WRL error: "Can't locate Config_heavy-target.pl in @INC" -- OE versus WRL
From: Mark Hatle @ 2016-11-12 20:17 UTC (permalink / raw)
  To: openembedded-core, Robert P. J. Day
In-Reply-To: <alpine.LFD.2.20.1611121436420.20479@localhost.localdomain>

On 11/12/16 2:45 PM, Robert P. J. Day wrote:
> 
>   (note: this is actually an error i'm getting under wind river linux
> 8, i'm just curious as to why OE works just fine.)
> 
>   as mentioned, when trying to build a trivial hand-rolled perl recipe
> under wind river linux 8, i'm getting:
> 
> | Can't locate Config_heavy-target.pl in @INC (@INC contains: ... long
> path snipped ...) at
> .../tmp/sysroots/x86_64-linux/usr/lib/perl-native/perl/5.22.0/Config.pm
> line 88.

My suspicion is that you are not using the buildtools-tarball with your OE
build, but Wind River Linux automatically uses this in an attempt to avoid host
incompatibilities with all of the random hosts our customers use.

To use the OE version of buildtools-tarball, you will have to build it, extract
it and then source the environment file.

>   but building precisely the same recipe under regular OE (actually,
> poky) works just fine. i did some searching, and found this:
> 
> https://patchwork.openembedded.org/patch/111047/
> 
> but i have no idea what it means. i also notice that the standard
> bitbake.conf (which i haven't looked at in a while), now contains a
> few more ASSUME_PROVIDED entries, including:
> 
>     hostperl-runtime-native \
>     hostpython-runtime-native \

f4dade8e meta/conf/bitbake.conf         (Ed Bartosh                2016-01-07
13:39:39 +0200 179)     hostperl-runtime-native \
8a474057 meta/conf/bitbake.conf         (Ed Bartosh                2016-01-13
10:03:04 +0200 180)     hostpython-runtime-native \

These are newer then Wind River Linux 8, which is based on Yocto Project 2.0 /
Jethro which was released around Nov 2015.

> while the WRL version contains:
> 
>     perl-native-runtime \
>     python-native-runtime \

You you look at Jethro you will see:

34927dfa meta/conf/bitbake.conf         (Richard Purdie          2007-12-18
15:04:06 +0000 174)     perl-native-runtime \
34927dfa meta/conf/bitbake.conf         (Richard Purdie          2007-12-18
15:04:06 +0000 175)     python-native-runtime \

So you are attempting to compare apples to oranges (master/morty/krogoth against
jethro.)

--Mark

> i have no idea what to make of this. thoughts?
> 
> rday
> 



^ permalink raw reply

* WRL error: "Can't locate Config_heavy-target.pl in @INC" -- OE versus WRL
From: Robert P. J. Day @ 2016-11-12 19:45 UTC (permalink / raw)
  To: OE Core mailing list


  (note: this is actually an error i'm getting under wind river linux
8, i'm just curious as to why OE works just fine.)

  as mentioned, when trying to build a trivial hand-rolled perl recipe
under wind river linux 8, i'm getting:

| Can't locate Config_heavy-target.pl in @INC (@INC contains: ... long
path snipped ...) at
.../tmp/sysroots/x86_64-linux/usr/lib/perl-native/perl/5.22.0/Config.pm
line 88.

  but building precisely the same recipe under regular OE (actually,
poky) works just fine. i did some searching, and found this:

https://patchwork.openembedded.org/patch/111047/

but i have no idea what it means. i also notice that the standard
bitbake.conf (which i haven't looked at in a while), now contains a
few more ASSUME_PROVIDED entries, including:

    hostperl-runtime-native \
    hostpython-runtime-native \

while the WRL version contains:

    perl-native-runtime \
    python-native-runtime \

i have no idea what to make of this. thoughts?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




^ permalink raw reply

* Re: [PATCH] u-boot: mkimage: Fix build of u-boot-mkimage
From: Marek Vasut @ 2016-11-12 18:31 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LaSLN1eVRH1ju1w5Ba3PLh6d+E0ZwmRimxcN1DjKRk6iQ@mail.gmail.com>

On 11/09/2016 01:15 AM, Burton, Ross wrote:
> 
> On 7 November 2016 at 18:20, Marek Vasut <marex@denx.de
> <mailto:marex@denx.de>> wrote:
> 
>     -EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC}
>     ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
>     +EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
>     +EXTRA_OEMAKE_append_class-target =
>     'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}"
>     STRIP=true V=1'
>     +EXTRA_OEMAKE_append_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS}
>     ${BUILD_LDFLAGS}" STRIP=true V=1'
>     +EXTRA_OEMAKE_append_class-nativesdk = 'CC="${BUILD_CC}
>     ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1'
> 
> 
> You're going to start hating u-boot...
> 
> Fails on the autobuilder if you're building for a 32-bit x86 target on a
> 64-bit x86 host:
> 
> ERROR: QA Issue: Architecture did not match (x86-64, expected x86) on
> /work/i586-poky-linux-musl/u-boot-mkimage/1_2016.09.01-r0/packages-split/u-boot-mkimage/usr/bin/uboot-mkimage
> [arch]
> 
> I'm guessing that it is using the host compiler instead of the cross
> compiler.

I should have a fix for it all I hope.


-- 
Best regards,
Marek Vasut


^ permalink raw reply

* Re: [PATCH] u-boot: mkimage: Fix build of u-boot-mkimage
From: Marek Vasut @ 2016-11-12 18:31 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LYV3L=i9Nq94uYHck9cGHrqvHrVtJsqOv0do+A4j-eBhg@mail.gmail.com>

On 11/07/2016 09:21 PM, Burton, Ross wrote:
> 
> On 7 November 2016 at 20:15, Burton, Ross <ross.burton@intel.com
> <mailto:ross.burton@intel.com>> wrote:
> 
>     Looking at the makefile this isn't the case - it's part of hostprogs
>     so if anyone of the host-built tools work, they all should.
> 
> 
> Just verified that the HOSTCC changes in this patch make it work for me
> even after removing the sed.  Can you send a revision?

It cannot work without the sed, try building for target. Then the
bin2header is built for target.

> Also the u-boot series went through a number of revisions, can you
> verify that the patches in poky-contrib:ross/mut match what you expect
> to see?

Do you have a link for me ?

-- 
Best regards,
Marek Vasut


^ permalink raw reply

* Re: [PATCH] kernel.bbclass: Allow ${S} to be overridden
From: Paul Barker @ 2016-11-11 19:39 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: OpenEmbedded Core
In-Reply-To: <CAJ86T=XNd_ypY_aBc+eVGpJ4ntUUecT7Umdg37hUrNqZNAw_6g@mail.gmail.com>

On Wed, 9 Nov 2016 15:42:29 -0800
Andre McCurdy <armccurdy@gmail.com> wrote:

> On Wed, Nov 9, 2016 at 10:08 AM, Paul Barker <paul@paulbarker.me.uk> wrote:
> >
> > The reason for this patch is that I'm using a tarball for the kernel
> > sources in the new meta-arduino layer. That tarball doesn't get
> > extracted to ${STAGING_KERNEL_DIR} and so it needs to be copied over to
> > there. Looking at kernel.bbclass, it looks like the logic to do this is
> > present:
> >
> >
> >     # Old style kernels may set ${S} = ${WORKDIR}/git for example
> >     # We need to move these over to STAGING_KERNEL_DIR. We can't just
> >     # create the symlink in advance as the git fetcher can't cope with
> >     # the symlink.
> >     do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
> >     do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
> >     base_do_unpack_append () {
> >         s = d.getVar("S", True)
> >         if s[-1] == '/':
> >             # drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail
> >             s=s[:-1]
> >         kernsrc = d.getVar("STAGING_KERNEL_DIR", True)
> >         if s != kernsrc:
> >             bb.utils.mkdirhier(kernsrc)
> >             bb.utils.remove(kernsrc, recurse=True)
> >             if d.getVar("EXTERNALSRC", True):
> >                 # With EXTERNALSRC S will not be wiped so we can symlink to it
> >                 os.symlink(s, kernsrc)
> >             else:
> >                 import shutil
> >                 shutil.move(s, kernsrc)
> >                 os.symlink(kernsrc, s)
> >     }
> >
> > The problem is we can't set S to anything unless we can override it.
> >
> > I've now looked into this futher and it seems to be working for some
> > kernel recipes but not others. The issue may be that we have an
> > assignment for S in bitbake.conf:
> >
> >     S = "${WORKDIR}/${BP}"
> >
> > That's obviously overriding the 'S ?= ...' assignment when my patch is
> > applied where S isn't also explicitly assigned in the recipe, some
> > other class or include file.
> >
> > I'm not sure on how precedence is determined if a variable is assigned
> > using '=' multiple times.
> >
> > I'll have another look into it and see where I get. I have a workaround
> > in place for the meta-arduino layer for now so it doesn't need an
> > urgent fix.
> >
> > However, if it turns out we can't reliably override S in a kernel recipe
> > then should we still have that comment and base_do_unpack_append() in
> > kernel.bbclass?
> 
> The solution I use (learned the hard way) is to ensure that "S = ..."
> comes after "inherit kernel" in the kernel recipe.
> 

Ok, yea, this works for me.

Is this expected? S is set to ${STAGING_KERNEL_DIR} at the start of
kernel.bbclass. The base_do_unpack_append() function is defined later
in kernel.bbclass. If S is set to ${WORKDIR}/${BP} only after
kernel.bbclass is inherited, then that's after base_do_unpack_append()
has been parsed.

I've re-read the bitbake user manual [1] but I can't clearly understand
why this works. Is it to do with when the _append is applied?

Is there any way we can make this more obvious or is this just the
nature of bitbake?

[1]: http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html#basic-syntax


^ permalink raw reply

* Re: Yocto Project Status WW45 - UPDATED
From: Andreas Oberritter @ 2016-11-11 18:49 UTC (permalink / raw)
  To: akuster808, Richard Purdie, Jolley, Stephen K,
	openembedded-core@lists.openembedded.org
In-Reply-To: <414710d2-e436-02cb-6df9-a9a2f83f3a29@gmail.com>

On 11.11.2016 19:20, akuster808 wrote:
> 
> 
> On 11/11/2016 12:53 AM, Andreas Oberritter wrote:
>> On 08.11.2016 14:51, Richard Purdie wrote:
>>> On Tue, 2016-11-08 at 11:00 +0100, Andreas Oberritter wrote:
>>>> Hello Stephen,
>>>>
>>>> On 04.11.2016 18:06, Jolley, Stephen K wrote:
>>>>> ·        There was a challenging taskhash mismatch test case this
>>>>> week
>>>>> which has resulted in some significant debugging improvements for
>>>>> taskhashes and basehashes which are now in master.
>>>> is there an entry in bugzilla about this issue, or can you please add
>>>> a reference to the actual commits in master? I'm facing a similar
>>>> issue, so it might be helpful for me to backport them to the branch
>>>> I'm using.
>>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=0a4a6d6956a10aa0a6589de12b0b2380a9f0a7d9
>>>
>>>
>>> has info in the commit message. You also want:
>>>
>>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=589f08aa852dd43af5d05d698cfa917bec084210
>>>
>>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=157947efc7e505e01baafb33ec93fe2f485308fe
>>>
>>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f6b0c60664e86fec55d282f1ea41238abd74712d
>>>
>>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=71c837611690ab4bec1656a58d13ca48e7c6a6e6
>>>
>> I backported these patches to krogoth. I think I would never have found
>> the cause for my taskhash mismatch without them. Thank you very much!
> sounds like I should queue these up in my staging.

The first commits are for bitbake. I needed to make some adjustments for
python 2.7. You can find my backported patches here:

https://github.com/opendreambox/bitbake/commits/1.30

Regards,
Andreas

> 
> - Armin
>>
>> Best regards,
>> Andreas
>>
>>> Cheers,
>>>
>>> Richard
>>>
> 



^ permalink raw reply

* Re: [PATCHv4][krogoth] curl: CVE-2016-8625
From: Leonardo Sandoval @ 2016-11-11 18:48 UTC (permalink / raw)
  To: Sona Sarmadi, openembedded-core; +Cc: sona
In-Reply-To: <1478863703-12920-1-git-send-email-sona.sarmadi@enea.com>

Sona, can you rebase this patch on top of krogoth and send it again.

I tried patching it with this result

$ git pw mbox 3865 -r 1 | git apply --check
error: patch failed: meta/recipes-support/curl/curl_7.47.1.bb:25
error: meta/recipes-support/curl/curl_7.47.1.bb: patch does not apply



On 11/11/2016 05:28 AM, Sona Sarmadi wrote:
> IDNA 2003 makes curl use wrong host
>
> Affected versions: curl 7.12.0 to and including 7.50.3
> Reference:
> https://curl.haxx.se/docs/adv_20161102K.html
>
> Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>



^ permalink raw reply

* Re: Yocto Project Status WW45 - UPDATED
From: akuster808 @ 2016-11-11 18:20 UTC (permalink / raw)
  To: Andreas Oberritter, Richard Purdie, Jolley, Stephen K,
	openembedded-core@lists.openembedded.org
In-Reply-To: <c2bf93e9-5aa6-1849-487c-3a30336b9a0f@opendreambox.org>



On 11/11/2016 12:53 AM, Andreas Oberritter wrote:
> On 08.11.2016 14:51, Richard Purdie wrote:
>> On Tue, 2016-11-08 at 11:00 +0100, Andreas Oberritter wrote:
>>> Hello Stephen,
>>>
>>> On 04.11.2016 18:06, Jolley, Stephen K wrote:
>>>> ·        There was a challenging taskhash mismatch test case this
>>>> week
>>>> which has resulted in some significant debugging improvements for
>>>> taskhashes and basehashes which are now in master.
>>> is there an entry in bugzilla about this issue, or can you please add
>>> a reference to the actual commits in master? I'm facing a similar
>>> issue, so it might be helpful for me to backport them to the branch
>>> I'm using.
>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=0a4a6d6956a10aa0a6589de12b0b2380a9f0a7d9
>>
>> has info in the commit message. You also want:
>>
>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=589f08aa852dd43af5d05d698cfa917bec084210
>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=157947efc7e505e01baafb33ec93fe2f485308fe
>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f6b0c60664e86fec55d282f1ea41238abd74712d
>> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=71c837611690ab4bec1656a58d13ca48e7c6a6e6
> I backported these patches to krogoth. I think I would never have found
> the cause for my taskhash mismatch without them. Thank you very much!
sounds like I should queue these up in my staging.

- Armin
>
> Best regards,
> Andreas
>
>> Cheers,
>>
>> Richard
>>



^ permalink raw reply

* Re: [PATCH 1/2] go: Add recipes for golang compilers and tools
From: Khem Raj @ 2016-11-11 18:11 UTC (permalink / raw)
  To: Maciej Borzęcki; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAD4b0_LQuuuwhhsMMto74KdT2NbfhrgY6Hp9A=2_H7VuyZ-E+g@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 60989 bytes --]



On 11/11/16 9:16 AM, Maciej Borzęcki wrote:
> On Thu, Nov 10, 2016 at 1:39 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> This is converging the recipes for go from
>> meta-virtualization and oe-meta-go
>>
>> Add recipes for go 1.7
>>
>> go.bbclass is added to ease out writing
>> recipes for go packages
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  meta/classes/go.bbclass                            |  74 +++++++
>>  meta/classes/goarch.bbclass                        |  40 ++++
>>  meta/recipes-devtools/go/go-1.4.inc                |  15 ++
>>  .../go/go-1.4/016-armhf-elf-header.patch           |  24 +++
>>  ...ckport-cmd-link-support-new-386-amd64-rel.patch | 225 +++++++++++++++++++++
>>  meta/recipes-devtools/go/go-1.4/syslog.patch       |  62 ++++++
>>  meta/recipes-devtools/go/go-1.6.inc                |  19 ++
>>  .../go/go-1.6/armhf-elf-header.patch               |  23 +++
>>  .../go/go-1.6/fix-cc-handling.patch                |  50 +++++
>>  .../go/go-1.6/fix-target-cc-for-build.patch        |  17 ++
>>  meta/recipes-devtools/go/go-1.6/gotooldir.patch    |  30 +++
>>  .../go/go-1.6/split-host-and-target-build.patch    |  63 ++++++
>>  meta/recipes-devtools/go/go-1.6/syslog.patch       |  62 ++++++
>>  meta/recipes-devtools/go/go-1.7.inc                |  18 ++
>>  .../go/go-1.7/armhf-elf-header.patch               |  23 +++
>>  .../go/go-1.7/fix-cc-handling.patch                |  50 +++++
>>  .../go/go-1.7/fix-target-cc-for-build.patch        |  17 ++
>>  meta/recipes-devtools/go/go-1.7/gotooldir.patch    |  30 +++
>>  .../go/go-1.7/split-host-and-target-build.patch    |  62 ++++++
>>  meta/recipes-devtools/go/go-1.7/syslog.patch       |  62 ++++++
>>  meta/recipes-devtools/go/go-common.inc             |  21 ++
>>  meta/recipes-devtools/go/go-native.inc             |  54 +++++
>>  meta/recipes-devtools/go/go-native_1.4.bb          |   2 +
>>  meta/recipes-devtools/go/go.inc                    |  74 +++++++
>>  meta/recipes-devtools/go/go_1.6.bb                 |   4 +
>>  meta/recipes-devtools/go/go_1.7.bb                 |   4 +
>>  26 files changed, 1125 insertions(+)
>>  create mode 100644 meta/classes/go.bbclass
>>  create mode 100644 meta/classes/goarch.bbclass
>>  create mode 100644 meta/recipes-devtools/go/go-1.4.inc
>>  create mode 100644 meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.4/syslog.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.6.inc
>>  create mode 100644 meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.6/gotooldir.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.6/syslog.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.7.inc
>>  create mode 100644 meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.7/gotooldir.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch
>>  create mode 100644 meta/recipes-devtools/go/go-1.7/syslog.patch
>>  create mode 100644 meta/recipes-devtools/go/go-common.inc
>>  create mode 100644 meta/recipes-devtools/go/go-native.inc
>>  create mode 100644 meta/recipes-devtools/go/go-native_1.4.bb
>>  create mode 100644 meta/recipes-devtools/go/go.inc
>>  create mode 100644 meta/recipes-devtools/go/go_1.6.bb
>>  create mode 100644 meta/recipes-devtools/go/go_1.7.bb
>>
>> diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
>> new file mode 100644
>> index 0000000..e10864d
>> --- /dev/null
>> +++ b/meta/classes/go.bbclass
>> @@ -0,0 +1,74 @@
>> +inherit goarch
>> +
>> +GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go"
>> +GOROOT = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
>> +GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin"
>> +GOBIN_FINAL = "${GOROOT_FINAL}/bin/${GOOS}_${GOARCH}"
>> +
>> +export GOOS = "${TARGET_GOOS}"
>> +export GOARCH = "${TARGET_GOARCH}"
>> +export GOARM = "${TARGET_GOARM}"
>> +export CGO_ENABLED = "1"
>> +export GOROOT
>> +export GOROOT_FINAL = "${libdir}/${TARGET_SYS}/go"
>> +export GOBIN_FINAL
>> +export GOPKG_FINAL = "${GOROOT_FINAL}/pkg/${GOOS}_${GOARCH}"
>> +export GOSRC_FINAL = "${GOROOT_FINAL}/src"
>> +export GO_GCFLAGS = "${TARGET_CFLAGS}"
>> +export GO_LDFLAGS = "${TARGET_LDFLAGS}"
>> +export CGO_CFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CFLAGS}"
>> +export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}"
>> +export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}"
>> +export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}"
>> +
>> +DEPENDS += "go-cross"
>> +DEPENDS_class-native += "go-native"
>> +
>> +INHIBIT_PACKAGE_STRIP = "1"
>> +
>> +FILES_${PN}-staticdev += "${GOSRC_FINAL}/${GO_IMPORT}"
>> +FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*"
>> +
>> +GO_INSTALL ?= "${GO_IMPORT}/..."
>> +
>> +do_go_compile() {
>> +       GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go env
>> +       if test -n "${GO_INSTALL}" ; then
>> +               GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go install -v ${GO_INSTALL}
>> +       fi
>> +}
>> +
>> +do_go_install() {
>> +       rm -rf ${WORKDIR}/staging
>> +       install -d ${WORKDIR}/staging${GOROOT_FINAL} ${D}${GOROOT_FINAL}
>> +       tar -C ${S} -cf - . | tar -C ${WORKDIR}/staging${GOROOT_FINAL} -xpvf -
>> +
>> +       find ${WORKDIR}/staging${GOROOT_FINAL} \( \
>> +               -name \*.indirectionsymlink -o \
>> +               -name .git\* -o                \
>> +               -name .hg -o                   \
>> +               -name .svn -o                  \
>> +               -name .pc\* -o                 \
>> +               -name patches\*                \
>> +               \) -print0 | \
>> +       xargs -r0 rm -rf
>> +
>> +       tar -C ${WORKDIR}/staging${GOROOT_FINAL} -cf - . | \
>> +       tar -C ${D}${GOROOT_FINAL} -xpvf -
>> +
>> +       chown -R root:root "${D}${GOROOT_FINAL}"
>> +
>> +       if test -e "${D}${GOBIN_FINAL}" ; then
>> +               install -d -m 0755 "${D}${bindir}"
>> +               find "${D}${GOBIN_FINAL}" ! -type d -print0 | xargs -r0 mv --target-directory="${D}${bindir}"
>> +               rmdir -p "${D}${GOBIN_FINAL}" || true
>> +       fi
>> +}
>> +
>> +do_compile() {
>> +       do_go_compile
>> +}
>> +
>> +do_install() {
>> +       do_go_install
>> +}
>> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
>> new file mode 100644
>> index 0000000..bb330b1
>> --- /dev/null
>> +++ b/meta/classes/goarch.bbclass
>> @@ -0,0 +1,40 @@
>> +BUILD_GOOS = "${@go_map_os(d.getVar('BUILD_OS', True), d)}"
>> +BUILD_GOARCH = "${@go_map_arch(d.getVar('BUILD_ARCH', True), d)}"
>> +BUILD_GOTUPLE = "${BUILD_GOOS}_${BUILD_GOARCH}"
>> +HOST_GOOS = "${@go_map_os(d.getVar('HOST_OS', True), d)}"
>> +HOST_GOARCH = "${@go_map_arch(d.getVar('HOST_ARCH', True), d)}"
>> +HOST_GOARM = "${@go_map_arm(d.getVar('HOST_ARCH', True), d.getVar('TUNE_FEATURES', True), d)}"
>> +HOST_GOTUPLE = "${HOST_GOOS}_${HOST_GOARCH}"
>> +TARGET_GOOS = "${@go_map_os(d.getVar('TARGET_OS', True), d)}"
>> +TARGET_GOARCH = "${@go_map_arch(d.getVar('TARGET_ARCH', True), d)}"
>> +TARGET_GOARM = "${@go_map_arm(d.getVar('TARGET_ARCH', True), d.getVar('TUNE_FEATURES', True), d)}"
>> +TARGET_GOTUPLE = "${TARGET_GOOS}_${TARGET_GOARCH}"
>> +GO_BUILD_BINDIR = "${@['bin/${HOST_GOTUPLE}','bin'][d.getVar('BUILD_GOTUPLE',True) == d.getVar('HOST_GOTUPLE',True)]}"
>> +
>> +def go_map_arch(a, d):
>> +    import re
>> +    if re.match('i.86', a):
>> +        return '386'
>> +    elif a == 'x86_64':
>> +        return 'amd64'
>> +    elif re.match('arm.*', a):
>> +        return 'arm'
>> +    elif re.match('aarch64.*', a):
>> +        return 'arm64'
>> +    elif re.match('p(pc|owerpc)(|64)', a):
>> +        return 'powerpc'
>> +    else:
>> +        bb.error("cannot map '%s' to a Go architecture" % a)
>> +
>> +def go_map_arm(a, f, d):
>> +    import re
>> +    if re.match('arm.*', a) and re.match('arm.*7.*', f):
>> +        return '7'
>> +    return ''
>> +
>> +def go_map_os(o, d):
>> +    if o.startswith('linux'):
>> +        return 'linux'
>> +    return o
>> +
>> +
>> diff --git a/meta/recipes-devtools/go/go-1.4.inc b/meta/recipes-devtools/go/go-1.4.inc
>> new file mode 100644
>> index 0000000..a65459f
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.4.inc
>> @@ -0,0 +1,15 @@
>> +require go-common.inc
>> +
>> +PV = "1.4.3"
>> +GO_BASEVERSION = "1.4"
>> +FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
>> +
>> +SRC_URI += "\
>> +        file://016-armhf-elf-header.patch \
>> +        file://go-cross-backport-cmd-link-support-new-386-amd64-rel.patch \
>> +        file://syslog.patch \
>> +"
>> +
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
>> +SRC_URI[md5sum] = "dfb604511115dd402a77a553a5923a04"
>> +SRC_URI[sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
>> diff --git a/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch b/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
>> new file mode 100644
>> index 0000000..e6e414e
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
>> @@ -0,0 +1,24 @@
>> +Description: Use correct ELF header for armhf binaries.
>> +Author: Adam Conrad <adconrad@ubuntu.com>
>> +Last-Update: 2013-07-08
>> +
>> +Upstream-Status: Pending
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +
>> +Index: go/src/cmd/ld/elf.c
>> +===================================================================
>> +--- go.orig/src/cmd/ld/elf.c   2015-02-20 10:49:58.763451586 -0800
>> ++++ go/src/cmd/ld/elf.c        2015-02-20 10:49:27.895478521 -0800
>> +@@ -57,7 +57,11 @@
>> +       case '5':
>> +               // we use EABI on both linux/arm and freebsd/arm.
>> +               if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd)
>> +-                      hdr.flags = 0x5000002; // has entry point, Version5 EABI
>> ++#ifdef __ARM_PCS_VFP
>> ++                      hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI
>> ++#else
>> ++                      hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI
>> ++#endif
>> +               // fallthrough
>> +       default:
>> +               hdr.phoff = ELF32HDRSIZE;       /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */
>> diff --git a/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch b/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch
>> new file mode 100644
>> index 0000000..95ca9d3
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch
>> @@ -0,0 +1,225 @@
>> +From d6eefad445831c161fca130f9bdf7b3848aac23c Mon Sep 17 00:00:00 2001
>> +From: Paul Gortmaker <paul.gortmaker@windriver.com>
>> +Date: Tue, 29 Mar 2016 21:14:33 -0400
>> +Subject: [PATCH] go-cross: backport "cmd/link: support new 386/amd64
>> + relocations"
>> +
>> +Newer binutils won't support building older go-1.4.3 as per:
>> +
>> +https://github.com/golang/go/issues/13114
>> +
>> +Upstream commit 914db9f060b1fd3eb1f74d48f3bd46a73d4ae9c7 (see subj)
>> +was identified as the fix and nominated for 1.4.4 but that release
>> +never happened.  The paths in 1.4.3 aren't the same as go1.6beta1~662
>> +where this commit appeared, but the NetBSD folks indicated what a
>> +1.4.3 backport would look like here: https://gnats.netbsd.org/50777
>> +
>> +This is based on that, but without the BSD wrapper infrastructure
>> +layer that makes things look like patches of patches.
>> +
>> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
>> +
>> +Upstream-Status: Backport [ Partial ]
>> +
>> +diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c
>> +index 18b5aa311981..2e9d339aef87 100644
>> +--- a/src/cmd/6l/asm.c
>> ++++ b/src/cmd/6l/asm.c
>> +@@ -118,6 +118,8 @@ adddynrel(LSym *s, Reloc *r)
>> +               return;
>> +
>> +       case 256 + R_X86_64_GOTPCREL:
>> ++      case 256 + R_X86_64_GOTPCRELX:
>> ++      case 256 + R_X86_64_REX_GOTPCRELX:
>> +               if(targ->type != SDYNIMPORT) {
>> +                       // have symbol
>> +                       if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
>> +diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c
>> +index 98c04240374f..cff29488e8af 100644
>> +--- a/src/cmd/8l/asm.c
>> ++++ b/src/cmd/8l/asm.c
>> +@@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r)
>> +               return;
>> +
>> +       case 256 + R_386_GOT32:
>> ++      case 256 + R_386_GOT32X:
>> +               if(targ->type != SDYNIMPORT) {
>> +                       // have symbol
>> +                       if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
>> +diff --git a/src/cmd/ld/elf.h b/src/cmd/ld/elf.h
>> +index e84d996f2596..bbf2cfaa3cc0 100644
>> +--- a/src/cmd/ld/elf.h
>> ++++ b/src/cmd/ld/elf.h
>> +@@ -478,32 +478,47 @@ typedef struct {
>> +  * Relocation types.
>> +  */
>> +
>> +-#define       R_X86_64_NONE   0       /* No relocation. */
>> +-#define       R_X86_64_64     1       /* Add 64 bit symbol value. */
>> +-#define       R_X86_64_PC32   2       /* PC-relative 32 bit signed sym value. */
>> +-#define       R_X86_64_GOT32  3       /* PC-relative 32 bit GOT offset. */
>> +-#define       R_X86_64_PLT32  4       /* PC-relative 32 bit PLT offset. */
>> +-#define       R_X86_64_COPY   5       /* Copy data from shared object. */
>> +-#define       R_X86_64_GLOB_DAT 6     /* Set GOT entry to data address. */
>> +-#define       R_X86_64_JMP_SLOT 7     /* Set GOT entry to code address. */
>> +-#define       R_X86_64_RELATIVE 8     /* Add load address of shared object. */
>> +-#define       R_X86_64_GOTPCREL 9     /* Add 32 bit signed pcrel offset to GOT. */
>> +-#define       R_X86_64_32     10      /* Add 32 bit zero extended symbol value */
>> +-#define       R_X86_64_32S    11      /* Add 32 bit sign extended symbol value */
>> +-#define       R_X86_64_16     12      /* Add 16 bit zero extended symbol value */
>> +-#define       R_X86_64_PC16   13      /* Add 16 bit signed extended pc relative symbol value */
>> +-#define       R_X86_64_8      14      /* Add 8 bit zero extended symbol value */
>> +-#define       R_X86_64_PC8    15      /* Add 8 bit signed extended pc relative symbol value */
>> +-#define       R_X86_64_DTPMOD64 16    /* ID of module containing symbol */
>> +-#define       R_X86_64_DTPOFF64 17    /* Offset in TLS block */
>> +-#define       R_X86_64_TPOFF64 18     /* Offset in static TLS block */
>> +-#define       R_X86_64_TLSGD  19      /* PC relative offset to GD GOT entry */
>> +-#define       R_X86_64_TLSLD  20      /* PC relative offset to LD GOT entry */
>> +-#define       R_X86_64_DTPOFF32 21    /* Offset in TLS block */
>> +-#define       R_X86_64_GOTTPOFF 22    /* PC relative offset to IE GOT entry */
>> +-#define       R_X86_64_TPOFF32 23     /* Offset in static TLS block */
>> +-
>> +-#define       R_X86_64_COUNT  24      /* Count of defined relocation types. */
>> ++#define       R_X86_64_NONE           0
>> ++#define       R_X86_64_64             1
>> ++#define       R_X86_64_PC32           2
>> ++#define       R_X86_64_GOT32          3
>> ++#define       R_X86_64_PLT32          4
>> ++#define       R_X86_64_COPY           5
>> ++#define       R_X86_64_GLOB_DAT       6
>> ++#define       R_X86_64_JMP_SLOT       7
>> ++#define       R_X86_64_RELATIVE       8
>> ++#define       R_X86_64_GOTPCREL       9
>> ++#define       R_X86_64_32             10
>> ++#define       R_X86_64_32S            11
>> ++#define       R_X86_64_16             12
>> ++#define       R_X86_64_PC16           13
>> ++#define       R_X86_64_8              14
>> ++#define       R_X86_64_PC8            15
>> ++#define       R_X86_64_DTPMOD64       16
>> ++#define       R_X86_64_DTPOFF64       17
>> ++#define       R_X86_64_TPOFF64        18
>> ++#define       R_X86_64_TLSGD          19
>> ++#define       R_X86_64_TLSLD          20
>> ++#define       R_X86_64_DTPOFF32       21
>> ++#define       R_X86_64_GOTTPOFF       22
>> ++#define       R_X86_64_TPOFF32        23
>> ++#define       R_X86_64_PC64           24
>> ++#define       R_X86_64_GOTOFF64       25
>> ++#define       R_X86_64_GOTPC32        26
>> ++#define       R_X86_64_GOT64          27
>> ++#define       R_X86_64_GOTPCREL64     28
>> ++#define       R_X86_64_GOTPC64        29
>> ++#define       R_X86_64_GOTPLT64       30
>> ++#define       R_X86_64_PLTOFF64       31
>> ++#define       R_X86_64_SIZE32         32
>> ++#define       R_X86_64_SIZE64         33
>> ++#define       R_X86_64_GOTPC32_TLSDEC 34
>> ++#define       R_X86_64_TLSDESC_CALL   35
>> ++#define       R_X86_64_TLSDESC        36
>> ++#define       R_X86_64_IRELATIVE      37
>> ++#define       R_X86_64_PC32_BND       40
>> ++#define       R_X86_64_GOTPCRELX      41
>> ++#define       R_X86_64_REX_GOTPCRELX  42
>> +
>> +
>> + #define       R_ALPHA_NONE            0       /* No reloc */
>> +@@ -581,39 +596,42 @@ typedef struct {
>> + #define       R_ARM_COUNT             38      /* Count of defined relocation types. */
>> +
>> +
>> +-#define       R_386_NONE      0       /* No relocation. */
>> +-#define       R_386_32        1       /* Add symbol value. */
>> +-#define       R_386_PC32      2       /* Add PC-relative symbol value. */
>> +-#define       R_386_GOT32     3       /* Add PC-relative GOT offset. */
>> +-#define       R_386_PLT32     4       /* Add PC-relative PLT offset. */
>> +-#define       R_386_COPY      5       /* Copy data from shared object. */
>> +-#define       R_386_GLOB_DAT  6       /* Set GOT entry to data address. */
>> +-#define       R_386_JMP_SLOT  7       /* Set GOT entry to code address. */
>> +-#define       R_386_RELATIVE  8       /* Add load address of shared object. */
>> +-#define       R_386_GOTOFF    9       /* Add GOT-relative symbol address. */
>> +-#define       R_386_GOTPC     10      /* Add PC-relative GOT table address. */
>> +-#define       R_386_TLS_TPOFF 14      /* Negative offset in static TLS block */
>> +-#define       R_386_TLS_IE    15      /* Absolute address of GOT for -ve static TLS */
>> +-#define       R_386_TLS_GOTIE 16      /* GOT entry for negative static TLS block */
>> +-#define       R_386_TLS_LE    17      /* Negative offset relative to static TLS */
>> +-#define       R_386_TLS_GD    18      /* 32 bit offset to GOT (index,off) pair */
>> +-#define       R_386_TLS_LDM   19      /* 32 bit offset to GOT (index,zero) pair */
>> +-#define       R_386_TLS_GD_32 24      /* 32 bit offset to GOT (index,off) pair */
>> +-#define       R_386_TLS_GD_PUSH 25    /* pushl instruction for Sun ABI GD sequence */
>> +-#define       R_386_TLS_GD_CALL 26    /* call instruction for Sun ABI GD sequence */
>> +-#define       R_386_TLS_GD_POP 27     /* popl instruction for Sun ABI GD sequence */
>> +-#define       R_386_TLS_LDM_32 28     /* 32 bit offset to GOT (index,zero) pair */
>> +-#define       R_386_TLS_LDM_PUSH 29   /* pushl instruction for Sun ABI LD sequence */
>> +-#define       R_386_TLS_LDM_CALL 30   /* call instruction for Sun ABI LD sequence */
>> +-#define       R_386_TLS_LDM_POP 31    /* popl instruction for Sun ABI LD sequence */
>> +-#define       R_386_TLS_LDO_32 32     /* 32 bit offset from start of TLS block */
>> +-#define       R_386_TLS_IE_32 33      /* 32 bit offset to GOT static TLS offset entry */
>> +-#define       R_386_TLS_LE_32 34      /* 32 bit offset within static TLS block */
>> +-#define       R_386_TLS_DTPMOD32 35   /* GOT entry containing TLS index */
>> +-#define       R_386_TLS_DTPOFF32 36   /* GOT entry containing TLS offset */
>> +-#define       R_386_TLS_TPOFF32 37    /* GOT entry of -ve static TLS offset */
>> +-
>> +-#define       R_386_COUNT     38      /* Count of defined relocation types. */
>> ++#define       R_386_NONE          0
>> ++#define       R_386_32            1
>> ++#define       R_386_PC32          2
>> ++#define       R_386_GOT32         3
>> ++#define       R_386_PLT32         4
>> ++#define       R_386_COPY          5
>> ++#define       R_386_GLOB_DAT      6
>> ++#define       R_386_JMP_SLOT      7
>> ++#define       R_386_RELATIVE      8
>> ++#define       R_386_GOTOFF        9
>> ++#define       R_386_GOTPC         10
>> ++#define       R_386_TLS_TPOFF     14
>> ++#define       R_386_TLS_IE        15
>> ++#define       R_386_TLS_GOTIE     16
>> ++#define       R_386_TLS_LE        17
>> ++#define       R_386_TLS_GD        18
>> ++#define       R_386_TLS_LDM       19
>> ++#define       R_386_TLS_GD_32     24
>> ++#define       R_386_TLS_GD_PUSH   25
>> ++#define       R_386_TLS_GD_CALL   26
>> ++#define       R_386_TLS_GD_POP    27
>> ++#define       R_386_TLS_LDM_32    28
>> ++#define       R_386_TLS_LDM_PUSH  29
>> ++#define       R_386_TLS_LDM_CALL  30
>> ++#define       R_386_TLS_LDM_POP   31
>> ++#define       R_386_TLS_LDO_32    32
>> ++#define       R_386_TLS_IE_32     33
>> ++#define       R_386_TLS_LE_32     34
>> ++#define       R_386_TLS_DTPMOD32  35
>> ++#define       R_386_TLS_DTPOFF32  36
>> ++#define       R_386_TLS_TPOFF32   37
>> ++#define       R_386_TLS_GOTDESC   39
>> ++#define       R_386_TLS_DESC_CALL 40
>> ++#define       R_386_TLS_DESC      41
>> ++#define       R_386_IRELATIVE     42
>> ++#define       R_386_GOT32X        43
>> +
>> + #define       R_PPC_NONE              0       /* No relocation. */
>> + #define       R_PPC_ADDR32            1
>> +diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c
>> +index dd5fa0d2a839..2e2fbd17377f 100644
>> +--- a/src/cmd/ld/ldelf.c
>> ++++ b/src/cmd/ld/ldelf.c
>> +@@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *siz)
>> +       case R('6', R_X86_64_PC32):
>> +       case R('6', R_X86_64_PLT32):
>> +       case R('6', R_X86_64_GOTPCREL):
>> ++      case R('6', R_X86_64_GOTPCRELX):
>> ++      case R('6', R_X86_64_REX_GOTPCRELX):
>> +       case R('8', R_386_32):
>> +       case R('8', R_386_PC32):
>> +       case R('8', R_386_GOT32):
>> +       case R('8', R_386_PLT32):
>> +       case R('8', R_386_GOTOFF):
>> +       case R('8', R_386_GOTPC):
>> ++      case R('8', R_386_GOT32X):
>> +               *siz = 4;
>> +               break;
>> +       case R('6', R_X86_64_64):
>> +--
>> +2.7.2
>> +
>> diff --git a/meta/recipes-devtools/go/go-1.4/syslog.patch b/meta/recipes-devtools/go/go-1.4/syslog.patch
>> new file mode 100644
>> index 0000000..29be06f
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.4/syslog.patch
>> @@ -0,0 +1,62 @@
>> +Add timeouts to logger
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +
>> +diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
>> +--- go/src/log/syslog/syslog.go        2013-11-28 13:38:28.000000000 -0800
>> ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go    2014-10-03 11:44:37.710403200 -0700
>> +@@ -33,6 +33,9 @@
>> + const severityMask = 0x07
>> + const facilityMask = 0xf8
>> +
>> ++var writeTimeout = 1 * time.Second
>> ++var connectTimeout = 1 * time.Second
>> ++
>> + const (
>> +       // Severity.
>> +
>> +@@ -100,6 +103,7 @@
>> + type serverConn interface {
>> +       writeString(p Priority, hostname, tag, s, nl string) error
>> +       close() error
>> ++      setWriteDeadline(t time.Time) error
>> + }
>> +
>> + type netConn struct {
>> +@@ -273,7 +277,11 @@
>> +               nl = "\n"
>> +       }
>> +
>> +-      err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
>> ++      err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
>> ++      if err != nil {
>> ++              return 0, err
>> ++      }
>> ++      err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
>> +       if err != nil {
>> +               return 0, err
>> +       }
>> +@@ -305,6 +313,10 @@
>> +       return n.conn.Close()
>> + }
>> +
>> ++func (n *netConn) setWriteDeadline(t time.Time) error {
>> ++      return n.conn.SetWriteDeadline(t)
>> ++}
>> ++
>> + // NewLogger creates a log.Logger whose output is written to
>> + // the system log service with the specified priority. The logFlag
>> + // argument is the flag set passed through to log.New to create
>> +diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
>> +--- go/src/log/syslog/syslog_unix.go   2013-11-28 13:38:28.000000000 -0800
>> ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go       2014-10-03 11:44:39.010403175 -0700
>> +@@ -19,7 +19,7 @@
>> +       logPaths := []string{"/dev/log", "/var/run/syslog"}
>> +       for _, network := range logTypes {
>> +               for _, path := range logPaths {
>> +-                      conn, err := net.Dial(network, path)
>> ++                      conn, err := net.DialTimeout(network, path, connectTimeout)
>> +                       if err != nil {
>> +                               continue
>> +                       } else {
>> diff --git a/meta/recipes-devtools/go/go-1.6.inc b/meta/recipes-devtools/go/go-1.6.inc
>> new file mode 100644
>> index 0000000..769c1d8
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.6.inc
>> @@ -0,0 +1,19 @@
>> +require go-common.inc
>> +
>> +PV = "1.6.3"
>> +GO_BASEVERSION = "1.6"
>> +FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
>> +
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81"
>> +
>> +SRC_URI += "\
>> +       file://armhf-elf-header.patch \
>> +       file://syslog.patch \
>> +       file://fix-target-cc-for-build.patch \
>> +       file://fix-cc-handling.patch \
>> +       file://split-host-and-target-build.patch \
>> +       file://gotooldir.patch \
>> +"
>> +SRC_URI[md5sum] = "bf3fce6ccaadd310159c9e874220e2a2"
>> +SRC_URI[sha256sum] = "6326aeed5f86cf18f16d6dc831405614f855e2d416a91fd3fdc334f772345b00"
>> +
>> diff --git a/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch b/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch
>> new file mode 100644
>> index 0000000..1e3a16b
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.6/armhf-elf-header.patch
>> @@ -0,0 +1,23 @@
>> +Encode arm EABI ( hard/soft ) calling convention in ELF header
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/cmd/link/internal/ld/elf.go
>> +===================================================================
>> +--- go.orig/src/cmd/link/internal/ld/elf.go
>> ++++ go/src/cmd/link/internal/ld/elf.go
>> +@@ -827,7 +827,13 @@
>> +       // 32-bit architectures
>> +       case '5':
>> +               // we use EABI on both linux/arm and freebsd/arm.
>> +-              if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
>> ++              if HEADTYPE == obj.Hlinux {
>> ++                      if Ctxt.Goarm == 7 {
>> ++                              ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
>> ++                      } else {
>> ++                              ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
>> ++                      }
>> ++              } else if HEADTYPE == obj.Hfreebsd {
>> +                       // We set a value here that makes no indication of which
>> +                       // float ABI the object uses, because this is information
>> +                       // used by the dynamic linker to compare executables and
>> diff --git a/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch b/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch
>> new file mode 100644
>> index 0000000..983323a
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.6/fix-cc-handling.patch
>> @@ -0,0 +1,50 @@
>> +Accept CC with multiple words in its name
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/cmd/go/build.go
>> +===================================================================
>> +--- go.orig/src/cmd/go/build.go        2015-07-29 14:48:40.323185807 -0700
>> ++++ go/src/cmd/go/build.go     2015-07-30 07:37:40.529818586 -0700
>> +@@ -2805,12 +2805,24 @@
>> +       return b.ccompilerCmd("CC", defaultCC, objdir)
>> + }
>> +
>> ++// gccCmd returns a gcc command line prefix
>> ++// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
>> ++func (b *builder) gccCmdForReal() []string {
>> ++      return envList("CC", defaultCC)
>> ++}
>> ++
>> + // gxxCmd returns a g++ command line prefix
>> + // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
>> + func (b *builder) gxxCmd(objdir string) []string {
>> +       return b.ccompilerCmd("CXX", defaultCXX, objdir)
>> + }
>> +
>> ++// gxxCmd returns a g++ command line prefix
>> ++// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
>> ++func (b *builder) gxxCmdForReal() []string {
>> ++      return envList("CXX", defaultCXX)
>> ++}
>> ++
>> + // ccompilerCmd returns a command line prefix for the given environment
>> + // variable and using the default command when the variable is empty.
>> + func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string {
>> +Index: go/src/cmd/go/env.go
>> +===================================================================
>> +--- go.orig/src/cmd/go/env.go  2015-07-29 14:48:40.323185807 -0700
>> ++++ go/src/cmd/go/env.go       2015-07-30 07:40:54.461655721 -0700
>> +@@ -52,10 +52,9 @@
>> +
>> +       if goos != "plan9" {
>> +               cmd := b.gccCmd(".")
>> +-              env = append(env, envVar{"CC", cmd[0]})
>> ++              env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
>> +               env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
>> +-              cmd = b.gxxCmd(".")
>> +-              env = append(env, envVar{"CXX", cmd[0]})
>> ++              env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
>> +       }
>> +
>> +       if buildContext.CgoEnabled {
>> diff --git a/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch b/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch
>> new file mode 100644
>> index 0000000..2f6156e
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.6/fix-target-cc-for-build.patch
>> @@ -0,0 +1,17 @@
>> +Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/make.bash
>> +===================================================================
>> +--- go.orig/src/make.bash      2015-07-29 13:28:11.334031696 -0700
>> ++++ go/src/make.bash   2015-07-29 13:36:55.814465630 -0700
>> +@@ -158,7 +158,7 @@
>> + fi
>> +
>> + echo "##### Building packages and commands for $GOOS/$GOARCH."
>> +-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
>> ++CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
>> + echo
>> +
>> + rm -f "$GOTOOLDIR"/go_bootstrap
>> diff --git a/meta/recipes-devtools/go/go-1.6/gotooldir.patch b/meta/recipes-devtools/go/go-1.6/gotooldir.patch
>> new file mode 100644
>> index 0000000..9467025
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.6/gotooldir.patch
>> @@ -0,0 +1,30 @@
>> +Define tooldir in relation to GOTOOLDIR env var
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/go/build/build.go
>> +===================================================================
>> +--- go.orig/src/go/build/build.go
>> ++++ go/src/go/build/build.go
>> +@@ -1388,7 +1388,7 @@ func init() {
>> + }
>> +
>> + // ToolDir is the directory containing build tools.
>> +-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
>> ++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
>> +
>> + // IsLocalImport reports whether the import path is
>> + // a local import path, like ".", "..", "./foo", or "../foo".
>> +Index: go/src/cmd/go/build.go
>> +===================================================================
>> +--- go.orig/src/cmd/go/build.go
>> ++++ go/src/cmd/go/build.go
>> +@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
>> +               }
>> +
>> +               cgoExe := tool("cgo")
>> +-              if a.cgo != nil && a.cgo.target != "" {
>> ++              if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
>> +                       cgoExe = a.cgo.target
>> +               }
>> +               outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
>> diff --git a/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch b/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch
>> new file mode 100644
>> index 0000000..afbae02
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.6/split-host-and-target-build.patch
>> @@ -0,0 +1,63 @@
>> +Add new option --target-only to build target components
>> +Separates the host and target pieces of build
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/make.bash
>> +===================================================================
>> +--- go.orig/src/make.bash
>> ++++ go/src/make.bash
>> +@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then
>> +       buildall=""
>> +       shift
>> + fi
>> +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
>> +-# Delay move of dist tool to now, because bootstrap may clear tool directory.
>> +-mv cmd/dist/dist "$GOTOOLDIR"/dist
>> +-echo
>> +
>> +-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
>> ++do_host_build="yes"
>> ++do_target_build="yes"
>> ++if [ "$1" = "--target-only" ]; then
>> ++      do_host_build="no"
>> ++      shift
>> ++elif [ "$1" = "--host-only" ]; then
>> ++      do_target_build="no"
>> ++      shift
>> ++fi
>> ++
>> ++if [ "$do_host_build" = "yes" ]; then
>> ++      ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
>> ++      # Delay move of dist tool to now, because bootstrap may clear tool directory.
>> ++      mv cmd/dist/dist "$GOTOOLDIR"/dist
>> ++      echo
>> ++
>> +       echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
>> +       # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
>> +       # use the host compiler, CC, from `cmd/dist/dist env` instead.
>> +@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
>> +       echo
>> + fi
>> +
>> +-echo "##### Building packages and commands for $GOOS/$GOARCH."
>> +-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
>> +-echo
>> ++if [ "$do_target_build" = "yes" ]; then
>> ++    GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
>> ++    echo "##### Building packages and commands for $GOOS/$GOARCH."
>> ++    if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
>> ++      rm -rf ./host-tools
>> ++      mkdir ./host-tools
>> ++      mv "$GOTOOLDIR"/* ./host-tools
>> ++      GOTOOLDIR="$PWD/host-tools"
>> ++    fi
>> ++    GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
>> ++    echo
>> +
>> +-rm -f "$GOTOOLDIR"/go_bootstrap
>> ++    rm -f "$GOTOOLDIR"/go_bootstrap
>> ++fi
>> +
>> + if [ "$1" != "--no-banner" ]; then
>> +       "$GOTOOLDIR"/dist banner
>> diff --git a/meta/recipes-devtools/go/go-1.6/syslog.patch b/meta/recipes-devtools/go/go-1.6/syslog.patch
>> new file mode 100644
>> index 0000000..29be06f
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.6/syslog.patch
>> @@ -0,0 +1,62 @@
>> +Add timeouts to logger
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +
>> +diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
>> +--- go/src/log/syslog/syslog.go        2013-11-28 13:38:28.000000000 -0800
>> ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go    2014-10-03 11:44:37.710403200 -0700
>> +@@ -33,6 +33,9 @@
>> + const severityMask = 0x07
>> + const facilityMask = 0xf8
>> +
>> ++var writeTimeout = 1 * time.Second
>> ++var connectTimeout = 1 * time.Second
>> ++
>> + const (
>> +       // Severity.
>> +
>> +@@ -100,6 +103,7 @@
>> + type serverConn interface {
>> +       writeString(p Priority, hostname, tag, s, nl string) error
>> +       close() error
>> ++      setWriteDeadline(t time.Time) error
>> + }
>> +
>> + type netConn struct {
>> +@@ -273,7 +277,11 @@
>> +               nl = "\n"
>> +       }
>> +
>> +-      err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
>> ++      err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
>> ++      if err != nil {
>> ++              return 0, err
>> ++      }
>> ++      err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
>> +       if err != nil {
>> +               return 0, err
>> +       }
>> +@@ -305,6 +313,10 @@
>> +       return n.conn.Close()
>> + }
>> +
>> ++func (n *netConn) setWriteDeadline(t time.Time) error {
>> ++      return n.conn.SetWriteDeadline(t)
>> ++}
>> ++
>> + // NewLogger creates a log.Logger whose output is written to
>> + // the system log service with the specified priority. The logFlag
>> + // argument is the flag set passed through to log.New to create
>> +diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
>> +--- go/src/log/syslog/syslog_unix.go   2013-11-28 13:38:28.000000000 -0800
>> ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go       2014-10-03 11:44:39.010403175 -0700
>> +@@ -19,7 +19,7 @@
>> +       logPaths := []string{"/dev/log", "/var/run/syslog"}
>> +       for _, network := range logTypes {
>> +               for _, path := range logPaths {
>> +-                      conn, err := net.Dial(network, path)
>> ++                      conn, err := net.DialTimeout(network, path, connectTimeout)
>> +                       if err != nil {
>> +                               continue
>> +                       } else {
>> diff --git a/meta/recipes-devtools/go/go-1.7.inc b/meta/recipes-devtools/go/go-1.7.inc
>> new file mode 100644
>> index 0000000..1f73715
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.7.inc
>> @@ -0,0 +1,18 @@
>> +require go-common.inc
>> +
>> +PV = "1.7.3"
>> +GO_BASEVERSION = "1.7"
>> +FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
>> +
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
>> +
>> +SRC_URI += "\
>> +       file://armhf-elf-header.patch \
>> +       file://syslog.patch \
>> +       file://fix-target-cc-for-build.patch \
>> +       file://fix-cc-handling.patch \
>> +       file://split-host-and-target-build.patch \
>> +       file://gotooldir.patch \
>> +"
>> +SRC_URI[md5sum] = "83d1b7bd4281479ab7d153e5152c9fc9"
>> +SRC_URI[sha256sum] = "79430a0027a09b0b3ad57e214c4c1acfdd7af290961dd08d322818895af1ef44"
>> diff --git a/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch b/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch
>> new file mode 100644
>> index 0000000..1e3a16b
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.7/armhf-elf-header.patch
>> @@ -0,0 +1,23 @@
>> +Encode arm EABI ( hard/soft ) calling convention in ELF header
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/cmd/link/internal/ld/elf.go
>> +===================================================================
>> +--- go.orig/src/cmd/link/internal/ld/elf.go
>> ++++ go/src/cmd/link/internal/ld/elf.go
>> +@@ -827,7 +827,13 @@
>> +       // 32-bit architectures
>> +       case '5':
>> +               // we use EABI on both linux/arm and freebsd/arm.
>> +-              if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd {
>> ++              if HEADTYPE == obj.Hlinux {
>> ++                      if Ctxt.Goarm == 7 {
>> ++                              ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float
>> ++                      } else {
>> ++                              ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float
>> ++                      }
>> ++              } else if HEADTYPE == obj.Hfreebsd {
>> +                       // We set a value here that makes no indication of which
>> +                       // float ABI the object uses, because this is information
>> +                       // used by the dynamic linker to compare executables and
>> diff --git a/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch b/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch
>> new file mode 100644
>> index 0000000..a67caf4
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.7/fix-cc-handling.patch
>> @@ -0,0 +1,50 @@
>> +Accept CC with multiple words in its name
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/cmd/go/build.go
>> +===================================================================
>> +--- go.orig/src/cmd/go/build.go
>> ++++ go/src/cmd/go/build.go
>> +@@ -2991,12 +2991,24 @@ func (b *builder) gccCmd(objdir string)
>> +       return b.ccompilerCmd("CC", defaultCC, objdir)
>> + }
>> +
>> ++// gccCmd returns a gcc command line prefix
>> ++// defaultCC is defined in zdefaultcc.go, written by cmd/dist.
>> ++func (b *builder) gccCmdForReal() []string {
>> ++      return envList("CC", defaultCC)
>> ++}
>> ++
>> + // gxxCmd returns a g++ command line prefix
>> + // defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
>> + func (b *builder) gxxCmd(objdir string) []string {
>> +       return b.ccompilerCmd("CXX", defaultCXX, objdir)
>> + }
>> +
>> ++// gxxCmd returns a g++ command line prefix
>> ++// defaultCXX is defined in zdefaultcc.go, written by cmd/dist.
>> ++func (b *builder) gxxCmdForReal() []string {
>> ++      return envList("CXX", defaultCXX)
>> ++}
>> ++
>> + // gfortranCmd returns a gfortran command line prefix.
>> + func (b *builder) gfortranCmd(objdir string) []string {
>> +       return b.ccompilerCmd("FC", "gfortran", objdir)
>> +Index: go/src/cmd/go/env.go
>> +===================================================================
>> +--- go.orig/src/cmd/go/env.go
>> ++++ go/src/cmd/go/env.go
>> +@@ -51,10 +51,9 @@ func mkEnv() []envVar {
>> +
>> +       if goos != "plan9" {
>> +               cmd := b.gccCmd(".")
>> +-              env = append(env, envVar{"CC", cmd[0]})
>> ++              env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")})
>> +               env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
>> +-              cmd = b.gxxCmd(".")
>> +-              env = append(env, envVar{"CXX", cmd[0]})
>> ++              env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")})
>> +       }
>> +
>> +       if buildContext.CgoEnabled {
>> diff --git a/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch b/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch
>> new file mode 100644
>> index 0000000..2f6156e
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.7/fix-target-cc-for-build.patch
>> @@ -0,0 +1,17 @@
>> +Put Quotes around CC_FOR_TARGET since it can be mutliple words e.g. in OE
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/make.bash
>> +===================================================================
>> +--- go.orig/src/make.bash      2015-07-29 13:28:11.334031696 -0700
>> ++++ go/src/make.bash   2015-07-29 13:36:55.814465630 -0700
>> +@@ -158,7 +158,7 @@
>> + fi
>> +
>> + echo "##### Building packages and commands for $GOOS/$GOARCH."
>> +-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
>> ++CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
>> + echo
>> +
>> + rm -f "$GOTOOLDIR"/go_bootstrap
>> diff --git a/meta/recipes-devtools/go/go-1.7/gotooldir.patch b/meta/recipes-devtools/go/go-1.7/gotooldir.patch
>> new file mode 100644
>> index 0000000..9467025
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.7/gotooldir.patch
>> @@ -0,0 +1,30 @@
>> +Define tooldir in relation to GOTOOLDIR env var
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/go/build/build.go
>> +===================================================================
>> +--- go.orig/src/go/build/build.go
>> ++++ go/src/go/build/build.go
>> +@@ -1388,7 +1388,7 @@ func init() {
>> + }
>> +
>> + // ToolDir is the directory containing build tools.
>> +-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
>> ++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
>> +
>> + // IsLocalImport reports whether the import path is
>> + // a local import path, like ".", "..", "./foo", or "../foo".
>> +Index: go/src/cmd/go/build.go
>> +===================================================================
>> +--- go.orig/src/cmd/go/build.go
>> ++++ go/src/cmd/go/build.go
>> +@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
>> +               }
>> +
>> +               cgoExe := tool("cgo")
>> +-              if a.cgo != nil && a.cgo.target != "" {
>> ++              if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
>> +                       cgoExe = a.cgo.target
>> +               }
>> +               outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)
>> diff --git a/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch b/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch
>> new file mode 100644
>> index 0000000..b0dd95b
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.7/split-host-and-target-build.patch
>> @@ -0,0 +1,62 @@
>> +Add new option --target-only to build target components
>> +Separates the host and target pieces of build
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +Index: go/src/make.bash
>> +===================================================================
>> +--- go.orig/src/make.bash
>> ++++ go/src/make.bash
>> +@@ -154,13 +154,22 @@ if [ "$1" = "--no-clean" ]; then
>> +       buildall=""
>> +       shift
>> + fi
>> +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
>> ++do_host_build="yes"
>> ++do_target_build="yes"
>> ++if [ "$1" = "--target-only" ]; then
>> ++      do_host_build="no"
>> ++      shift
>> ++elif [ "$1" = "--host-only" ]; then
>> ++      do_target_build="no"
>> ++      shift
>> ++fi
>> +
>> +-# Delay move of dist tool to now, because bootstrap may clear tool directory.
>> +-mv cmd/dist/dist "$GOTOOLDIR"/dist
>> +-echo
>> ++if [ "$do_host_build" = "yes" ]; then
>> ++      ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
>> ++      # Delay move of dist tool to now, because bootstrap may clear tool directory.
>> ++      mv cmd/dist/dist "$GOTOOLDIR"/dist
>> ++      echo
>> +
>> +-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
>> +       echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
>> +       # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
>> +       # use the host compiler, CC, from `cmd/dist/dist env` instead.
>> +@@ -169,11 +178,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
>> +       echo
>> + fi
>> +
>> +-echo "##### Building packages and commands for $GOOS/$GOARCH."
>> +-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
>> +-echo
>> ++if [ "$do_target_build" = "yes" ]; then
>> ++    GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}"
>> ++    echo "##### Building packages and commands for $GOOS/$GOARCH."
>> ++    if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then
>> ++      rm -rf ./host-tools
>> ++      mkdir ./host-tools
>> ++      mv "$GOTOOLDIR"/* ./host-tools
>> ++      GOTOOLDIR="$PWD/host-tools"
>> ++    fi
>> ++    GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL}
>> ++    echo
>> +
>> +-rm -f "$GOTOOLDIR"/go_bootstrap
>> ++    rm -f "$GOTOOLDIR"/go_bootstrap
>> ++fi
>> +
>> + if [ "$1" != "--no-banner" ]; then
>> +       "$GOTOOLDIR"/dist banner
>> diff --git a/meta/recipes-devtools/go/go-1.7/syslog.patch b/meta/recipes-devtools/go/go-1.7/syslog.patch
>> new file mode 100644
>> index 0000000..29be06f
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-1.7/syslog.patch
>> @@ -0,0 +1,62 @@
>> +Add timeouts to logger
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +Upstream-Status: Pending
>> +
>> +diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go
>> +--- go/src/log/syslog/syslog.go        2013-11-28 13:38:28.000000000 -0800
>> ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go    2014-10-03 11:44:37.710403200 -0700
>> +@@ -33,6 +33,9 @@
>> + const severityMask = 0x07
>> + const facilityMask = 0xf8
>> +
>> ++var writeTimeout = 1 * time.Second
>> ++var connectTimeout = 1 * time.Second
>> ++
>> + const (
>> +       // Severity.
>> +
>> +@@ -100,6 +103,7 @@
>> + type serverConn interface {
>> +       writeString(p Priority, hostname, tag, s, nl string) error
>> +       close() error
>> ++      setWriteDeadline(t time.Time) error
>> + }
>> +
>> + type netConn struct {
>> +@@ -273,7 +277,11 @@
>> +               nl = "\n"
>> +       }
>> +
>> +-      err := w.conn.writeString(p, w.hostname, w.tag, msg, nl)
>> ++      err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout))
>> ++      if err != nil {
>> ++              return 0, err
>> ++      }
>> ++      err = w.conn.writeString(p, w.hostname, w.tag, msg, nl)
>> +       if err != nil {
>> +               return 0, err
>> +       }
>> +@@ -305,6 +313,10 @@
>> +       return n.conn.Close()
>> + }
>> +
>> ++func (n *netConn) setWriteDeadline(t time.Time) error {
>> ++      return n.conn.SetWriteDeadline(t)
>> ++}
>> ++
>> + // NewLogger creates a log.Logger whose output is written to
>> + // the system log service with the specified priority. The logFlag
>> + // argument is the flag set passed through to log.New to create
>> +diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go
>> +--- go/src/log/syslog/syslog_unix.go   2013-11-28 13:38:28.000000000 -0800
>> ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go       2014-10-03 11:44:39.010403175 -0700
>> +@@ -19,7 +19,7 @@
>> +       logPaths := []string{"/dev/log", "/var/run/syslog"}
>> +       for _, network := range logTypes {
>> +               for _, path := range logPaths {
>> +-                      conn, err := net.Dial(network, path)
>> ++                      conn, err := net.DialTimeout(network, path, connectTimeout)
>> +                       if err != nil {
>> +                               continue
>> +                       } else {
>> diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc
>> new file mode 100644
>> index 0000000..8897cb1
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-common.inc
>> @@ -0,0 +1,21 @@
>> +SUMMARY = "Go programming language compiler"
>> +DESCRIPTION = " The Go programming language is an open source project to make \
>> + programmers more productive. Go is expressive, concise, clean, and\
>> + efficient. Its concurrency mechanisms make it easy to write programs\
>> + that get the most out of multicore and networked machines, while its\
>> + novel type system enables flexible and modular program construction.\
>> + Go compiles quickly to machine code yet has the convenience of\
>> + garbage collection and the power of run-time reflection. It's a\
>> + fast, statically typed, compiled language that feels like a\
>> + dynamically typed, interpreted language."
>> +
>> +HOMEPAGE = " http://golang.org/"
>> +LICENSE = "BSD-3-Clause"
>> +
>> +inherit goarch
>> +
>> +SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz"
>> +S = "${WORKDIR}/go"
>> +B = "${S}"
>> +
>> +INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
>> diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
>> new file mode 100644
>> index 0000000..cb2dd2a
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-native.inc
>> @@ -0,0 +1,54 @@
>> +inherit native
>> +
>> +export GOOS = "${BUILD_GOOS}"
>> +export GOARCH = "${BUILD_GOARCH}"
>> +export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go"
>> +export CGO_ENABLED = "1"
>> +
>> +do_configure[noexec] = "1"
>> +
>> +do_compile() {
>> +    export GOBIN="${B}/bin"
>> +    rm -rf ${GOBIN}
>> +    mkdir ${GOBIN}
>> +
>> +    export TMPDIR=${WORKDIR}/build-tmp
>> +    mkdir -p ${WORKDIR}/build-tmp
>> +
>> +    cd src
>> +    CGO_ENABLED=0 ./make.bash --host-only
>> +}
>> +
>> +
>> +make_wrapper() {
>> +    rm -f ${D}${bindir}/$2
>> +    cat <<END >${D}${bindir}/$2
>> +#!/bin/bash
>> +here=\`dirname \$0\`
>> +export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
>> +\$here/../lib/go/bin/$1 "\$@"
>> +END
>> +    chmod +x ${D}${bindir}/$2
>> +}
>> +
>> +do_install() {
>> +    install -d ${D}${libdir}/go
>> +    cp -a ${B}/pkg ${D}${libdir}/go/
>> +    install -d ${D}${libdir}/go/src
>> +    (cd ${S}/src; for d in *; do \
>> +        [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
>> +    done)
>> +    install -d ${D}${bindir} ${D}${libdir}/go/bin
>> +    for f in ${B}/bin/*
>> +    do
>> +        base=`basename $f`
>> +        install -m755 $f ${D}${libdir}/go/bin
>> +        make_wrapper $base $base
>> +    done
>> +}
>> +
>> +do_package[noexec] = "1"
>> +do_packagedata[noexec] = "1"
>> +do_package_write_ipk[noexec] = "1"
>> +do_package_write_deb[noexec] = "1"
>> +do_package_write_rpm[noexec] = "1"
>> diff --git a/meta/recipes-devtools/go/go-native_1.4.bb b/meta/recipes-devtools/go/go-native_1.4.bb
>> new file mode 100644
>> index 0000000..bbf3c0d
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go-native_1.4.bb
>> @@ -0,0 +1,2 @@
>> +require ${PN}.inc
>> +require go-${PV}.inc
>> diff --git a/meta/recipes-devtools/go/go.inc b/meta/recipes-devtools/go/go.inc
>> new file mode 100644
>> index 0000000..732ffa4
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go.inc
>> @@ -0,0 +1,74 @@
>> +inherit goarch
>> +# libgcc is required for the target specific libraries to build properly
>> +DEPENDS += " go-native libgcc"
>> +# Prevent runstrip from running because you get errors when the host arch != target arch
>> +INHIBIT_PACKAGE_STRIP = "1"
>> +INHIBIT_SYSROOT_STRIP = "1"
>> +
>> +export GOHOSTOS = "${BUILD_GOOS}"
>> +export GOHOSTARCH = "${BUILD_GOARCH}"
>> +export GOOS = "${TARGET_GOOS}"
>> +export GOARCH = "${TARGET_GOARCH}"
>> +export GOARM = "${TARGET_GOARM}"
>> +export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
>> +export GOROOT_FINAL = "${libdir}/go"
>> +export CGO_ENABLED = "1"
>> +export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
>> +export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
>> +
>> +do_configure[noexec] = "1"
>> +
>> +do_compile() {
>> +    export GOBIN="${B}/bin"
>> +    export CC="${@d.getVar('BUILD_CC', True).strip()}"
>> +    rm -rf ${GOBIN} ${B}/pkg
>> +    mkdir ${GOBIN}
>> +
>> +    export TMPDIR=${WORKDIR}/build-tmp
>> +    mkdir -p ${WORKDIR}/build-tmp
>> +
>> +    cd src
>> +    ./make.bash --host-only
>> +    # Ensure cgo.a is built with the target toolchain
>> +    export GOBIN="${B}/target/bin"
>> +    rm -rf ${GOBIN}
>> +    mkdir -p ${GOBIN}
>> +    GO_FLAGS="-a" ./make.bash
>> +}
>> +
>> +do_install_class-target() {
>> +    install -d ${D}${libdir}/go
>> +    cp -a ${B}/pkg ${D}${libdir}/go/
>> +    install -d ${D}${libdir}/go/src
>> +    (cd ${S}/src; for d in *; do \
>> +        [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
>> +    done)
>> +    install -d ${D}${bindir}
>> +    for f in ${B}/bin/${GOOS}_${GOARCH}/*
>> +    do
>> +        install -m755 $f ${D}${bindir}
>> +    done
>> +}
>> +
>> +do_install_class-cross() {
>> +    install -d ${D}${libdir}/go
>> +    cp -a ${B}/pkg ${D}${libdir}/go/
>> +    install -d ${D}${libdir}/go/src
>> +    (cd ${S}/src; for d in *; do \
>> +        [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
>> +    done)
>> +    install -d ${D}${bindir}
>> +    for f in ${B}/bin/go*
>> +    do
>> +        install -m755 $f ${D}${bindir}
>> +    done
>> +}
>> +
>> +INSANE_SKIP_${PN} += "staticdev"
>> +RDEPENDS_${PN} += "perl"
>> +
>> +do_package[noexec] = "1"
>> +do_packagedata[noexec] = "1"
>> +do_package_write_ipk[noexec] = "1"
>> +do_package_write_deb[noexec] = "1"
>> +do_package_write_rpm[noexec] = "1"
>> diff --git a/meta/recipes-devtools/go/go_1.6.bb b/meta/recipes-devtools/go/go_1.6.bb
>> new file mode 100644
>> index 0000000..2f59033
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go_1.6.bb
>> @@ -0,0 +1,4 @@
>> +require go.inc
>> +require go-${PV}.inc
>> +
>> +BBCLASSEXTEND = "cross"
>> diff --git a/meta/recipes-devtools/go/go_1.7.bb b/meta/recipes-devtools/go/go_1.7.bb
>> new file mode 100644
>> index 0000000..8186427
>> --- /dev/null
>> +++ b/meta/recipes-devtools/go/go_1.7.bb
>> @@ -0,0 +1,4 @@
>> +require go-${PV}.inc
>> +require go.inc
>> +
>> +BBCLASSEXTEND = "cross"
> 
> 
> +1 for adding Go to oe-core. We already use it in Mender and are
> currently including oe-meta-go. This way we could limit the number of
> layers that meta-mender depends on.
> 
> As for the patch itself, can you include information about oe-meta-go
> revision that you used? I recall there was a policy commit messages in
> patches including commits/recipes from other layers, though I'm not
> sure if it's still in place or not.

Good point, its head of layer, actually the patch merged best from meta-virt
and oe-meta-go, meta-virt recipes were cleaner and using that as base I have
added the support for bbclassextend from oe-meta-go. I will amend the commit
message in a follow up

> 
> BTW. one thing that I particularly dislike is the find/tar trampoline
> and destsuffix. Though, I'm not sure if there's a sensible way around
> it. Go enforces a particular project structure that's not entirely
> flexible in use outside of one's private workspace.

we could think of including govendor or some such tool ?

> 
> I've also seen destsuffix break recipes that always build the latest
> version. I believe the issue is caused by git fetcher but have not had
> time to get down a debug it thoroughly.

I dont think this patch uses destsuffix the way oe-meta-go did
but if you still have these issues please report.

> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply

* Re: [PATCH 1/2] go: Add recipes for golang compilers and tools
From: Richard Purdie @ 2016-11-11 18:04 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core
In-Reply-To: <d8dfb2d5-66de-8daf-99c3-13c611a7f5b2@linux.intel.com>

On Fri, 2016-11-11 at 15:10 +0200, Alexander Kanavin wrote:
> On 11/10/2016 02:39 AM, Khem Raj wrote:
> > 
> > This is converging the recipes for go from
> > meta-virtualization and oe-meta-go
> Wait a moment, why this should go to oe-core and not to meta-go? Is 
> there something in oe-core itself that requires presence of go
> compiler?

This was something that came up at OEDEM. There are several layers with
several attempts at getting this right, most have some issues.

Whilst we've been pulling things out of core, we also need to consider
things that perhaps should get added. Having this in core would
certainly address a number of issues (but is also potentially a
maintenance burden).

We did agree there that we'd consider this. Obviously input from people
not there is welcome though and this does need discussion. I'm leaning
moderately in favour of adding it as things stand.

Cheers,

Richard


^ permalink raw reply

* [PATCH] wic: Fix rootfs_size variable not found error.
From: Philip Balister @ 2016-11-11 17:52 UTC (permalink / raw)
  To: openembedded-core

Commit 1ba6101ceaee354816e690d44bc9a5dd8dcf4011 introduced the runtime
error. Thi scommit should fix it. Tested with an sd card build with
an ext4 file system.

Signed-off-by: Philip Balister <philip@balister.org>
---
 scripts/lib/wic/partition.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 89c33ab..dc85b42 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -308,7 +308,7 @@ class Partition():
         Prepare an empty ext2/3/4 partition.
         """
         with open(rootfs, 'w') as sparse:
-            os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+            os.ftruncate(sparse.fileno(), self.size * 1024)
 
         extra_imagecmd = "-i 8192"
 
@@ -326,7 +326,7 @@ class Partition():
         Prepare an empty btrfs partition.
         """
         with open(rootfs, 'w') as sparse:
-            os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+            os.ftruncate(sparse.fileno(), self.size * 1024)
 
         label_str = ""
         if self.label:
-- 
2.7.4



^ permalink raw reply related

* Re: libtool --with-libtool-sysroot
From: Burton, Ross @ 2016-11-11 17:33 UTC (permalink / raw)
  To: Jack Mitchell; +Cc: OE-core
In-Reply-To: <be2d8fe9-686b-b174-48a3-f609f36f0969@embed.me.uk>

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

On 11 November 2016 at 17:31, Jack Mitchell <ml@embed.me.uk> wrote:

> How would one check which libtool was being used, or influence which one
> autotools chooses?
>

One common problem is a makefile or configure using "libtool" directly
instead of $(LIBTOOL).

Grep the generated Makefiles for "libtool", the only instance where it is
executed should be in an assignment to LIBTOOL.  For example, glib:

LIBTOOL = $(top_builddir)/x86_64-poky-linux-libtool

Ross


Ross

[-- Attachment #2: Type: text/html, Size: 1213 bytes --]

^ permalink raw reply

* Re: libtool --with-libtool-sysroot
From: Jack Mitchell @ 2016-11-11 17:31 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LaY5K8gY97hXbLgGkaRNbKGv-DwvLU0H1jt8oSkXg+rug@mail.gmail.com>

On 11/11/16 15:34, Burton, Ross wrote:
>
> On 11 November 2016 at 14:34, Jack Mitchell <ml@embed.me.uk
> <mailto:ml@embed.me.uk>> wrote:
>
>     However, looking at the libtool recipe in OE it has a patch which
>     changes the libtool flag from --with-sysroot to
>     --with-libtool-sysroot. The question is, how is this version not
>     making it into my SDK, I have sourced the environment script and a
>     which libtoolize points to the right path.
>
>
> Is the package you are trying to build using its own libtool (or the
> host libtool), and not our prefixed libtool?
>
> Ross

This may be happening but it's just a generic autotools project. No 
references to libtool in the project apart from the ones automatically 
generated.

autoreconf -i
./configure ${CONFIGURE_FLAGS}
make

How would one check which libtool was being used, or influence which one 
autotools chooses?

Cheers,


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox