From ede738758e34fca6bff735e472d63e5e06024654 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Fri, 16 Jun 2017 09:10:12 +0200 Subject: qtbase: prevent extra leading / on system include and lib directories PKG_CONFIG_SYSROOT should not be set because MXE uses fully qualified paths. However, to satisfy the Qt build system's cross-compiling "sanity check", qtbase.mk defines PKG_CONFIG_SYSROOT_DIR=/ This causes pkg-config to prefix the system include and library paths with an extra /. Pkg-config does not strip these prefixed paths from --cflags and --libs output. The workaround here is to remove the PKG_CONFIG_SYSROOT_DIR definition in the wrapper script for pkg-config. --- src/pkgconf.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkgconf.mk b/src/pkgconf.mk index 2bdab5f..14a67bd 100644 --- a/src/pkgconf.mk +++ b/src/pkgconf.mk @@ -22,6 +22,7 @@ define $(PKG)_BUILD # create pkg-config script (echo '#!/bin/sh'; \ echo 'PKG_CONFIG_PATH="$(PREFIX)/$(TARGET)/qt5/lib/pkgconfig":"$$PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))" \ + PKG_CONFIG_SYSROOT_DIR= \ PKG_CONFIG_LIBDIR="$(PREFIX)/$(TARGET)/lib/pkgconfig" \ PKG_CONFIG_SYSTEM_INCLUDE_PATH="$(PREFIX)/$(TARGET)/include" \ exec "$(PREFIX)/$(BUILD)/bin/pkgconf" $(if $(BUILD_STATIC),--static) "$$@"') \ -- cgit v0.12