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.
This commit is contained in:
Mark Brand 2017-06-16 09:10:12 +02:00
parent 49c892298d
commit ede738758e
1 changed files with 1 additions and 0 deletions

View File

@ -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) "$$@"') \