Skip to contentSkip to conversation

package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV

PATCH New Tal Zilcer 3 participants 4 messages Jul 2, 2015 – Jul 4, 2015

lore
Share & tools
lore

Tal Zilcer

author
#0 lore raw

PATCH 1/1 package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV

From: Tal Zilcer <[email protected]>

When building a configuration editor we assume its for the HOST. However some packages might define MAKE_ENV as TARGET_MAKE_NEV. Using this variable adds to beginning of $(PATH),
the directory $(HOST_DIR)/usr/bin.

This cause us to not use pkg-config from our host machine but the one from $(HOST_DIR)/usr/bin. This pkg-config does not support QT.
Now when we try to run for example linux-xconfig we fail since QT is not found.

To overcome this we defined a dedicated variable for the configuration editors

---
 package/pkg-kconfig.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/pkg-kconfig.mk +1 -1
index c86c340..48ab6ff 100644
@@ -109,7 +109,7 @@ endif
 #
 $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR)
 $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
-	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
 		$$($(2)_KCONFIG_OPTS) $$(subst $(1)-,,$$@)
 	rm -f $$($(2)_DIR)/.stamp_{kconfig_fixup_done,configured,built}
 	rm -f $$($(2)_DIR)/.stamp_{target,staging,images}_installed
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV

Dear Tal Zilcer,

package/pkg-kconfig.mk endif · line 112

Quoted 4 lines · Tal Zilcer

$$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR) $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done

package/pkg-kconfig.mk +1 -1
-	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \

I actually don't think adding a KCONFIG_EDITORS_MAKE_ENV variable is really useful here. Since it's a bunch of host tools, maybe we should just:

	$$(HOST_MAKE_ENV) $$(MAKE) -C ...

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV

Tal, All,

On 2015-07-02 17:59 +0200, Thomas Petazzoni spake thusly:

Quoted 11 lines · Tal Zilcer

package/pkg-kconfig.mk endif · line 112

Quoted 5 lines

$$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR) $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done

package/pkg-kconfig.mk +1 -1
-	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \

I actually don't think adding a KCONFIG_EDITORS_MAKE_ENV variable is really useful here. Since it's a bunch of host tools, maybe we should just:

Quoted 1 line
	$$(HOST_MAKE_ENV) $$(MAKE) -C ...

I do agree with Thomas here.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV

Dear Yann E. MORIN,

Quoted 12 lines · Yann E. MORIN

On 2015-07-02 17:59 +0200, Thomas Petazzoni spake thusly:

Quoted 11 lines · Tal Zilcer

package/pkg-kconfig.mk endif · line 112

Quoted 5 lines

$$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR) $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done

package/pkg-kconfig.mk +1 -1
-	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \

I actually don't think adding a KCONFIG_EDITORS_MAKE_ENV variable is really useful here. Since it's a bunch of host tools, maybe we should just:

Quoted 3 lines
Quoted 1 line
	$$(HOST_MAKE_ENV) $$(MAKE) -C ...

I do agree with Thomas here.

Except that it doesn't work: HOST_MAKE_ENV defines:

        PKG_CONFIG_SYSROOT_DIR="/" \
        PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"

So this is perfectly OK to force pkg-config to find libraries built for the host instead of the target. However, since we're passing PKG_CONFIG_LIBDIR, we completely override the default pkg-config search path, so it does not even check for libraries installed system-wide, it only searches for libraries we have installed in $(HOST_DIR). And since Qt is not built by us, it doesn't work.

Using PKG_CONFIG_PATH would allow to search for the host installed libraries. However, our pkg-config wrapper enforces the use of the cross-PKG_CONFIG_LIBDIR if no PKG_CONFIG_LIBDIR value is passed.

Bottom line, using $(HOST_MAKE_ENV) is clearly not sufficient to solve the problem.

So we have to decide whether we want to use the system-provided pkg-config, or our own pkg-config. But since linux does not depend on host-pkgconf, maybe we should simply just use the one available on the system, since we anyway don't build ncurses/qt/gtk ourselves for the configuration interfaces. If that's what we want to do, I would then suggest to do pass any variable in the make environment.

Yann, what do you think?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com