mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
pkg-config: add --with-sysroot option for compiled in default sysroot setting
Similar to the --with-pc-path option. It works just like the existing PKG_CONFIG_SYSROOT_DIR environment variable, but compiled in. The environment variable overrides this default setting if set. This way we don't need to pass PKG_CONFIG_SYSROOT_DIR in the environment when building for the target, and it is easier to reuse pkg-config outside BR (E.G. for the SDK) without having to setup special environment variables. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
@@ -218,9 +218,7 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
|
||||
CXXFLAGS="$(TARGET_CXXFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
FCFLAGS="$(TARGET_FCFLAGS)" \
|
||||
PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
|
||||
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
|
||||
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
|
||||
PERLLIB="$(HOST_DIR)/usr/lib/perl" \
|
||||
STAGING_DIR="$(STAGING_DIR)"
|
||||
|
||||
@@ -242,6 +240,7 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
|
||||
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" \
|
||||
PERLLIB="$(HOST_DIR)/usr/lib/perl" \
|
||||
LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
|
||||
|
||||
Reference in New Issue
Block a user