Thread (6 messages) 6 messages, 3 authors, 2021-06-29

[Buildroot] [PATCH] boot/uboot: fix uboot build

flat view

From: Köry Maincent <kory.maincent@bootlin.com>
Date: 2021-03-25 16:34:59

Hello Thomas,

On Tue, 16 Mar 2021 23:08:52 +0100
Thomas Petazzoni [off-list ref] wrote:
Hello Kory,

On Thu,  4 Feb 2021 18:04:46 +0100
Kory Maincent [off-list ref] wrote:
quoted
The make all command run the tools/makefile on the process.
This makefile use "pkg-config" command to support static link.
The issue is the use of pkg-config configured for crosscompiling
to build binaries tools for host architecture.
To fix it, I copied the behavior of QtWebengine by using a pkg-config
executable preconfigured for host.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>  
Thanks for the patch. It would require a better commit title though, as
"fix uboot build" is very vague.
Ok I will change it for v2.
After discussing with Yann E. Morin on IRC, could you try this change
instead:

	$(TARGET_CONFIGURE_OPTS) \
	        PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
        	PKG_CONFIG_SYSROOT_DIR="/" \
	        PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
	        PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
	        PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"

The reasoning is that U-Boot anyway only uses pkg-config for host
tools, so we could just as well pass those environment variables when
building U-Boot.

Could you try this out?
This change works well, the build of U-boot ends properly.
Also, do you have a Buildroot .config to reproduce the issue? Perhaps
it would be nice to have a test case in our runtime test infrastructure.
You can find the defconfig that break the U-boot build in attachment.

Regards,

K?ry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_defconfig
Type: application/octet-stream
Size: 215 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210325/569035d6/attachment.obj>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help