Skip to contentSkip to conversation

package/dtc: needs host-pkgconf unconditionally

PATCH New Yann E. MORIN 3 participants 3 messages Nov 3, 2019 – Nov 9, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/dtc: needs host-pkgconf unconditionally

Commits 495e757d2 (package/dtc: add optional libyaml dependency) and e43d9072a (package/dtc: fix build without libyaml), added a conditional dependency to host-pkgconf, when libyaml is enabled, while commit 56d6dd453 (package/dtc: disable valgrind) explicitly disabled support of valgrind.

However, presence of libyaml, as well as that of valgrind, *is* detected by calling pkg-config:

    NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?)
    NO_YAML := $(shell $(PKG_CONFIG) --exists yaml-0.1; echo $$?)

Passing NO_YAML=1 or NO_VALGRIND=1 do not prevent the tests from being executed, which would yield messages like:

/bin/sh: 1: /home/ymorin/dev/buildroot/O/host/bin/pkg-config: not found

(note however that, even if the test is executed, the value we pass on the command line still takes precedence, and the support for either is properly disabled.)

So, move the dependency on host-pkgconfig out of the condition. Ditto for the host package.

Cc Fabrice Fontaine <[email protected]>
Cc Titouan Christophe <[email protected]>
Cc Carlos Santos <[email protected]>
---
 package/dtc/dtc.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/dtc/dtc.mk +3 -3
index 7fde0dc968..e0050416ce 100644
@@ -10,8 +10,8 @@ DTC_SITE = https://www.kernel.org/pub/software/utils/dtc
 DTC_LICENSE = GPL-2.0+ or BSD-2-Clause (library)
 DTC_LICENSE_FILES = README.license GPL BSD-2-Clause
 DTC_INSTALL_STAGING = YES
-DTC_DEPENDENCIES = host-bison host-flex
-HOST_DTC_DEPENDENCIES = host-bison host-flex
+DTC_DEPENDENCIES = host-bison host-flex host-pkgconf
+HOST_DTC_DEPENDENCIES = host-bison host-flex host-pkgconf
 
 DTC_MAKE_OPTS = \
 	PREFIX=/usr \
@@ -25,7 +25,7 @@ HOST_DTC_MAKE_OPTS = \
 	NO_YAML=1
 
 ifeq ($(BR2_PACKAGE_LIBYAML),y)
-DTC_DEPENDENCIES += host-pkgconf libyaml
+DTC_DEPENDENCIES += libyaml
 else
 DTC_MAKE_OPTS += NO_YAML=1
 endif
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/dtc: needs host-pkgconf unconditionally

Quoted 24 lines · On Sun, 3 Nov 2019 11:42:06 +0100 "Yann E. MORIN" <[email protected]>…

Commits 495e757d2 (package/dtc: add optional libyaml dependency) and e43d9072a (package/dtc: fix build without libyaml), added a conditional dependency to host-pkgconf, when libyaml is enabled, while commit 56d6dd453 (package/dtc: disable valgrind) explicitly disabled support of valgrind.

However, presence of libyaml, as well as that of valgrind, *is* detected by calling pkg-config:

    NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?)
    NO_YAML := $(shell $(PKG_CONFIG) --exists yaml-0.1; echo $$?)

Passing NO_YAML=1 or NO_VALGRIND=1 do not prevent the tests from being executed, which would yield messages like:

/bin/sh: 1: /home/ymorin/dev/buildroot/O/host/bin/pkg-config: not found

(note however that, even if the test is executed, the value we pass on the command line still takes precedence, and the support for either is properly disabled.)

So, move the dependency on host-pkgconfig out of the condition. Ditto for the host package.

Quoted 7 lines
Cc Fabrice Fontaine <[email protected]>
Cc Titouan Christophe <[email protected]>
Cc Carlos Santos <[email protected]>
---
 package/dtc/dtc.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/dtc: needs host-pkgconf unconditionally

In reply to Yann E. MORIN
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Commits 495e757d2 (package/dtc: add optional libyaml dependency) and e43d9072a (package/dtc: fix build without libyaml), added a conditional dependency to host-pkgconf, when libyaml is enabled, while commit 56d6dd453 (package/dtc: disable valgrind) explicitly disabled support of valgrind.

However, presence of libyaml, as well as that of valgrind, *is* detected by calling pkg-config:

    NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?)
    NO_YAML := $(shell $(PKG_CONFIG) --exists yaml-0.1; echo $$?)

Passing NO_YAML=1 or NO_VALGRIND=1 do not prevent the tests from being executed, which would yield messages like:

/bin/sh: 1: /home/ymorin/dev/buildroot/O/host/bin/pkg-config: not found

(note however that, even if the test is executed, the value we pass on the command line still takes precedence, and the support for either is properly disabled.)

Quoted 7 lines

So, move the dependency on host-pkgconfig out of the condition. Ditto for the host package.

Cc Fabrice Fontaine <[email protected]>
Cc Titouan Christophe <[email protected]>
Cc Carlos Santos <[email protected]>

Committed to 2019.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard