From c916e3a43797594dc932df45f5ddd6af1ab4b978 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 30 Dec 2016 02:39:18 -0600 Subject: [PATCH] libpkgconf: client: filter all of the path-related GCC environment variables listed in the GCC manual (not just the ones in pkg-config) --- libpkgconf/client.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libpkgconf/client.c b/libpkgconf/client.c index 4ddc13d..139098c 100644 --- a/libpkgconf/client.c +++ b/libpkgconf/client.c @@ -56,8 +56,13 @@ pkgconf_client_init(pkgconf_client_t *client, pkgconf_error_handler_func_t error pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_LIBRARY_PATH", SYSTEM_LIBDIR, &client->filter_libdirs); pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_INCLUDE_PATH", SYSTEM_INCLUDEDIR, &client->filter_includedirs); + + /* GCC uses these environment variables to define system include paths, so we should check them. */ + pkgconf_path_build_from_environ("LIBRARY_PATH", NULL, &client->filter_libdirs); + pkgconf_path_build_from_environ("CPATH", NULL, &client->filter_includedirs); pkgconf_path_build_from_environ("C_INCLUDE_PATH", NULL, &client->filter_includedirs); pkgconf_path_build_from_environ("CPLUS_INCLUDE_PATH", NULL, &client->filter_includedirs); + pkgconf_path_build_from_environ("OBJC_INCLUDE_PATH", NULL, &client->filter_includedirs); } /*