GCC modified for the FreeChainXenon project
Find a file
Simon Marchi 1ddd41fddc
Pass PKG_CONFIG_PATH down from top-level Makefile
[Sending to binutils, gdb-patches and gcc-patches, since it touches the
top-level Makefile/configure]

I have my debuginfod library installed in a non-standard location
(/opt/debuginfod), which requires me to set
PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config.  If I just set it during
configure:

    $ PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config ./configure --with-debuginfod
    $ make

or

    $ ./configure --with-debuginfod PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config
    $ make

Then PKG_CONFIG_PATH is only present (and ignored) during the top-level
configure.  When running make (which runs gdb's and binutils'
configure), PKG_CONFIG_PATH is not set, which results in their configure
script not finding the library:

    checking for libdebuginfod >= 0.179... no
    configure: error: "--with-debuginfod was given, but libdebuginfod is missing or unusable."

Change the top-level configure/Makefile system to capture the value
passed when configuring the top-level and pass it down to
subdirectories (similar to CFLAGS, LDFLAGS, etc).

I don't know much about the top-level build system, so I really don't
know if I did this correctly.  The changes are:

 - Use AC_SUBST(PKG_CONFIG_PATH) in configure.ac, so that
   @PKG_CONFIG_PATH@ gets replaced with the actual PKG_CONFIG_PATH value
   in config files (i.e. Makefile)
 - Add a PKG_CONFIG_PATH Makefile variable in Makefile.tpl, initialized
   to @PKG_CONFIG_PATH@
 - Add PKG_CONFIG_PATH to HOST_EXPORTS in Makefile.tpl, which are the
   variables set when running the sub-configures

I initially added PKG_CONFIG_PATH to flags_to_pass, in Makefile.def, but
I don't think it's needed.  AFAIU, this defines the flags to pass down
when calling "make" in subdirectories.  We only need PKG_CONFIG_PATH to
be passed down during configure.  After that, it's captured in
gdb/config.status, so even if a "make" causes a re-configure later
(because gdb/configure has changed, for example), the PKG_CONFIG_PATH
value will be remembered.

Change-Id: I91138dfca41c43b05e53e445f62e4b27882536bf

ChangeLog:

	* configure.ac: Add AC_SUBST(PKG_CONFIG_PATH).
	* configure: Re-generate.
	* Makefile.tpl (HOST_EXPORTS): Pass PKG_CONFIG_PATH.
	(PKG_CONFIG_PATH): New.
	* Makefile.in: Re-generate.
2023-08-07 22:59:38 +02:00
c++tools Daily bump. 2023-06-23 00:16:38 +00:00
config configure: require libzstd >= 1.4.0 2023-08-07 22:59:37 +02:00
contrib Daily bump. 2023-07-14 00:16:43 +00:00
fixincludes Daily bump. 2023-06-16 00:17:18 +00:00
gcc GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
gnattools Daily bump. 2023-04-26 00:17:46 +00:00
gotools Daily bump. 2022-08-31 00:16:45 +00:00
include gprofng: a new GNU profiler 2023-08-07 22:59:38 +02:00
INSTALL
intl Daily bump. 2023-06-16 00:17:18 +00:00
libada Update copyright years. 2023-01-16 11:52:17 +01:00
libatomic GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libbacktrace GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libcc1 GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libcody Daily bump. 2023-06-16 00:17:18 +00:00
libcpp Daily bump. 2023-07-20 00:17:53 +00:00
libdecnumber Daily bump. 2023-06-16 00:17:18 +00:00
libffi GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libgcc Daily bump. 2023-07-24 00:16:51 +00:00
libgfortran GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libgm2 GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libgo cmd/go: don't collect package CGOLDFLAGS when using gccgo 2023-07-20 12:29:11 -07:00
libgomp GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libiberty GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libitm GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libobjc GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libphobos GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libquadmath GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libsanitizer GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libssp GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libstdc++-v3 GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
libvtv GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
lto-plugin GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
maintainer-scripts Daily bump. 2023-07-08 00:16:53 +00:00
zlib GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
.dir-locals.el
.gitattributes
.gitignore .gitignore: do not ignore config.h 2022-07-19 17:07:04 +03:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2023-08-03 00:17:10 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub config.sub: change mode to 755. 2021-12-21 09:10:57 +01:00
configure Pass PKG_CONFIG_PATH down from top-level Makefile 2023-08-07 22:59:38 +02:00
configure.ac Pass PKG_CONFIG_PATH down from top-level Makefile 2023-08-07 22:59:38 +02:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 GCC: Check if AR works with --plugin and rc 2023-08-07 22:59:37 +02:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Add myself as a BPF port reviewer 2023-08-07 10:26:38 -07:00
Makefile.def gprofng: a new GNU profiler 2023-08-07 22:59:38 +02:00
Makefile.in Pass PKG_CONFIG_PATH down from top-level Makefile 2023-08-07 22:59:38 +02:00
Makefile.tpl Pass PKG_CONFIG_PATH down from top-level Makefile 2023-08-07 22:59:38 +02:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.