aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-03-10 12:01:40 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2023-03-10 12:06:42 -0800
commita980a7d24b9ab416a70880182d4e6b4975967d38 (patch)
treecddf3a8c3599d85a973132db1ffc1637d48c863c /gdb
parentcb7fd28390b6bfae52ba8a45bcf45794c090a0ae (diff)
downloadgdb-a980a7d24b9ab416a70880182d4e6b4975967d38.zip
gdb-a980a7d24b9ab416a70880182d4e6b4975967d38.tar.gz
gdb-a980a7d24b9ab416a70880182d4e6b4975967d38.tar.bz2
PR gdb/30214: Prefer local include paths to system include paths
Some systems may install binutils headers into a system location (e.g. /usr/local/include on FreeBSD) which may also include headers for other external packages used by GDB such as zlib or zstd. If a system include path such as /usr/local/include is added before local include paths to directories within a clone or release tarball, then headers from the external binutils package are used which can result in build failures if the external binutils package is out of sync with the version of GDB being built. To fix, sort the include paths in INTERNAL_CFLAGS_BASE to add CFLAGS for "local" componenets before external components. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30214 Reviewed-By: Tom Tromey <tom@tromey.com> (cherry picked from commit a2fbb6903889c8fe32f4f3b890ef4b8c565d6b84)
Diffstat (limited to 'gdb')
-rw-r--r--gdb/Makefile.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 321a58c..fa7c81a 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -629,8 +629,8 @@ INTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ \
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
INTERNAL_CFLAGS_BASE = \
$(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
- $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
- $(ZSTD_CFLAGS) $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
+ $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
+ $(READLINE_CFLAGS) $(ZLIBINC) $(ZSTD_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
$(INTL_CFLAGS) $(INCGNU) $(INCSUPPORT) $(LIBBACKTRACE_INC) \
$(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS) $(SRCHIGH_CFLAGS) \
$(TOP_CFLAGS) $(PTHREAD_CFLAGS) $(DEBUGINFOD_CFLAGS)