[OE-core] [PATCH] libpng: Upgrade 1.6.35 -> 1.6.36

2018-12-19 Thread ricky.yoon
License-Update: License file changes are due to updates in Version and 
Copyright date

Signed-off-by: ricky.yoon 
---
 .../libpng/{libpng_1.6.35.bb => libpng_1.6.36.bb} | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-multimedia/libpng/{libpng_1.6.35.bb => libpng_1.6.36.bb} 
(74%)

diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.35.bb 
b/meta/recipes-multimedia/libpng/libpng_1.6.36.bb
similarity index 74%
rename from meta/recipes-multimedia/libpng/libpng_1.6.35.bb
rename to meta/recipes-multimedia/libpng/libpng_1.6.36.bb
index 5ae0a91a74..3cf4f7249c 100644
--- a/meta/recipes-multimedia/libpng/libpng_1.6.35.bb
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.36.bb
@@ -2,16 +2,16 @@ SUMMARY = "PNG image format decoding library"
 HOMEPAGE = "http://www.libpng.org/;
 SECTION = "libs"
 LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4791381a76f106ac4699f6261c65ee29 \
-
file://png.h;endline=144;md5=090ba5769782e8a1663a45fab1c2b36c \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=12b4ec50384c800bc568f519671b120c \
+
file://png.h;endline=144;md5=15ae15f53376306868259924a9db4e05 \
 "
 DEPENDS = "zlib"
 
 LIBV = "16"
 
 SRC_URI = 
"${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "678b7e696a62a193ed3503b04bf449d6"
-SRC_URI[sha256sum] = 
"23912ec8c9584917ed9b09c5023465d71709dce089be503c7867fec68a93bcd7"
+SRC_URI[md5sum] = "df2be2d29c40937fe1f5349b16bc2826"
+SRC_URI[sha256sum] = 
"eceb924c1fa6b79172fdfd008d335f0e59172a86a66481e09d4089df872aa319"
 
 MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ 
${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
 
-- 
2.17.1

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


[OE-core] [PATCH 1/1] oeqa/concurrencytest: fix for locating meta-selftest

2018-12-19 Thread Robert Yang
The previous code assumed builddir and meta-selftest are in the same dir, but
this isn't always true, builddir can be anywhere, use bitbake to locate
meta-selftest can fix the problem.

The bb.fatal() doesn't work (no error message is print), so I use raise
Exception to print error messages.

Signed-off-by: Robert Yang 
---
 meta/lib/oeqa/core/utils/concurrencytest.py | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py 
b/meta/lib/oeqa/core/utils/concurrencytest.py
index f050289..ef1698c 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -139,6 +139,20 @@ def removebuilddir(d):
 delay = delay - 1
 bb.utils.prunedir(d)
 
+def get_selftestdir():
+"""
+Use 'which bitbake' to locate meta-selftest dir
+"""
+cmd = 'which bitbake'
+retval, bitbake_path = subprocess.getstatusoutput(cmd)
+if retval != 0:
+raise Exception('Failed to run %s' % cmd)
+topdir = os.path.realpath('%s/../../' % os.path.dirname(bitbake_path))
+selftestdir = os.path.join(topdir, 'meta-selftest')
+if not os.path.exists(selftestdir):
+raise Exception('Failed to run %s' % cmd)
+return selftestdir
+
 def fork_for_tests(concurrency_num, suite):
 result = []
 test_blocks = partition_tests(suite, concurrency_num)
@@ -166,7 +180,7 @@ def fork_for_tests(concurrency_num, suite):
 if 'BUILDDIR' in os.environ:
 builddir = os.environ['BUILDDIR']
 newbuilddir = builddir + "-st-" + str(ourpid)
-selftestdir = os.path.abspath(builddir + 
"/../meta-selftest")
+selftestdir = get_selftestdir()
 newselftestdir = newbuilddir + "/meta-selftest"
 
 bb.utils.mkdirhier(newbuilddir)
-- 
2.10.2

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


[OE-core] [PATCH 0/1] oeqa/concurrencytest: fix for locating meta-selftest

2018-12-19 Thread Robert Yang
The following changes since commit 14c291e1fb6324da46885b69fbd7f01b3c6b053e:

  gcc-runtime: Add missing libc dependency (2018-12-18 16:19:30 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/oeqa
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/oeqa

Robert Yang (1):
  oeqa/concurrencytest: fix for locating meta-selftest

 meta/lib/oeqa/core/utils/concurrencytest.py | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

-- 
2.10.2

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


[OE-core] [PATCH] populate_sdk_ext.bbclass: Include site.conf in parsing for contents for local.conf

2018-12-19 Thread Khem Raj
Some distros use site.conf to emit certain variables which are important
for eSDK e.g. DISTRO with out which eSDK will not be able to ger right
metadata when it tries to build

Signed-off-by: Khem Raj 
---
 meta/classes/populate_sdk_ext.bbclass | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index e30c49296d..40b0375e0b 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -280,6 +280,8 @@ python copy_buildsystem () {
 
 # Create local.conf
 builddir = d.getVar('TOPDIR')
+if derivative and os.path.exists(builddir + '/conf/site.conf'):
+shutil.copyfile(builddir + '/conf/site.conf', baseoutpath + 
'/conf/site.conf')
 if derivative and os.path.exists(builddir + '/conf/auto.conf'):
 shutil.copyfile(builddir + '/conf/auto.conf', baseoutpath + 
'/conf/auto.conf')
 if derivative:
@@ -297,6 +299,9 @@ python copy_buildsystem () {
 return origvalue, op, 0, True
 varlist = ['[^#=+ ]*']
 oldlines = []
+if os.path.exists(builddir + '/conf/site.conf'):
+with open(builddir + '/conf/site.conf', 'r') as f:
+oldlines += f.readlines()
 if os.path.exists(builddir + '/conf/auto.conf'):
 with open(builddir + '/conf/auto.conf', 'r') as f:
 oldlines += f.readlines()
-- 
2.20.1

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


Re: [OE-core] [PATCH 1/1] cmake-native: Set --parallel for configure

2018-12-19 Thread Robert Yang




On 12/19/18 6:37 PM, Burton, Ross wrote:

On Wed, 19 Dec 2018 at 06:34, Robert Yang  wrote:

+   --parallel=${@d.getVar('PARALLEL_MAKE').replace('-j ', '')} \


See oe.utils.parallel_make_argument()


Thanks, updated in the repo:

commit 19ac4e33e66353581191e7dfd866f6c0f73eafa6
Author: Robert Yang 
Date:   Tue Dec 18 17:48:22 2018 +0800

cmake-native: Set --parallel for configure

This can save do_configure's time from 330s to 60s on my host.

Signed-off-by: Robert Yang 

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb 
b/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb

index 9a1390f..3086c82 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
@@ -27,7 +27,9 @@ CMAKE_EXTRACONF = "\
 "

 do_configure () {
-   ${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+   ${S}/configure --verbose --prefix=${prefix} \
+   --parallel="${@oe.utils.parallel_make_argument(d, '%d')}" \
+   -- ${CMAKE_EXTRACONF}
 }

 do_compile() {


// Robert



Ross


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


[OE-core] [PATCH] libpam: reproducibility: Fix host umask leakage at patch-time

2018-12-19 Thread Douglas Royds
The patch file pam-security-abstract-securetty-handling.patch creates a new
file (tty_secure.c) at patch-time, so its permissions are subject to the host
umask. This file is later copied into the -dbg package with no change in
permissions.

Signed-off-by: Douglas Royds 
---
 meta/recipes-extended/pam/libpam_1.3.0.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-extended/pam/libpam_1.3.0.bb 
b/meta/recipes-extended/pam/libpam_1.3.0.bb
index 3aec2cdb4c..292b570e11 100644
--- a/meta/recipes-extended/pam/libpam_1.3.0.bb
+++ b/meta/recipes-extended/pam/libpam_1.3.0.bb
@@ -49,6 +49,9 @@ S = "${WORKDIR}/Linux-PAM-${PV}"
 
 inherit autotools gettext pkgconfig
 
+# We create a new file (tty_secure.c) from 
pam-security-abstract-securetty-handling.patch
+do_patch[umask] = "022"
+
 PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
 
 PACKAGES += "${PN}-runtime ${PN}-xtests"
-- 
2.17.1

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


Re: [OE-core] [PATCH] [RFC] go.bbclass: install dependencies under $GOPATH instead of $GOROOT

2018-12-19 Thread Damien Riegel
On Wed, 19 Dec 2018 at 16:41, Matt Madison  wrote:
>
> On Wed, Dec 19, 2018 at 9:51 AM Damien Riegel  wrote:
> >
> > To package a go application in Yocto, one needs to also package its
> > dependencies to keep the build reproducible and under control. The
> > default install task of the go class puts the source in ${libdir}/go/src.
> >
> > ${libdir}/go/src is where the standard go packages resides, aka $GOROOT.
> > When a go package has dependencies on other go packages, they must be
> > located under $GOPATH, otherwise errors like this one may happen:
> >
> >   Non-standard package  in standard package 
> >
> > This point of this patch is to trigger a discussion on how this issue
> > can be tackled in Yocto. Following code is working but should not be
> > considered for inclusion.
>
> Can you describe the context of this a bit more?  The way go.bbclass
> is set up, all of your recipe's dependencies (and their dependencies)
> should already have been installed in the per-recipe sysroot (where
> GOROOT lives for the current recipe's build), and should get resolved
> from there. GOPATH gets set to ${B} for the current recipe's build.
> Nothing in the GOROOT should be importing packages that reside in
> GOPATH, which is what that particular error message is indicating. If
> you're getting that error, then there might be something wrong with
> recipe dependencies.

Sure. I think the issue is because I have the following chain of
dependencies:

A --> B --> C
  `-> C

Building C is fine, building B is fine, but building A triggers the
error I mentioned, because the Go compiler complains about B using a
non-standard package C. It thinks B is a standard package because it's
located in GOROOT.

Regarding dependencies, I created recipes named foocorp.com-{A,B,C}.bb
and used DEPENDS_append = " foocorp.com-A" for instance.

I understand it's convenient to install dependencies in the GOROOT
directory of recipes' sysroot, but we should keep in mind that when one
calls `go get`, dependencies are installed in GOPATH, not GOROOT. I
think that if we want to avoid (a bit obscure) build failures and cover
all use cases, we should try to mimic that behaviour as close as we can.

>
> -Matt
> >
> > Signed-off-by: Damien Riegel 
> > ---
> >  meta/classes/go.bbclass | 18 +++---
> >  1 file changed, 15 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
> > index 167d02e3fa..c0ed3211cd 100644
> > --- a/meta/classes/go.bbclass
> > +++ b/meta/classes/go.bbclass
> > @@ -111,9 +111,9 @@ do_compile_ptest_base() {
> >  do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
> >
> >  go_do_install() {
> > -   install -d ${D}${libdir}/go/src/${GO_IMPORT}
> > +   install -d ${D}/gopath/src/${GO_IMPORT} ${D}${libdir}/go
> > tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' 
> > --exclude 'testdata' . | \
> > -   tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner 
> > -xf -
> > +   tar -C ${D}/gopath/src/${GO_IMPORT} --no-same-owner -xf -
> > tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf 
> > -
> >
> > if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
> > @@ -172,9 +172,21 @@ do_install_ptest_base() {
> > chown -R root:root ${D}${PTEST_PATH}
> >  }
> >
> > +do_fixupdeps() {
> > +   gopath="${WORKDIR}/recipe-sysroot/gopath"
> > +   if [ -d ${gopath} ]; then
> > +   tar -C ${gopath} -cf - src | tar -C ${B} --no-same-owner -k 
> > -xf -
> > +   else
> > +   echo "no dependencies to fixup"
> > +   fi
> > +}
> > +
> >  EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
> >
> > -FILES_${PN}-dev = "${libdir}/go/src"
> > +addtask do_fixupdeps after do_configure before do_compile
> > +
> > +SYSROOT_DIRS_append = "/gopath"
> > +FILES_${PN}-dev = "/gopath/src"
> >  FILES_${PN}-staticdev = "${libdir}/go/pkg"
> >
> >  INSANE_SKIP_${PN} += "ldflags"
> > --
> > 2.19.2
> >
> > --
> > ___
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] grub-efi-native: workaround for fedora 29

2018-12-19 Thread kai.kang
From: Kai Kang 

grub-efi-native fails to run do_configure on Fedora 29 host:

| checking for options to compile assembly...
| Assembler messages:
| Fatal error: The input and output files must be distinct

because the host 'as' in binutils-3.31 breaks if using two filesystems.
See:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=2a50366

Work-around this issue by forcing the configure time assembler check to
use a temp file in the src dir.

Signed-off-by: Kai Kang 
---
 ...workaround-for-as-from-binutils-2.31.patch | 43 +++
 meta/recipes-bsp/grub/grub-efi_2.02.bb|  2 +
 2 files changed, 45 insertions(+)
 create mode 100644 
meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch

diff --git 
a/meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch 
b/meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch
new file mode 100644
index 00..75dae16095
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch
@@ -0,0 +1,43 @@
+When /dev and $srcdir are not in a same file system, it may trigger a flaw of
+binutils 2.31 and cause grub-efi-native configure error:
+
+| checking for options to compile assembly...
+| Assembler messages:
+| Fatal error: The input and output files must be distinct
+
+Replace /dev/null with a temporary file during assemble check to avoid such
+failure.
+
+This is a workaround for binutils 2.31. When it is fixed on Fedora 29, this
+patch could be removed.
+
+Ref:
+https://bugzilla.redhat.com/show_bug.cgi?id=1660279
+
+Upstream-Status: Inappropriate [native]
+
+Signed-off-by: Kai Kang 
+
+diff --git a/configure.ac b/configure.ac
+index 44a67a7..6eb28fe 100644
+--- a/configure.ac
 b/configure.ac
+@@ -696,8 +696,9 @@ if test x"$test_program" = x ; then
+   grub_cv_cc_target_asm_compile=
+ else
+   found=no
++  tmpfile="$(mktemp $srcdir/asm-tests/XX)"
+   for arg in "" "-no-integrated-as"; do
+-cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg 
$TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S"
++cmdline="$TARGET_CC -c -o $tmpfile $TARGET_CCASFLAGS $arg 
$TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S"
+ echo "Running $cmdline" >_MESSAGE_LOG_FD
+ if $cmdline >_MESSAGE_LOG_FD 2>_MESSAGE_LOG_FD; then
+   grub_cv_cc_target_asm_compile="$arg"
+@@ -705,6 +706,7 @@ else
+   break
+ fi
+   done
++  rm -f $tmpfile
+   if test x"$found" = xno ; then
+ AC_MSG_ERROR([could not compile assembly])
+   fi
diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb 
b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index 14fce97ff0..fc91864421 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -9,6 +9,8 @@ SRC_URI += " \
file://cfg \
   "
 
+SRC_URI_append_class-native = " 
file://workaround-for-as-from-binutils-2.31.patch"
+
 S = "${WORKDIR}/grub-${PV}"
 
 # Determine the target arch for the grub modules
-- 
2.19.0.rc2

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


[OE-core] [PATCH v2 0/1] grub-efi-native: workaround for fedora 29

2018-12-19 Thread kai.kang
From: Kai Kang 

v2:
* update comment in workaround-for-as-from-binutils-2.31.patch

The following changes since commit fef47bd915f6a3960e512b5aba8b461b77a9ea78:

  linux-yocto-4.14: Drop bbappend (2018-12-18 16:20:10 +)

are available in the Git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/grub-efi-native-fedora29
  
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/grub-efi-native-fedora29

Kai Kang (1):
  grub-efi-native: workaround for fedora 29

 ...workaround-for-as-from-binutils-2.31.patch | 43 +++
 meta/recipes-bsp/grub/grub-efi_2.02.bb|  2 +
 2 files changed, 45 insertions(+)
 create mode 100644 
meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch

-- 
2.19.0.rc2

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


Re: [OE-core] flto automake

2018-12-19 Thread Khem Raj
On Tue, Dec 18, 2018 at 5:07 PM Burton, Ross  wrote:
>
> On Wed, 19 Dec 2018 at 00:42, Brad Bishop  wrote:
>
> > I wonder if this is something they would be interested in upstream.  I’ve 
> > copied
> > the oe-core mailing list for possible comment.
>
> Thanks for forwarding this to us.  The class is very simple and just does:
>
> PACKAGECONFIG_CONFARGS += " AR=${TARGET_PREFIX}gcc-ar \
> RANLIB=${TARGET_PREFIX}gcc-ranlib"
>
> That's quite an abuse of PACKAGECONFIG_CONFARGS, I'd recommend just
> setting AR and RANLIB directly in the class, they'll override the
> defaults in bitbake.conf.
>
> That however leads to the question of should we just change the
> defaults? Does anything break if we use gcc-ar instead of ar?

Dont think that is a good idea in general since gcc-ar is a wrapper
around normal ar
passing --plugin=/path/to/lto/plugin/so and that may not be right
thing to do always.

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


Re: [OE-core] [PATCH 1/1] grub-efi-native: workaround for fedora 29

2018-12-19 Thread Kang Kai

On 2018/12/19 下午6:43, Burton, Ross wrote:

On Wed, 19 Dec 2018 at 07:43,  wrote:

+Upstream-Status: Inappropriate [native]

If we're going to mark this as inappropriate then please make it clear
in the patch that its a workaround for a specific binutils and when
that stops being used we can remove it.


binutils version has been addressed in the patch. I'll update with 
workaround info.




However isn't this a problem
when building grub on F29, even outside of Yocto?  If so then it's not
inappropriate, it's an upstream bug and they should have the fix.



It is native build related, so grub is not affected that no grub-native 
is provided. I have created a defect on RedHat bugzilla:


https://bugzilla.redhat.com/show_bug.cgi?id=1660279


Regards,
Kai




Ross



--
Kai Kang

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


Re: [OE-core] flto automake

2018-12-19 Thread Khem Raj
On Tue, Dec 18, 2018 at 4:42 PM Brad Bishop  wrote:
>
>
>
> > On Dec 18, 2018, at 1:08 PM, James Feist  
> > wrote:
> >
> > If you aren't planning on enabling flto in a repo you can ignore this email.
> >
> >
> > I've created a new class flto-automake 
> > https://github.com/openbmc/meta-phosphor/blob/master/classes/flto-automake.bbclass
> >  if you are enabling -flto in an autotools project you might be interested 
> > in. When using static libraries you may run into undefined references when 
> > building with Yocto. Yocto by default uses:


The changes are right but I think flto should also be a DISTRO_FEATURE
and this change should become effective only when flto is in
DISTRO_FEATURES

> >
> > export AR = "${HOST_PREFIX}ar"
> > export RANLIB = "${HOST_PREFIX}ranlib"
> >
> > for AR and RANLIB. This new class replaces these with the gcc equivalent 
> > wrappers that can work with the flto object files. This doesn't seem to be 
> > an issue for the CI build, it only shows up for Yocto builds. Reference: 
> > http://stackoverflow.com/questions/25878407/how-can-i-use-lto-with-static-libraries#comment67660913_25878408
> >
> > For Cmake I suggest looking at the way bmcweb handles it in CMakesLists:
> > https://github.com/openbmc/bmcweb/blob/master/CMakeLists.txt#L92

hardcoding is not right. We have cross versions of these tools
installed during OE build and we also have options to use non-gcc
compilers, e.g. llvm provides its own verisons of llvm-ar and
llvm-ranlib and llvm-nm which should be used when using clang
or other llvm based static compilers.
This is right fix for cross compiling with CMake
https://github.com/YoeDistro/meta-ti/blob/yoe/mut/recipes-bsp/rwmem/rwmem/0001-Use-CMake-provided-vars-for-ar-and-ranlib.patch

> >
> > Thanks,
> >
> > James
>
> Thanks James
>
> I wonder if this is something they would be interested in upstream.  I’ve 
> copied
> the oe-core mailing list for possible comment.
>
> -brad
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/4] gcc: Drop gcc-cross-initial and use gcc-cross instead

2018-12-19 Thread Khem Raj
Hi Richard

This is a very good change all in all. I have few comments I added.

On Wed, Dec 19, 2018 at 4:16 PM Richard Purdie
 wrote:
>
> We need a libgcc to build glibc. Tranditionally we therefore build
> a non-threaded and non-shared compiler (gcc-cross-initial), then use
> that to build libgcc-initial which is used to build glibc which we can
> then build gcc-cross and libgcc against.
>
> Firstly, we can drop the glibc dependency from gcc-cross, *if* we make
> two changes:
>
> a) specify the minimum glibc version to support in a configure option
> b) create a dummy limits.h file so that later when glibc creates one,
>the headers structure has support for it. We can do this with a simple
>empty file
>
> Once gcc-cross is libc independent, we can use it to build both
> libgcc-initial and then later libgcc.
>
> libgcc-initial is tricky as we need to imitate the non-threaded and
> non-shared case. We can do that by hacking the threading mode back to
> "single" even if gcc reports "posix" and disable libc presence for the
> libgcc-intial build. We have to create the dummy limits.h to avoid
> compiler errors from a missing header.
>
> glibc will fail to link with libgcc-initial due to a missing "exception
> handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need
> any exception handler, we can safely symlink to libgcc.a.
>
> With those changes, gcc-cross can be used in all places and we only need
> one build of gcc for each architecture.
>
> For some reason ifunc was being disabled on mips prior to these changes
> but afterwards became enabled but caused assertion failures. This is
> therefore disabled until we can debug that.
>
> The glibc version is a minimum and only used on ppc in the gcc code, it
> doesn't need to be rigerously kept exactly up to date.
>
> Signed-off-by: Richard Purdie 
> ---
>  meta/recipes-core/glibc/glibc.inc |  5 +-
>  .../gcc/gcc-configure-common.inc  |  3 ++
>  .../gcc/gcc-cross-canadian.inc|  2 +-
>  meta/recipes-devtools/gcc/gcc-cross.inc   |  8 ++-
>  meta/recipes-devtools/gcc/libgcc-initial.inc  | 52 ---
>  meta/recipes-devtools/gcc/libgcc.inc  |  2 +-
>  6 files changed, 61 insertions(+), 11 deletions(-)
>
> diff --git a/meta/recipes-core/glibc/glibc.inc 
> b/meta/recipes-core/glibc/glibc.inc
> index 43e71337eef..de692fbfd75 100644
> --- a/meta/recipes-core/glibc/glibc.inc
> +++ b/meta/recipes-core/glibc/glibc.inc
> @@ -15,7 +15,7 @@ python () {
>  bb.fatal("%s can't be built with %s, try -O1 instead" % 
> (d.getVar('PN'), opt_effective))
>  }
>
> -DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial 
> linux-libc-headers"
> +DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
>
>  PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
>  PROVIDES += "virtual/libintl virtual/libiconv"
> @@ -33,6 +33,9 @@ CACHED_CONFIGUREVARS += " \
>libc_cv_ssp=no \
>  "
>
> +# ifunc doesn't appear to work on mips, casuses libbfd assertion failures
> +CACHED_CONFIGUREVARS_append_mipsarch = " libc_cv_ld_gnu_indirect_function=no"

perhaps we should use --disable-gnu-indirect-function to make it more readable.

> +
>  GLIBC_EXTRA_OECONF ?= ""
>  GLIBC_EXTRA_OECONF_class-nativesdk = ""
>  INHIBIT_DEFAULT_DEPS = "1"
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc 
> b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index e2ce234aa14..009ab111683 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -24,6 +24,8 @@ GCCTHREADS ?= "posix"
>
>  GCCPIE ??= ""
>
> +# glibc version is a minimum and doesn't need to track glibc exactly
> +# only governs ppc specific features in much older glibc versions

I hope there are no effects of this pinning to glibc 2.28 on non-glibc
builds especially musl.

>  EXTRA_OECONF = "\
>  ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
>  --with-gnu-ld \
> @@ -38,6 +40,7 @@ EXTRA_OECONF = "\
>  --enable-libstdcxx-pch \
>  --program-prefix=${TARGET_PREFIX} \
>  --without-local-prefix \
> +--with-glibc-version=2.28 \
>  ${EXTRA_OECONF_BASE} \
>  ${EXTRA_OECONF_GCC_FLOAT} \
>  ${EXTRA_OECONF_PATHS} \
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc 
> b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> index 2f32d3407fb..73f1e054463 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> @@ -3,7 +3,7 @@ inherit cross-canadian
>  SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} 
> target)"
>  PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
>
> -DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk 
> virtual/${HOST_PREFIX}binutils-crosssdk 
> virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
> +DEPENDS = 

[OE-core] ✗ patchtest: failure for "glibc: Remove site_config and ..." and 3 more

2018-12-19 Thread Patchwork
== Series Details ==

Series: "glibc: Remove site_config and ..." and 3 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/15420/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at 284596e947)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


[OE-core] [PATCH 4/4] recipes: Drop virtual/libc-for-gcc

2018-12-19 Thread Richard Purdie
We no longer have special "libc" for gcc so we can rely on plain
virtual/libc and reduce the complexity in the dependencies.

Signed-off-by: Richard Purdie 
---
 meta/conf/distro/include/tcmode-default.inc  | 2 --
 meta/conf/layer.conf | 1 -
 meta/recipes-core/glibc/glibc.inc| 2 +-
 meta/recipes-core/musl/musl_git.bb   | 2 +-
 meta/recipes-core/newlib/newlib_3.0.0.bb | 2 +-
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc  | 1 -
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 2 +-
 meta/recipes-devtools/go/go-cross-canadian.inc   | 2 +-
 9 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/meta/conf/distro/include/tcmode-default.inc 
b/meta/conf/distro/include/tcmode-default.inc
index a586c63d4b9..c9fed48bce2 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -16,8 +16,6 @@ PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = 
"gcc-crosssdk-${SDK_SYS}"
 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}compilerlibs = "nativesdk-gcc-runtime"
 
 # Default libc config
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}"
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc ?= 
"nativesdk-glibc"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial"
 PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial ?= 
"nativesdk-glibc-initial"
 PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index c67dec49ed2..7afccdf3351 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -51,7 +51,6 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
   *->git-native \
   *->ccache-native \
   *->icecc-create-env-native \
-  gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc \
   gcc-cross-${TARGET_ARCH}->linux-libc-headers \
   ppp-dialin->ppp \
   resolvconf->bash \
diff --git a/meta/recipes-core/glibc/glibc.inc 
b/meta/recipes-core/glibc/glibc.inc
index de692fbfd75..6aee89bb53a 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -17,7 +17,7 @@ python () {
 
 DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
 
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/libc"
 PROVIDES += "virtual/libintl virtual/libiconv"
 inherit autotools texinfo distro_features_check systemd
 
diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index 9cc875c4a61..3dc56cef851 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -17,7 +17,7 @@ SRC_URI = "git://git.musl-libc.org/musl \
 
 S = "${WORKDIR}/git"
 
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc 
virtual/libiconv virtual/libintl virtual/crypt"
+PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils \
virtual/${TARGET_PREFIX}gcc-initial \
diff --git a/meta/recipes-core/newlib/newlib_3.0.0.bb 
b/meta/recipes-core/newlib/newlib_3.0.0.bb
index 09238fe006b..db13724eb58 100644
--- a/meta/recipes-core/newlib/newlib_3.0.0.bb
+++ b/meta/recipes-core/newlib/newlib_3.0.0.bb
@@ -1,6 +1,6 @@
 require newlib.inc
 
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc 
virtual/libiconv virtual/libintl"
+PROVIDES += "virtual/libc virtual/libiconv virtual/libintl"
 
 do_configure() {
${S}/configure ${EXTRA_OECONF}
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc 
b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 73f1e054463..e7c08d3a618 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -3,7 +3,7 @@ inherit cross-canadian
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} 
target)"
 PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk 
virtual/${HOST_PREFIX}binutils-crosssdk 
virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native 
virtual/libc"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk 
virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc 
nativesdk-gettext flex-native virtual/libc"
 
 GCCMULTILIB = "--enable-multilib"
 
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc 
b/meta/recipes-devtools/gcc/gcc-cross.inc
index add6b43017d..6222c2e8c91 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -31,7 +31,6 @@ EXTRA_OECONF += "\
 --with-system-zlib \
 "
 
-DEPENDS_remove_libc-baremetal := "virtual/${TARGET_PREFIX}libc-for-gcc"
 EXTRA_OECONF_append_libc-baremetal = " --without-headers"
 EXTRA_OECONF_remove_libc-baremetal = "--enable-threads=posix"
 EXTRA_OECONF_remove_libc-newlib = "--enable-threads=posix"
diff --git 

[OE-core] [PATCH 2/4] gcc: Drop gcc-cross-initial and use gcc-cross instead

2018-12-19 Thread Richard Purdie
We need a libgcc to build glibc. Tranditionally we therefore build
a non-threaded and non-shared compiler (gcc-cross-initial), then use
that to build libgcc-initial which is used to build glibc which we can
then build gcc-cross and libgcc against.

Firstly, we can drop the glibc dependency from gcc-cross, *if* we make
two changes:

a) specify the minimum glibc version to support in a configure option
b) create a dummy limits.h file so that later when glibc creates one,
   the headers structure has support for it. We can do this with a simple
   empty file

Once gcc-cross is libc independent, we can use it to build both
libgcc-initial and then later libgcc.

libgcc-initial is tricky as we need to imitate the non-threaded and
non-shared case. We can do that by hacking the threading mode back to
"single" even if gcc reports "posix" and disable libc presence for the
libgcc-intial build. We have to create the dummy limits.h to avoid
compiler errors from a missing header.

glibc will fail to link with libgcc-initial due to a missing "exception
handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need
any exception handler, we can safely symlink to libgcc.a.

With those changes, gcc-cross can be used in all places and we only need
one build of gcc for each architecture.

For some reason ifunc was being disabled on mips prior to these changes
but afterwards became enabled but caused assertion failures. This is
therefore disabled until we can debug that.

The glibc version is a minimum and only used on ppc in the gcc code, it
doesn't need to be rigerously kept exactly up to date.

Signed-off-by: Richard Purdie 
---
 meta/recipes-core/glibc/glibc.inc |  5 +-
 .../gcc/gcc-configure-common.inc  |  3 ++
 .../gcc/gcc-cross-canadian.inc|  2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc   |  8 ++-
 meta/recipes-devtools/gcc/libgcc-initial.inc  | 52 ---
 meta/recipes-devtools/gcc/libgcc.inc  |  2 +-
 6 files changed, 61 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc.inc 
b/meta/recipes-core/glibc/glibc.inc
index 43e71337eef..de692fbfd75 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -15,7 +15,7 @@ python () {
 bb.fatal("%s can't be built with %s, try -O1 instead" % 
(d.getVar('PN'), opt_effective))
 }
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial 
linux-libc-headers"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers"
 
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
@@ -33,6 +33,9 @@ CACHED_CONFIGUREVARS += " \
   libc_cv_ssp=no \
 "
 
+# ifunc doesn't appear to work on mips, casuses libbfd assertion failures
+CACHED_CONFIGUREVARS_append_mipsarch = " libc_cv_ld_gnu_indirect_function=no"
+
 GLIBC_EXTRA_OECONF ?= ""
 GLIBC_EXTRA_OECONF_class-nativesdk = ""
 INHIBIT_DEFAULT_DEPS = "1"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc 
b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index e2ce234aa14..009ab111683 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -24,6 +24,8 @@ GCCTHREADS ?= "posix"
 
 GCCPIE ??= ""
 
+# glibc version is a minimum and doesn't need to track glibc exactly
+# only governs ppc specific features in much older glibc versions
 EXTRA_OECONF = "\
 ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \
 --with-gnu-ld \
@@ -38,6 +40,7 @@ EXTRA_OECONF = "\
 --enable-libstdcxx-pch \
 --program-prefix=${TARGET_PREFIX} \
 --without-local-prefix \
+--with-glibc-version=2.28 \
 ${EXTRA_OECONF_BASE} \
 ${EXTRA_OECONF_GCC_FLOAT} \
 ${EXTRA_OECONF_PATHS} \
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc 
b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 2f32d3407fb..73f1e054463 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -3,7 +3,7 @@ inherit cross-canadian
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} 
target)"
 PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk 
virtual/${HOST_PREFIX}binutils-crosssdk 
virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk 
virtual/${HOST_PREFIX}binutils-crosssdk 
virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native 
virtual/libc"
 
 GCCMULTILIB = "--enable-multilib"
 
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc 
b/meta/recipes-devtools/gcc/gcc-cross.inc
index 89b19684bef..63a196e2e99 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -2,7 +2,7 @@ inherit cross
 
 INHIBIT_DEFAULT_DEPS = "1"
 EXTRADEPENDS 

[OE-core] [PATCH 3/4] gcc: Drop the -initial versions of the compiler

2018-12-19 Thread Richard Purdie
Separated out from the previous commit for clarity, this simply drops
all the -inital pieces of gcc which are no longer needed after the
previous commit.

Signed-off-by: Richard Purdie 
---
 meta/recipes-devtools/gcc/gcc-8.2.inc | 14 ---
 meta/recipes-devtools/gcc/gcc-common.inc  |  7 +-
 .../gcc/gcc-configure-common.inc  |  1 -
 .../gcc/gcc-cross-initial.inc | 89 ---
 .../gcc/gcc-cross-initial_8.2.bb  |  2 -
 meta/recipes-devtools/gcc/gcc-cross.inc   |  4 +-
 .../gcc/gcc-crosssdk-initial.inc  | 10 ---
 .../gcc/gcc-crosssdk-initial_8.2.bb   |  3 -
 meta/recipes-devtools/gcc/gcc-crosssdk.inc|  2 +-
 9 files changed, 6 insertions(+), 126 deletions(-)
 delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial.inc
 delete mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial_8.2.bb
 delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
 delete mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial_8.2.bb

diff --git a/meta/recipes-devtools/gcc/gcc-8.2.inc 
b/meta/recipes-devtools/gcc/gcc-8.2.inc
index 206e1571b29..b6568a046e9 100644
--- a/meta/recipes-devtools/gcc/gcc-8.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-8.2.inc
@@ -107,20 +107,6 @@ EXTRA_OECONF_BASE = "\
 --without-isl \
 "
 
-EXTRA_OECONF_INITIAL = "\
---disable-libmudflap \
---disable-libgomp \
---disable-libitm \
---disable-libquadmath \
---with-system-zlib \
---disable-lto \
---disable-plugin \
---enable-linker-build-id \
---enable-decimal-float=no \
---without-isl \
---disable-libssp \
-"
-
 EXTRA_OECONF_PATHS = "\
 --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
 --with-sysroot=/not/exist \
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc 
b/meta/recipes-devtools/gcc/gcc-common.inc
index 06c90336b66..96334e54b4b 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -10,12 +10,11 @@ CVE_PRODUCT = "gcc"
 inherit autotools gettext texinfo
 
 BPN = "gcc"
-COMPILERINITIAL = ""
-COMPILERDEP = 
"virtual/${MLPREFIX}${TARGET_PREFIX}gcc${COMPILERINITIAL}:do_gcc_stash_builddir"
-COMPILERDEP_class-nativesdk = 
"virtual/${TARGET_PREFIX}gcc${COMPILERINITIAL}-crosssdk:do_gcc_stash_builddir"
+COMPILERDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}gcc:do_gcc_stash_builddir"
+COMPILERDEP_class-nativesdk = 
"virtual/${TARGET_PREFIX}gcc-crosssdk:do_gcc_stash_builddir"
 
 python extract_stashed_builddir () {
-src = 
d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir${COMPILERINITIAL}-${TARGET_SYS}")
+src = 
d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}")
 dest = d.getVar("B")
 oe.path.copyhardlinktree(src, dest)
 staging_processfixme([src + "/fixmepath"], dest, dest, dest, d)
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc 
b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 009ab111683..70f7628bc98 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -17,7 +17,6 @@ LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
 
 EXTRA_OECONF_BASE ?= ""
 EXTRA_OECONF_PATHS ?= ""
-EXTRA_OECONF_INITIAL ?= ""
 
 GCCMULTILIB ?= "--disable-multilib"
 GCCTHREADS ?= "posix"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc 
b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
deleted file mode 100644
index 892b1dbf2f0..000
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ /dev/null
@@ -1,89 +0,0 @@
-DEPENDS = "virtual/${TARGET_PREFIX}binutils ${NATIVEDEPS}"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
-PACKAGES = ""
-
-INHIBIT_AUTOTOOLS_DEPS = "1"
-INHIBIT_DEFAULT_DEPS = "1"
-
-# We still need gnu-config-native
-DEPENDS_prepend = "gnu-config-native autoconf-native "
-
-PN = "gcc-cross-initial-${TARGET_ARCH}"
-
-CROSS_TARGET_SYS_DIR_append = ".${PN}"
-
-# This is intended to be a -very- basic config
-# sysroot is needed in case we use libc-initial
-EXTRA_OECONF = "\
---with-newlib \
---without-headers \
---disable-shared \
---disable-threads \
---disable-multilib \
---disable-__cxa_atexit \
---enable-languages=c \
---program-prefix=${TARGET_PREFIX} \
---with-sysroot=/not/exist \
---with-build-sysroot=${STAGING_DIR_TARGET} \
-${EXTRA_OECONF_INITIAL} \
-${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 
'--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \
-${EXTRA_OECONF_GCC_FLOAT} \
-${@get_gcc_ppc_plt_settings(bb, d)} \
-"
-
-EXTRA_OECONF += "--with-native-system-header-dir=${SYSTEMHEADERS}"
-
-do_compile () {
-oe_runmake all-gcc configure-target-libgcc
-(cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h 
md-unwind-support.h sfp-machine.h gthr-default.h)
-}
-
-do_install () {
-   ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' 

[OE-core] [PATCH 1/4] glibc: Remove site_config and glibc-initial

2018-12-19 Thread Richard Purdie
The only reason we appear to need glibc-initial at this time is to support
the site_config code. The site_config code compiles and therefore needs
at least some level of working C library to link against.

This isn't a good reason to keep the complexity of glibc-initial around
so remove it, and the site_config support which then breaks.

Performance benchmarks suggest the time spent just rerunning configure
for site_config just about equals any performance benefit for OE-Core
image builds excluding the time spent adding glibc-initial to the
dependency chain.

I'm not opposed to readding some other form of site_config support
but it needs to be rethought.

Signed-off-by: Richard Purdie 
---
 meta/recipes-core/glibc/glibc-initial.inc |  57 ---
 meta/recipes-core/glibc/glibc-initial_2.28.bb |   9 -
 meta/recipes-core/glibc/glibc.inc |  16 +-
 meta/recipes-core/glibc/site_config/funcs | 474 --
 meta/recipes-core/glibc/site_config/headers   | 155 --
 meta/recipes-core/glibc/site_config/types |  21 -
 6 files changed, 1 insertion(+), 731 deletions(-)
 delete mode 100644 meta/recipes-core/glibc/glibc-initial.inc
 delete mode 100644 meta/recipes-core/glibc/glibc-initial_2.28.bb
 delete mode 100644 meta/recipes-core/glibc/site_config/funcs
 delete mode 100644 meta/recipes-core/glibc/site_config/headers
 delete mode 100644 meta/recipes-core/glibc/site_config/types

diff --git a/meta/recipes-core/glibc/glibc-initial.inc 
b/meta/recipes-core/glibc/glibc-initial.inc
deleted file mode 100644
index acd0d6b1dc5..000
--- a/meta/recipes-core/glibc/glibc-initial.inc
+++ /dev/null
@@ -1,57 +0,0 @@
-DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial 
libgcc-initial make-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-
-PACKAGES = ""
-PACKAGES_DYNAMIC = ""
-
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-
-do_configure () {
-   (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
-   find ${S} -name "configure" | xargs touch
-   cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', 
'.'))"`/configure
-   $cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
-   --prefix=/usr \
-   --disable-sanity-checks \
-   --with-headers=${STAGING_DIR_TARGET}${includedir} \
-   --enable-hacker-mode
-}
-
-do_compile () {
-   :
-}
-
-do_install () {
-   oe_runmake cross-compiling=yes install_root=${D} \
-   includedir='${includedir}' prefix='${prefix}' \
-   install-bootstrap-headers=yes install-headers
-
-   oe_runmake csu/subdir_lib
-   mkdir -p ${D}${libdir}/
-   install -m 644 csu/crt[1in].o ${D}${libdir}
-
-   # Two headers -- stubs.h and features.h -- aren't installed by 
install-headers,
-   # so do them by hand.  We can tolerate an empty stubs.h for the moment.
-   # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
-   mkdir -p ${D}${includedir}/gnu/
-   touch ${D}${includedir}/gnu/stubs.h
-   cp ${S}/include/features.h ${D}${includedir}/features.h
-
-   if [ -e ${B}/bits/stdio_lim.h ]; then
-   cp ${B}/bits/stdio_lim.h  ${D}${includedir}/bits/
-   fi
-}
-
-do_stash_locale() {
-   :
-}
-
-do_siteconfig () {
-   :
-}
-
-inherit nopackages
-
-# We really only want this built by things that need it, not any recrdeptask
-deltask do_build
diff --git a/meta/recipes-core/glibc/glibc-initial_2.28.bb 
b/meta/recipes-core/glibc/glibc-initial_2.28.bb
deleted file mode 100644
index e86770e12d4..000
--- a/meta/recipes-core/glibc/glibc-initial_2.28.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require glibc_${PV}.bb
-require glibc-initial.inc
-
-# main glibc recipes muck with TARGET_CPPFLAGS to point into
-# final target sysroot but we
-# are not there when building glibc-initial
-# so reset it here
-
-TARGET_CPPFLAGS = ""
diff --git a/meta/recipes-core/glibc/glibc.inc 
b/meta/recipes-core/glibc/glibc.inc
index 99c92ce46e4..43e71337eef 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -15,21 +15,7 @@ python () {
 bb.fatal("%s can't be built with %s, try -O1 instead" % 
(d.getVar('PN'), opt_effective))
 }
 
-# siteconfig.bbclass runs configure which needs a working compiler
-# For the compiler to work we need a working libc yet libc isn't
-# in the sysroots directory at this point. This means the libc.so
-# linker script won't work as the --sysroot setting isn't correct.
-# Here we create a hacked up libc linker script and pass in the right
-# flags to let configure work. Ugly.
-EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc 
-L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} 
-L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} 
-Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
-siteconfig_do_siteconfig_gencache_prepend = " \
-   

[OE-core] [PATCH 5/5] icecc: patchelf is needed by icecc-create-env

2018-12-19 Thread Douglas Royds
Although we could potentially build patchelf and all its dependencies,
they would all have to be blacklisted to avoid trying to build them with
icecc. We use the host patchelf instead.

Signed-off-by: Douglas Royds 
---
 meta/classes/icecc.bbclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 49597175ca..7d94525d31 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -38,7 +38,7 @@ BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED 
ICECC_USER_PACKAGE_
 
 ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
 
-HOSTTOOLS_NONFATAL += "icecc"
+HOSTTOOLS_NONFATAL += "icecc patchelf"
 
 # This version can be incremented when changes are made to the environment that
 # invalidate the version on the compile nodes. Changing it will cause a new
@@ -326,6 +326,10 @@ set_icecc_env() {
 bbwarn "Cannot use icecc: icecc binary not found"
 return
 fi
+if [ -z "$(which patchelf patchelf-uninative)" ]; then
+bbwarn "Cannot use icecc: patchelf not found"
+return
+fi
 
 # Create symlinks to icecc in the recipe-sysroot directory
 mkdir -p ${ICE_PATH}
-- 
2.17.1

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


[OE-core] [PATCH 2/5] icecc: Trivial simplification

2018-12-19 Thread Douglas Royds
Signed-off-by: Douglas Royds 
---
 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index b251e9b5aa..d8a7894887 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -305,7 +305,7 @@ def icecc_get_and_check_tool(bb, d, tool):
 if t:
 link_path = icecc_get_tool_link(t, d)
 if link_path == get_icecc(d):
-bb.error("%s is a symlink to %s in PATH and this prevents icecc 
from working" % (t, get_icecc(d)))
+bb.error("%s is a symlink to %s in PATH and this prevents icecc 
from working" % (t, link_path))
 return ""
 else:
 return t
-- 
2.17.1

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


[OE-core] [PATCH 4/5] icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time

2018-12-19 Thread Douglas Royds
The python function icecc_path() was being invoked inline by set_icecc_env(),
meaning that it was being invoked at recipe-parsing time.
As a side-effect, icecc_path() was creating the recipe-sysroot directory and
symlinking icecc into it. Because this was done at parsing time (rather than
configure time), we were generating otherwise-empty WORKDIRs for *all* parsed
recipes, and for all virtual classes (-native, -nativesdk).
In my build, this generated more than 800 of these otherwise-empty WORKDIRs.

I have simplified icecc_path() to return only the intended path to the icecc
symlinks in the recipe-sysroot, with no side-effect.
We then create the directory and the icecc symlinks at configure time.

Because get_cross_kernel_cc() is still invoked at parse-time,
it needs a guard-clause for the non-kernel case.
We are now finding the host icecc at do_configure time,
so icecc needs to be in the HOSTTOOLS. I have made this non-fatal,
so that we can still inherit icecc without icecc installed.

Signed-off-by: Douglas Royds 
---
 meta/classes/icecc.bbclass | 62 +++---
 1 file changed, 25 insertions(+), 37 deletions(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 2171e11db0..49597175ca 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -38,6 +38,8 @@ BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED 
ICECC_USER_PACKAGE_
 
 ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
 
+HOSTTOOLS_NONFATAL += "icecc"
+
 # This version can be incremented when changes are made to the environment that
 # invalidate the version on the compile nodes. Changing it will cause a new
 # environment to be created.
@@ -98,9 +100,11 @@ DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
 
 get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
 def get_cross_kernel_cc(bb,d):
-kernel_cc = d.getVar('KERNEL_CC')
+if not icecc_is_kernel(bb, d):
+return None
 
 # evaluate the expression by the shell if necessary
+kernel_cc = d.getVar('KERNEL_CC')
 if '`' in kernel_cc or '$(' in kernel_cc:
 import subprocess
 kernel_cc = subprocess.check_output("echo %s" % kernel_cc, 
shell=True).decode("utf-8")[:-1]
@@ -113,38 +117,6 @@ def get_cross_kernel_cc(bb,d):
 def get_icecc(d):
 return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
 
-def create_path(compilers, bb, d):
-"""
-Create Symlinks for the icecc in the staging directory
-"""
-staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
-if icecc_is_kernel(bb, d):
-staging += "-kernel"
-
-#check if the icecc path is set by the user
-icecc = get_icecc(d)
-
-# Create the dir if necessary
-try:
-os.stat(staging)
-except:
-try:
-os.makedirs(staging)
-except:
-pass
-
-for compiler in compilers:
-gcc_path = os.path.join(staging, compiler)
-try:
-os.stat(gcc_path)
-except:
-try:
-os.symlink(icecc, gcc_path)
-except:
-pass
-
-return staging
-
 def use_icecc(bb,d):
 if d.getVar('ICECC_DISABLED') == "1":
 # don't even try it, when explicitly disabled
@@ -248,12 +220,11 @@ def icecc_path(bb,d):
 # don't create unnecessary directories when icecc is disabled
 return
 
+staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
 if icecc_is_kernel(bb, d):
-return create_path( [get_cross_kernel_cc(bb,d), ], bb, d)
+staging += "-kernel"
 
-else:
-prefix = d.expand('${HOST_PREFIX}')
-return create_path( [prefix+"gcc", prefix+"g++"], bb, d)
+return staging
 
 def icecc_get_external_tool(bb, d, tool):
 external_toolchain_bindir = 
d.expand('${EXTERNAL_TOOLCHAIN}${bindir_cross}')
@@ -350,6 +321,23 @@ set_icecc_env() {
 return
 fi
 
+ICECC_BIN="${@get_icecc(d)}"
+if [ -z "${ICECC_BIN}" ]; then
+bbwarn "Cannot use icecc: icecc binary not found"
+return
+fi
+
+# Create symlinks to icecc in the recipe-sysroot directory
+mkdir -p ${ICE_PATH}
+if [ -n "${KERNEL_CC}" ]; then
+compilers="${@get_cross_kernel_cc(bb,d)}"
+else
+compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++"
+fi
+for compiler in $compilers; do
+ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler
+done
+
 ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}"
 ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}"
 # cannot use icecc_get_and_check_tool here because it assumes as without 
target_sys prefix
-- 
2.17.1

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


[OE-core] [PATCH 0/5] icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time

2018-12-19 Thread Douglas Royds
The python function icecc_path() was being invoked inline by set_icecc_env(),
meaning that it was being invoked at recipe-parsing time.
As a side-effect, icecc_path() was creating the recipe-sysroot directory and
symlinking icecc into it. Because this was done at parsing time (rather than
configure time), we were generating otherwise-empty WORKDIRs for *all* parsed
recipes, and for all virtual classes (-native, -nativesdk).
In my build, this generated more than 800 of these otherwise-empty WORKDIRs.

Because we are now finding the host icecc at do_configure time, icecc needs to
be in the HOSTTOOLS. I have made this non-fatal, so that we can still inherit
icecc without icecc installed. Likewise, although we could potentially build
patchelf and all its dependencies, they would all have to be blacklisted to
avoid trying to build them with icecc. We use the host patchelf instead.
You will only receive (the flood of) warnings about the absence of build host
icecc and patchelf if you both inherit icecc and have ICECC_DISABLED = "".
I have borrowed the patchelf-uninative bit from OE's modified icecc-create-env
script, but I haven't tested it on a uninative build.

If two bitbake processes try to generate the ICECC_VERSION tarball at the same
time, the thread that fails to get the lock will wait 30 sec for the first to
finish. A syntax error meant that this was not happening and in particular, if
tarball generation failed (eg. for lack of patchelf), it did so silently.

Douglas Royds (5):
  icecc: readlink -f on the recipe-sysroot gcc/g++
  icecc: Trivial simplification
  icecc: Syntax error meant that we weren't waiting for tarball
generation
  icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time
  icecc: patchelf is needed by icecc-create-env

 meta/classes/icecc.bbclass | 72 +-
 1 file changed, 32 insertions(+), 40 deletions(-)

-- 
2.17.1

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


[OE-core] [PATCH 1/5] icecc: readlink -f on the recipe-sysroot gcc/g++

2018-12-19 Thread Douglas Royds
We were accidentally doing a readlink -f on simply 'gcc', for instance

Signed-off-by: Douglas Royds 
---
 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 2b189232cb..b251e9b5aa 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -303,7 +303,7 @@ def icecc_get_and_check_tool(bb, d, tool):
 # compiler environment package.
 t = icecc_get_tool(bb, d, tool)
 if t:
-link_path = icecc_get_tool_link(tool, d)
+link_path = icecc_get_tool_link(t, d)
 if link_path == get_icecc(d):
 bb.error("%s is a symlink to %s in PATH and this prevents icecc 
from working" % (t, get_icecc(d)))
 return ""
-- 
2.17.1

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


[OE-core] [PATCH 3/5] icecc: Syntax error meant that we weren't waiting for tarball generation

2018-12-19 Thread Douglas Royds
If two bitbake processes try to generate the ICECC_VERSION tarball at the same
time, the thread that fails to get the lock will wait 30 sec for the first to
finish. A syntax error meant that this was not happening, and in particular, if
tarball generation failed (eg. for lack of patchelf), it did so silently.

Signed-off-by: Douglas Royds 
---
 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index d8a7894887..2171e11db0 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -387,7 +387,7 @@ set_icecc_env() {
 ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" 
"${ICECC_AS}" "${ICECC_VERSION}"
 then
 touch "${ICECC_VERSION}.done"
-elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
+elif ! wait_for_file "${ICECC_VERSION}.done" 30 
 then
 # locking failed so wait for ${ICECC_VERSION}.done to appear
 bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
-- 
2.17.1

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


Re: [OE-core] [PATCH] [RFC] go.bbclass: install dependencies under $GOPATH instead of $GOROOT

2018-12-19 Thread Matt Madison
On Wed, Dec 19, 2018 at 9:51 AM Damien Riegel  wrote:
>
> To package a go application in Yocto, one needs to also package its
> dependencies to keep the build reproducible and under control. The
> default install task of the go class puts the source in ${libdir}/go/src.
>
> ${libdir}/go/src is where the standard go packages resides, aka $GOROOT.
> When a go package has dependencies on other go packages, they must be
> located under $GOPATH, otherwise errors like this one may happen:
>
>   Non-standard package  in standard package 
>
> This point of this patch is to trigger a discussion on how this issue
> can be tackled in Yocto. Following code is working but should not be
> considered for inclusion.

Can you describe the context of this a bit more?  The way go.bbclass
is set up, all of your recipe's dependencies (and their dependencies)
should already have been installed in the per-recipe sysroot (where
GOROOT lives for the current recipe's build), and should get resolved
from there. GOPATH gets set to ${B} for the current recipe's build.
Nothing in the GOROOT should be importing packages that reside in
GOPATH, which is what that particular error message is indicating. If
you're getting that error, then there might be something wrong with
recipe dependencies.

-Matt
>
> Signed-off-by: Damien Riegel 
> ---
>  meta/classes/go.bbclass | 18 +++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
> index 167d02e3fa..c0ed3211cd 100644
> --- a/meta/classes/go.bbclass
> +++ b/meta/classes/go.bbclass
> @@ -111,9 +111,9 @@ do_compile_ptest_base() {
>  do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
>
>  go_do_install() {
> -   install -d ${D}${libdir}/go/src/${GO_IMPORT}
> +   install -d ${D}/gopath/src/${GO_IMPORT} ${D}${libdir}/go
> tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' 
> --exclude 'testdata' . | \
> -   tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
> +   tar -C ${D}/gopath/src/${GO_IMPORT} --no-same-owner -xf -
> tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
>
> if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
> @@ -172,9 +172,21 @@ do_install_ptest_base() {
> chown -R root:root ${D}${PTEST_PATH}
>  }
>
> +do_fixupdeps() {
> +   gopath="${WORKDIR}/recipe-sysroot/gopath"
> +   if [ -d ${gopath} ]; then
> +   tar -C ${gopath} -cf - src | tar -C ${B} --no-same-owner -k 
> -xf -
> +   else
> +   echo "no dependencies to fixup"
> +   fi
> +}
> +
>  EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
>
> -FILES_${PN}-dev = "${libdir}/go/src"
> +addtask do_fixupdeps after do_configure before do_compile
> +
> +SYSROOT_DIRS_append = "/gopath"
> +FILES_${PN}-dev = "/gopath/src"
>  FILES_${PN}-staticdev = "${libdir}/go/pkg"
>
>  INSANE_SKIP_${PN} += "ldflags"
> --
> 2.19.2
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] libxcrypt: Fix nativesdk build with gcc9

2018-12-19 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb 
b/meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb
index 5e5d7c077c..594203a59c 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb
+++ b/meta/recipes-core/libxcrypt/libxcrypt_4.4.1.bb
@@ -25,5 +25,6 @@ S = "${WORKDIR}/git"
 
 BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99"
 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} 
-Wno-error=missing-attributes"
+CPPFLAGS_append_class-nativesdk = " -Wno-error=missing-attributes"
 
 BBCLASSEXTEND = "nativesdk"
-- 
2.20.1

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


[OE-core] [PATCH] gcc-runtime: Drop building libmpx

2018-12-19 Thread Khem Raj
libmpx is not supported any longer and infact has been removed
completely from gcc-9, see

https://github.com/gcc-mirror/gcc/commit/1e42d5c637e1b1f65dfddd0923dfb25676bb56e5

Signed-off-by: Khem Raj 
---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 29 ---
 1 file changed, 29 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc 
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 95153da20c..50ecc815a5 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -29,9 +29,6 @@ RUNTIMELIBSSP_mingw32 ?= "libssp"
 RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic 
${RUNTIMELIBITM} \
 ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', 
'', d)} \
 "
-RUNTIMETARGET_append_x86 = " libmpx"
-RUNTIMETARGET_append_x86-64 = " libmpx"
-RUNTIMETARGET_remove_libc-musl = "libmpx"
 
 # libiberty
 # libmudflap
@@ -160,18 +157,6 @@ PACKAGES = "\
 libitm-dev \
 libitm-staticdev \
 "
-PACKAGES_append_x86 = "\
-libmpx \
-libmpx-dev \
-libmpx-staticdev \
-"
-
-PACKAGES_append_x86-64 = "\
-libmpx \
-libmpx-dev \
-libmpx-staticdev \
-"
-
 # The base package doesn't exist, so we clear the recommends.
 RRECOMMENDS_${PN}-dbg = ""
 
@@ -274,17 +259,3 @@ FILES_libitm-dev = "\
 SUMMARY_libitm-dev = "GNU transactional memory support library - development 
files"
 FILES_libitm-staticdev = "${libdir}/libitm.a"
 SUMMARY_libitm-staticdev = "GNU transactional memory support library - static 
development files"
-
-
-FILES_libmpx = "${libdir}/libmpx.so.* ${libdir}/libmpxwrappers.so.*"
-SUMMARY_libmpx = "Intel Memory Protection Extension library"
-FILES_libmpx-dev = "\
-${libdir}/libmpxwrappers.so \
-${libdir}/libmpxwrappers.la \
-${libdir}/libmpx.so \
-${libdir}/libmpx.la \
-${libdir}/libmpx.spec \
-"
-SUMMARY_libmpx-dev = "Intel Memory Protection Extension library - development 
files"
-FILES_libmpx-staticdev = "${libdir}/libmpx.a ${libdir}/libmpxwrappers.a"
-SUMMARY_libmpx-staticdev = "Intel Memory Protection Extension library - static 
development files"
-- 
2.20.1

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


[OE-core] [PATCH 2/5] newlib: Move away from gcc-initial dependency

2018-12-19 Thread Khem Raj
gcc-initial step is no more needed

Signed-off-by: Khem Raj 
---
 meta/recipes-core/newlib/newlib.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/newlib/newlib.inc 
b/meta/recipes-core/newlib/newlib.inc
index c97c7c276b..c68c163266 100644
--- a/meta/recipes-core/newlib/newlib.inc
+++ b/meta/recipes-core/newlib/newlib.inc
@@ -20,7 +20,7 @@ SRC_URI[md5sum] = "81ec873108b8593c586f91ca65963952"
 SRC_URI[sha256sum] = 
"c8566335ee74e5fcaeb8595b4ebd0400c4b043d6acb3263ecb1314f8f5501332"
 
 INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc"
 
 PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
 STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-- 
2.20.1

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


[OE-core] [PATCH 3/5] libssp: Remove dependency on gcc-initial

2018-12-19 Thread Khem Raj
Its not needed anymore and it can depend on gcc-cross instead

Signed-off-by: Khem Raj 
---
 meta/recipes-core/musl/libssp-nonshared.bb | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/meta/recipes-core/musl/libssp-nonshared.bb 
b/meta/recipes-core/musl/libssp-nonshared.bb
index 458eafef52..bae8c81cc7 100644
--- a/meta/recipes-core/musl/libssp-nonshared.bb
+++ b/meta/recipes-core/musl/libssp-nonshared.bb
@@ -8,15 +8,10 @@ SECTION = "libs"
 
 SRC_URI = "file://ssp-local.c"
 
-PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
-
 INHIBIT_DEFAULT_DEPS = "1"
 
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
-
 DEPENDS = "virtual/${TARGET_PREFIX}binutils \
-   virtual/${TARGET_PREFIX}gcc-initial \
+   virtual/${TARGET_PREFIX}gcc \
 "
 
 do_configure[noexec] = "1"
-- 
2.20.1

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


[OE-core] [PATCH 5/5] base.bbclass, classextend.py: Drop catering to gcc-initial

2018-12-19 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 meta/classes/base.bbclass  | 1 -
 meta/lib/oe/classextend.py | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e6af673847..f1a3c0e53e 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -264,7 +264,6 @@ python base_eventhandler() {
 if isinstance(e, bb.event.RecipePreFinalise):
 if d.getVar("TARGET_PREFIX") == d.getVar("SDK_PREFIX"):
 d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
-d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
 d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
 d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
 d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index d2eeaf0e5c..662707b859 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -114,7 +114,7 @@ class NativesdkClassExtender(ClassExtender):
 def map_depends(self, dep):
 if dep.startswith(self.extname):
 return dep
-if dep.endswith(("-gcc-initial", "-gcc", "-g++")):
+if dep.endswith(("-gcc", "-g++")):
 return dep + "-crosssdk"
 elif dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in 
dep) or ('-cross-' in dep) or ('-crosssdk-' in dep):
 return dep
-- 
2.20.1

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


[OE-core] [PATCH 4/5] tcmode-default: Drop pinnings for gcc-initial based recipes

2018-12-19 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 meta/conf/distro/include/tcmode-default.inc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/conf/distro/include/tcmode-default.inc 
b/meta/conf/distro/include/tcmode-default.inc
index 48224ca6b9..fe24bd9b32 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -3,14 +3,12 @@
 #
 
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = 
"binutils-cross-${TARGET_ARCH}"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = 
"gcc-cross-initial-${TARGET_ARCH}"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross-${TARGET_ARCH}"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross-${TARGET_ARCH}"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime"
 PREFERRED_PROVIDER_gdb = "gdb"
 
 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk ?= 
"binutils-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc-initial = 
"gcc-crosssdk-initial-${SDK_SYS}"
 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc = "gcc-crosssdk-${SDK_SYS}"
 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_SYS}"
 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}compilerlibs = "nativesdk-gcc-runtime"
-- 
2.20.1

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


[OE-core] [PATCH 1/5] musl: Move away from gcc-initial dependency

2018-12-19 Thread Khem Raj
gcc-initial step is no more needed

Signed-off-by: Khem Raj 
---
 meta/recipes-core/musl/musl_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index 9cc875c4a6..6f6129d7c5 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -20,7 +20,7 @@ S = "${WORKDIR}/git"
 PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc 
virtual/libiconv virtual/libintl virtual/crypt"
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils \
-   virtual/${TARGET_PREFIX}gcc-initial \
+   virtual/${TARGET_PREFIX}gcc \
libgcc-initial \
linux-libc-headers \
bsd-headers \
-- 
2.20.1

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


[OE-core] [PATCH] [RFC] go.bbclass: install dependencies under $GOPATH instead of $GOROOT

2018-12-19 Thread Damien Riegel
To package a go application in Yocto, one needs to also package its
dependencies to keep the build reproducible and under control. The
default install task of the go class puts the source in ${libdir}/go/src.

${libdir}/go/src is where the standard go packages resides, aka $GOROOT.
When a go package has dependencies on other go packages, they must be
located under $GOPATH, otherwise errors like this one may happen:

  Non-standard package  in standard package 

This point of this patch is to trigger a discussion on how this issue
can be tackled in Yocto. Following code is working but should not be
considered for inclusion.

Signed-off-by: Damien Riegel 
---
 meta/classes/go.bbclass | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 167d02e3fa..c0ed3211cd 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -111,9 +111,9 @@ do_compile_ptest_base() {
 do_compile_ptest_base[dirs] =+ "${GOTMPDIR}"
 
 go_do_install() {
-   install -d ${D}${libdir}/go/src/${GO_IMPORT}
+   install -d ${D}/gopath/src/${GO_IMPORT} ${D}${libdir}/go
tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs --exclude '*.test' 
--exclude 'testdata' . | \
-   tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
+   tar -C ${D}/gopath/src/${GO_IMPORT} --no-same-owner -xf -
tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
 
if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
@@ -172,9 +172,21 @@ do_install_ptest_base() {
chown -R root:root ${D}${PTEST_PATH}
 }
 
+do_fixupdeps() {
+   gopath="${WORKDIR}/recipe-sysroot/gopath"
+   if [ -d ${gopath} ]; then
+   tar -C ${gopath} -cf - src | tar -C ${B} --no-same-owner -k -xf 
-
+   else
+   echo "no dependencies to fixup"
+   fi
+}
+
 EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
 
-FILES_${PN}-dev = "${libdir}/go/src"
+addtask do_fixupdeps after do_configure before do_compile
+
+SYSROOT_DIRS_append = "/gopath"
+FILES_${PN}-dev = "/gopath/src"
 FILES_${PN}-staticdev = "${libdir}/go/pkg"
 
 INSANE_SKIP_${PN} += "ldflags"
-- 
2.19.2

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


Re: [OE-core] [PATCH 8/9] glib-2.0: upgrade 2.58.0 -> 2.58.2

2018-12-19 Thread Burton, Ross
Sorry but anything past 2.58.1 is going to be a pain:

| /bin/bash: /usr/bin/glib-mkenums: No such file or directory
| /bin/bash: /usr/bin/glib-mkenums: No such file or directory
| ../../libsoup-2.64.2/Makefile.glib:241: recipe for target
'soup-enum-types.h.stamp' failed

The glib pkgconfig files now contain absolute paths, but they're
target paths so when we used them from a sysroot it fails.  Upstream
thinks that we should be setting
GLIB_MKENUMS=/path/to/sysroot/usr/bin/glib-mkenums but that really
doesn't scale.

For now I think we just revert the change to put absolute paths into
the sysroot.  When everything has moved to Meson in theory this is
just a matter of passing native=True to the pkgconfig function, but
that's also untested.

Ross
On Wed, 19 Dec 2018 at 07:30, Anuj Mittal  wrote:
>
> * For changes, see:
> https://gitlab.gnome.org/GNOME/glib/blob/glib-2-58/NEWS
>
> * Upstreamed patch removed: date-lt.patch
>
> * Tweaked another to remove a hunk trying to find a binary from
> glib-2.0-native which isn't needed anymore as the code is in python
> now.
>
> * Add locale-base-pl-pl to RDEPENDS for ptest as the fix has been
> resolved and merged.
>
> * Remove libdir INSANE_SKIP for ptest package. The only libs present
> here are in libexecdir which is allowed by the check.
>
> Signed-off-by: Anuj Mittal 
> ---
>  ...ble-more-tests-while-cross-compiling.patch | 42 ---
>  .../glib-2.0/glib-2.0/date-lt.patch   | 20 -
>  .../glib-2.0/glib-2.0/relocate-modules.patch  |  2 +-
>  ...{glib-2.0_2.58.0.bb => glib-2.0_2.58.2.bb} |  7 ++--
>  meta/recipes-core/glib-2.0/glib.inc   |  5 +--
>  5 files changed, 12 insertions(+), 64 deletions(-)
>  delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/date-lt.patch
>  rename meta/recipes-core/glib-2.0/{glib-2.0_2.58.0.bb => glib-2.0_2.58.2.bb} 
> (80%)
>
> diff --git 
> a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
>  
> b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
> index 50781e7892..5060880926 100644
> --- 
> a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
> +++ 
> b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
> @@ -1,4 +1,4 @@
> -From 4b1a6d247c78125096a6ea5ab3cab8a1f000dc23 Mon Sep 17 00:00:00 2001
> +From 70e462e070f8eb20b7660c1cf88271c0449e43cc Mon Sep 17 00:00:00 2001
>  From: Jussi Kukkonen 
>  Date: Mon, 9 Nov 2015 11:07:27 +0200
>  Subject: [PATCH] Enable more tests while cross-compiling
> @@ -9,17 +9,15 @@ case we can depend on glib-2.0-native.
>
>  Upstream-Status: Inappropriate [OE specific]
>  Signed-off-by: Jussi Kukkonen 
> -
>  ---
> - gio/tests/Makefile.am | 10 ++
> - tests/gobject/Makefile.am |  8 +---
> - 2 files changed, 11 insertions(+), 7 deletions(-)
> + gio/tests/Makefile.am | 10 ++
> + 1 file changed, 6 insertions(+), 4 deletions(-)
>
>  diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
> -index 1f0bed7..8295deb 100644
> +index c4e7a92..633e85c 100644
>  --- a/gio/tests/Makefile.am
>  +++ b/gio/tests/Makefile.am
> -@@ -550,10 +550,9 @@ test_programs += \
> +@@ -583,10 +583,9 @@ test_programs += \
>   endif
>
>   # 
> -
> @@ -32,7 +30,7 @@ index 1f0bed7..8295deb 100644
>   test_programs += resources
>   resources_SOURCES = resources.c
>   nodist_resources_SOURCES = test_resources.c test_resources2.c 
> test_resources2.h
> -@@ -578,7 +577,11 @@ if !ENABLE_INSTALLED_TESTS
> +@@ -611,7 +610,11 @@ if !ENABLE_INSTALLED_TESTS
>   libresourceplugin_la_LDFLAGS += -rpath /
>   endif
>
> @@ -44,7 +42,7 @@ index 1f0bed7..8295deb 100644
>
>   test-generated.txt: test1.txt
> $(AM_V_GEN) echo "Generated" > $@ && \
> -@@ -599,7 +602,6 @@ test.gresource: test.gresource.xml Makefile $(shell 
> $(glib_compile_resources) --
> +@@ -632,7 +635,6 @@ test.gresource: test.gresource.xml Makefile $(shell 
> $(glib_compile_resources) --
>
>   EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt 
> test3.gresource.xml test3.txt test4.gresource.xml
>   CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] 
> plugin_resources.c test.gresource
> @@ -52,29 +50,3 @@ index 1f0bed7..8295deb 100644
>
>   BUILT_SOURCES += giotypefuncs.inc
>
> -diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
> -index 0e60987..927d13a 100644
>  a/tests/gobject/Makefile.am
> -+++ b/tests/gobject/Makefile.am
> -@@ -51,10 +51,13 @@ if ENABLE_TIMELOOP
> - installed_test_programs += timeloop-closure
> - endif
> -
> --# The marshal test requires running a binary, which means we cannot
> --# build it when cross-compiling
> -+# The marshal test requires running a binary, which means we require
> -+# glib-native when cross-compiling
> - if !CROSS_COMPILING
> - glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
> -+else
> 

[OE-core] [thud][PATCH] go 1.9/1.11: fix textrel qa warning for non mips arch

2018-12-19 Thread Martin Jansa
From: Hongxu Jia 

While building go itself, the go build system does not support
to set `-buildmode=pie' from environment.

Add GOBUILDMODE to support it which make PIE executables the default
build mode, as PIE executables are required as of Yocto

But mips doesn't support -buildmode=pie, so skip the QA checking for
mips and its variants

Signed-off-by: Hongxu Jia 
Signed-off-by: Richard Purdie 
---
 meta/recipes-devtools/go/go-1.11.inc  |  1 +
 ...008-use-GOBUILDMODE-to-set-buildmode.patch | 40 +++
 meta/recipes-devtools/go/go-1.9.inc   |  1 +
 ...011-use-GOBUILDMODE-to-set-buildmode.patch | 40 +++
 meta/recipes-devtools/go/go_1.11.bb   | 12 ++
 meta/recipes-devtools/go/go_1.9.bb| 16 +---
 6 files changed, 104 insertions(+), 6 deletions(-)
 create mode 100644 
meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch
 create mode 100644 
meta/recipes-devtools/go/go-1.9/0011-use-GOBUILDMODE-to-set-buildmode.patch

diff --git a/meta/recipes-devtools/go/go-1.11.inc 
b/meta/recipes-devtools/go/go-1.11.inc
index c02e4683b3..d626514ae6 100644
--- a/meta/recipes-devtools/go/go-1.11.inc
+++ b/meta/recipes-devtools/go/go-1.11.inc
@@ -15,6 +15,7 @@ SRC_URI += "\
 file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
 file://0006-cmd-dist-separate-host-and-target-builds.patch \
 file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
+file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
 "
 
 SRC_URI_append_libc-musl = " 
file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
diff --git 
a/meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch 
b/meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch
new file mode 100644
index 00..b6ab504335
--- /dev/null
+++ 
b/meta/recipes-devtools/go/go-1.11/0008-use-GOBUILDMODE-to-set-buildmode.patch
@@ -0,0 +1,40 @@
+From 0e0c247f0caec23528889ff09d98348cba9028f1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Fri, 26 Oct 2018 15:02:32 +0800
+Subject: [PATCH] use GOBUILDMODE to set buildmode
+
+While building go itself, the go build system does not support
+to set `-buildmode=pie' from environment.
+
+Add GOBUILDMODE to support it which make PIE executables the default
+build mode, as PIE executables are required as of Yocto
+
+Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI
+Upstream-Status: Denied [upstream choose antoher solution: `17a256b
+cmd/go: -buildmode=pie for android/arm']
+
+Signed-off-by: Hongxu Jia 
+---
+ src/cmd/go/internal/work/build.go | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/cmd/go/internal/work/build.go 
b/src/cmd/go/internal/work/build.go
+index 145b875..595d703 100644
+--- a/src/cmd/go/internal/work/build.go
 b/src/cmd/go/internal/work/build.go
+@@ -218,7 +218,11 @@ func AddBuildFlags(cmd *base.Command) {
+ 
+   cmd.Flag.Var(, "asmflags", "")
+   cmd.Flag.Var(buildCompiler{}, "compiler", "")
+-  cmd.Flag.StringVar(, "buildmode", "default", "")
++  if bm := os.Getenv("GOBUILDMODE"); bm != "" {
++  cmd.Flag.StringVar(, "buildmode", bm, "")
++  } else {
++  cmd.Flag.StringVar(, "buildmode", "default", 
"")
++  }
+   cmd.Flag.Var(, "gcflags", "")
+   cmd.Flag.Var(, "gccgoflags", "")
+   cmd.Flag.StringVar(, "mod", "", "")
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/go/go-1.9.inc 
b/meta/recipes-devtools/go/go-1.9.inc
index 329cee061c..ba1eaa051a 100644
--- a/meta/recipes-devtools/go/go-1.9.inc
+++ b/meta/recipes-devtools/go/go-1.9.inc
@@ -19,6 +19,7 @@ SRC_URI += "\
 file://0008-make.bash-add-GOHOSTxx-indirection-for-cross-canadia.patch 
\
 file://0009-cmd-go-buildmode-pie-forces-external-linking-mode-on.patch 
\
 file://0010-make.bash-override-CC-when-building-dist-and-go_boot.patch 
\
+file://0011-use-GOBUILDMODE-to-set-buildmode.patch \
 "
 SRC_URI_append_libc-musl = " file://set-external-linker.patch"
 
diff --git 
a/meta/recipes-devtools/go/go-1.9/0011-use-GOBUILDMODE-to-set-buildmode.patch 
b/meta/recipes-devtools/go/go-1.9/0011-use-GOBUILDMODE-to-set-buildmode.patch
new file mode 100644
index 00..da93dc5c14
--- /dev/null
+++ 
b/meta/recipes-devtools/go/go-1.9/0011-use-GOBUILDMODE-to-set-buildmode.patch
@@ -0,0 +1,40 @@
+From b928fafab1d9425aae9341806bd2f6178ba1da1f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Fri, 26 Oct 2018 16:32:50 +0800
+Subject: [PATCH] use GOBUILDMODE to set buildmode
+
+While building go itself, the go build system does not support
+to set `-buildmode=pie' from environment.
+
+Add GOBUILDMODE to support it which make PIE executables the default
+build mode, as PIE executables are required as of Yocto
+
+Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI
+Upstream-Status: Denied [upstream choose antoher solution: `17a256b
+cmd/go: -buildmode=pie 

Re: [OE-core] [sumo] cherry-pick request to fix bison on glibc 2.28

2018-12-19 Thread Mike Crowe
On Tuesday 20 November 2018 at 16:44:03 +0100, Raphael Kubo da Costa wrote:
> Tim Orling  writes:
> 
> > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5e441f3f8aa896e264f44ba8b699e5841cceade4
> >
> > or
> >
> > http://git.openembedded.org/openembedded-core/commit/?id=741415c58b356576428c26efd081212eb989l
> 
> +Armin
> 
> I was going to send a patch with the backport but noticed this email.
> Would you still prefer a patch anyway?

I was just digging up the original post to reply to request the same
backport when I came across this request from nearly a month ago. The
backport is also required for Debian Buster but doesn't appear to be
present in sumo.

741415c58b356576428c26efd081212eb989 cherry-picks cleanly and works for
me.

Thanks.

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


Re: [OE-core] [thud][PATCH v2] createrepo-c: Fix setup of logging (log domains)

2018-12-19 Thread Burton, Ross
There's an upgrade for createrepo-c on the list, does that supersede this patch?

Ross
On Wed, 19 Dec 2018 at 07:12, Zheng, Ruoqin  wrote:
>
> Ping
>
> --
> Zheng Ruoqin
> Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
> ADDR.: No.6 Wenzhu Road, Software Avenue,
>Nanjing, 210012, China
> MAIL : zhengrq.f...@cn.fujistu.com
>
>
> > -Original Message-
> > From: Zheng, Ruoqin/郑 若钦
> > Sent: Tuesday, December 11, 2018 6:57 PM
> > To: openembedded-core@lists.openembedded.org
> > Cc: Zheng, Ruoqin/郑 若钦 
> > Subject: [OE-core][thud][PATCH v2] createrepo-c: Fix setup of logging (log
> > domains)
> >
> > New debug messages were added into GLib library. These messages come from
> > the "GLib" log domain and were not hidden in the standard and quiet mode of
> > the application.
> > This fix hides log messages regardless on source log domain.
> >
> > Backport from 80810f04f2de6bae6e394f52ad9cdd2189862f74.
> >
> > Signed-off-by: Zheng Ruoqin 
> > ---
> >  ...etup-of-logging-log-domains-RhBug-1645897.patch | 73
> > ++
> >  .../createrepo-c/createrepo-c_git.bb   |  1 +
> >  2 files changed, 74 insertions(+)
> >  create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c/0001-
> > Fix-setup-of-logging-log-domains-RhBug-1645897.patch
> >
> > diff --git 
> > a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Fix-setup-of-
> > logging-log-domains-RhBug-1645897.patch b/meta/recipes-devtools/createrepo-
> > c/createrepo-c/0001-Fix-setup-of-logging-log-domains-RhBug-1645897.patch
> > new file mode 100644
> > index 000..6de9c05
> > --- /dev/null
> > +++ b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Fix-setup-of-
> > +++ logging-log-domains-RhBug-1645897.patch
> > @@ -0,0 +1,73 @@
> > +From 80810f04f2de6bae6e394f52ad9cdd2189862f74 Mon Sep 17 00:00:00 2001
> > +From: Jaroslav Rohel 
> > +Date: Fri, 9 Nov 2018 07:35:13 +0100
> > +Subject: [PATCH] Fix setup of logging (log domains) (RhBug:1645897)
> > +
> > +New debug messages were added into GLib library. These messages come
> > +from the "GLib" log domain and were not hidden in the standard and
> > +quiet mode of the application.
> > +This fix hides log messages regardless on source log domain.
> > +
> > +Upstream-Status: Backport
> > +
> > +Signed-off-by: Zheng Ruoqin 
> > +---
> > + src/createrepo_shared.c | 19 ++-
> > + src/misc.c  |  5 -
> > + 2 files changed, 10 insertions(+), 14 deletions(-)
> > +
> > +diff --git a/src/createrepo_shared.c b/src/createrepo_shared.c index
> > +8a26787..7cb8ba8 100644
> > +--- a/src/createrepo_shared.c
> >  b/src/createrepo_shared.c
> > +@@ -270,24 +270,17 @@ cr_lock_repo(const gchar *repo_dir,  void
> > +cr_setup_logging(gboolean quiet, gboolean verbose)  {
> > +-g_log_set_default_handler (cr_log_fn, NULL);
> > +-
> > + if (quiet) {
> > + // Quiet mode
> > +-GLogLevelFlags levels = G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO |
> > +-G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_WARNING;
> > +-g_log_set_handler(NULL, levels, cr_null_log_fn, NULL);
> > +-g_log_set_handler("C_CREATEREPOLIB", levels, cr_null_log_fn, 
> > NULL);
> > ++GLogLevelFlags hidden_levels = G_LOG_LEVEL_MESSAGE |
> > G_LOG_LEVEL_INFO |
> > ++   G_LOG_LEVEL_DEBUG | 
> > G_LOG_LEVEL_WARNING;
> > ++g_log_set_default_handler (cr_log_fn,
> > ++ GINT_TO_POINTER(hidden_levels));
> > + } else if (verbose) {
> > + // Verbose mode
> > +-GLogLevelFlags levels = G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO |
> > +-G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_WARNING;
> > +-g_log_set_handler(NULL, levels, cr_log_fn, NULL);
> > +-g_log_set_handler("C_CREATEREPOLIB", levels, cr_log_fn, NULL);
> > ++g_log_set_default_handler (cr_log_fn, GINT_TO_POINTER(0));
> > + } else {
> > + // Standard mode
> > +-GLogLevelFlags levels = G_LOG_LEVEL_DEBUG;
> > +-g_log_set_handler(NULL, levels, cr_null_log_fn, NULL);
> > +-g_log_set_handler("C_CREATEREPOLIB", levels, cr_null_log_fn, 
> > NULL);
> > ++GLogLevelFlags hidden_levels = G_LOG_LEVEL_DEBUG;
> > ++g_log_set_default_handler (cr_log_fn,
> > ++ GINT_TO_POINTER(hidden_levels));
> > + }
> > + }
> > +diff --git a/src/misc.c b/src/misc.c
> > +index 9937480..9549a44 100644
> > +--- a/src/misc.c
> >  b/src/misc.c
> > +@@ -912,8 +912,11 @@ void
> > + cr_log_fn(const gchar *log_domain,
> > +   GLogLevelFlags log_level,
> > +   const gchar *message,
> > +-  G_GNUC_UNUSED gpointer user_data)
> > ++  gpointer user_data)
> > + {
> > ++gint hidden_log_levels = GPOINTER_TO_INT(user_data);
> > ++if (log_level & hidden_log_levels)
> > ++return;
> > + switch(log_level) {
> > + case G_LOG_LEVEL_ERROR:
> > + if 

Re: [OE-core] flto automake

2018-12-19 Thread Richard Purdie
On Wed, 2018-12-19 at 10:00 +, Burton, Ross wrote:
> On Wed, 19 Dec 2018 at 01:07, Burton, Ross 
> wrote:
> 
> > That however leads to the question of should we just change the
> > defaults? Does anything break if we use gcc-ar instead of ar?
> 
> Answer: yes.
> 
> > x86_64-poky-linux-gcc-ar  rc libgcov.a $objects
> > x86_64-poky-linux-gcc-ar: Cannot find plugin 'liblto_plugin.so'
> > Makefile:932: recipe for target 'libgcov.a' failed
> ERROR: Task (/home/ross/Yocto/poky/meta/recipes-devtools/gcc/libgcc-
> initial_8.2.bb:do_compile)
> failed with exit code '1'
> 
> I don't know enough about gcc...

The -initial compiler doesn't have lto compiled into it so you probably
need to use binutils ar for that part of the bootstrap.

Cheers,

Richard

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


Re: [OE-core] [PATCH 1/1] grub-efi-native: workaround for fedora 29

2018-12-19 Thread Burton, Ross
On Wed, 19 Dec 2018 at 07:43,  wrote:
> +Upstream-Status: Inappropriate [native]

If we're going to mark this as inappropriate then please make it clear
in the patch that its a workaround for a specific binutils and when
that stops being used we can remove it.  However isn't this a problem
when building grub on F29, even outside of Yocto?  If so then it's not
inappropriate, it's an upstream bug and they should have the fix.

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


Re: [OE-core] [PATCH 1/1] cmake-native: Set --parallel for configure

2018-12-19 Thread Burton, Ross
On Wed, 19 Dec 2018 at 06:34, Robert Yang  wrote:
> +   --parallel=${@d.getVar('PARALLEL_MAKE').replace('-j ', '')} \

See oe.utils.parallel_make_argument()

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


Re: [OE-core] flto automake

2018-12-19 Thread Burton, Ross
On Wed, 19 Dec 2018 at 01:07, Burton, Ross  wrote:

> That however leads to the question of should we just change the
> defaults? Does anything break if we use gcc-ar instead of ar?

Answer: yes.

| x86_64-poky-linux-gcc-ar  rc libgcov.a $objects
| x86_64-poky-linux-gcc-ar: Cannot find plugin 'liblto_plugin.so'
| Makefile:932: recipe for target 'libgcov.a' failed
ERROR: Task 
(/home/ross/Yocto/poky/meta/recipes-devtools/gcc/libgcc-initial_8.2.bb:do_compile)
failed with exit code '1'

I don't know enough about gcc...

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