Skip to contentSkip to conversation

package/Makefile.in: synchronize pkg-config settings between HOST_{CONFIGURE_OPTS, MAKE_ENV}

PATCH New Peter Korsgaard 2 participants 3 messages Oct 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/Makefile.in: synchronize pkg-config settings between HOST_{CONFIGURE_OPTS, MAKE_ENV}

The pkg-config settings in HOST_CONFIGURE_OPTS and HOST_MAKE_ENV have diverged over time, so they now used different _LIBDIR and _ALLOW_SYSTEM_{CFLAGS,LIBS} settings.

Conceptually _CONFIGURE_OPTS should be a superset of _MAKE_ENV, so move the definitions around and define _CONFIGURE_OPTS in terms of _MAKE_ENV instead of repeating the individual settings.

Do this both for the target and host variant for consistency.

---
 package/Makefile.in | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)
package/Makefile.in +11 -14
index b4a4c60..98e30b4 100644
@@ -235,8 +235,10 @@ export PERL=$(shell which perl)
 # finds this perl module by exporting the proper value for PERL5LIB.
 export PERL5LIB=$(HOST_DIR)/usr/lib/perl
 
+TARGET_MAKE_ENV = PATH=$(BR_PATH)
+
 TARGET_CONFIGURE_OPTS = \
-	PATH=$(BR_PATH) \
+	$(TARGET_MAKE_ENV) \
 	AR="$(TARGET_AR)" \
 	AS="$(TARGET_AS)" \
 	LD="$(TARGET_LD)" \
@@ -275,11 +277,17 @@ TARGET_CONFIGURE_OPTS = \
 	STAGING_DIR="$(STAGING_DIR)" \
 	INTLTOOL_PERL=$(PERL)
 
-TARGET_MAKE_ENV = PATH=$(BR_PATH)
 
+HOST_MAKE_ENV = \
+	PATH=$(BR_PATH) \
+	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)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig"
 
 HOST_CONFIGURE_OPTS = \
-	PATH=$(BR_PATH) \
+	$(HOST_MAKE_ENV) \
 	AR="$(HOSTAR)" \
 	AS="$(HOSTAS)" \
 	LD="$(HOSTLD)" \
@@ -294,19 +302,8 @@ HOST_CONFIGURE_OPTS = \
 	CFLAGS="$(HOST_CFLAGS)" \
 	CXXFLAGS="$(HOST_CXXFLAGS)" \
 	LDFLAGS="$(HOST_LDFLAGS)" \
-	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
-	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
-	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-	PKG_CONFIG_SYSROOT_DIR="/" \
-	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \
 	INTLTOOL_PERL=$(PERL)
 
-HOST_MAKE_ENV = \
-	PATH=$(BR_PATH) \
-	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-	PKG_CONFIG_SYSROOT_DIR="/" \
-	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"
-
 # This is extra environment we can not export ourselves (eg. because some
 # packages use that variable internally, eg. uboot), so we have to
 # explicitly pass it to user-supplied external hooks (eg. post-build,
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 package/Makefile.in: synchronize pkg-config settings between HOST_{CONFIGURE_OPTS, MAKE_ENV}

Quoted 11 lines · Peter Korsgaard

The pkg-config settings in HOST_CONFIGURE_OPTS and HOST_MAKE_ENV have diverged over time, so they now used different _LIBDIR and _ALLOW_SYSTEM_{CFLAGS,LIBS} settings.

Conceptually _CONFIGURE_OPTS should be a superset of _MAKE_ENV, so move the definitions around and define _CONFIGURE_OPTS in terms of _MAKE_ENV instead of repeating the individual settings.

Do this both for the target and host variant for consistency.

Regards,
Arnout

Quoted 61 lines
---
 package/Makefile.in | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)
package/Makefile.in +11 -14
index b4a4c60..98e30b4 100644
@@ -235,8 +235,10 @@ export PERL=$(shell which perl)
 # finds this perl module by exporting the proper value for PERL5LIB.
 export PERL5LIB=$(HOST_DIR)/usr/lib/perl
 
+TARGET_MAKE_ENV = PATH=$(BR_PATH)
+
 TARGET_CONFIGURE_OPTS = \
-	PATH=$(BR_PATH) \
+	$(TARGET_MAKE_ENV) \
 	AR="$(TARGET_AR)" \
 	AS="$(TARGET_AS)" \
 	LD="$(TARGET_LD)" \
@@ -275,11 +277,17 @@ TARGET_CONFIGURE_OPTS = \
 	STAGING_DIR="$(STAGING_DIR)" \
 	INTLTOOL_PERL=$(PERL)
 
-TARGET_MAKE_ENV = PATH=$(BR_PATH)
 
+HOST_MAKE_ENV = \
+	PATH=$(BR_PATH) \
+	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)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig"
 
 HOST_CONFIGURE_OPTS = \
-	PATH=$(BR_PATH) \
+	$(HOST_MAKE_ENV) \
 	AR="$(HOSTAR)" \
 	AS="$(HOSTAS)" \
 	LD="$(HOSTLD)" \
@@ -294,19 +302,8 @@ HOST_CONFIGURE_OPTS = \
 	CFLAGS="$(HOST_CFLAGS)" \
 	CXXFLAGS="$(HOST_CXXFLAGS)" \
 	LDFLAGS="$(HOST_LDFLAGS)" \
-	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
-	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
-	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-	PKG_CONFIG_SYSROOT_DIR="/" \
-	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \
 	INTLTOOL_PERL=$(PERL)
 
-HOST_MAKE_ENV = \
-	PATH=$(BR_PATH) \
-	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
-	PKG_CONFIG_SYSROOT_DIR="/" \
-	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"
-
 # This is extra environment we can not export ourselves (eg. because some
 # packages use that variable internally, eg. uboot), so we have to
 # explicitly pass it to user-supplied external hooks (eg. post-build,
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#2 lore raw

PATCH 1/1 package/Makefile.in: synchronize pkg-config settings between HOST_{CONFIGURE_OPTS, MAKE_ENV}

In reply to Peter Korsgaard
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

The pkg-config settings in HOST_CONFIGURE_OPTS and HOST_MAKE_ENV have diverged over time, so they now used different _LIBDIR and _ALLOW_SYSTEM_{CFLAGS,LIBS} settings.

Quoted 7 lines

Conceptually _CONFIGURE_OPTS should be a superset of _MAKE_ENV, so move the definitions around and define _CONFIGURE_OPTS in terms of _MAKE_ENV instead of repeating the individual settings.

Do this both for the target and host variant for consistency.

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard