public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: John Baldwin <jhb@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb/gdb-13-branch] PR gdb/30214: Prefer local include paths to system include paths
Date: Fri, 10 Mar 2023 20:09:21 +0000 (GMT)	[thread overview]
Message-ID: <20230310200921.1832F3858CDA@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a980a7d24b9ab416a70880182d4e6b4975967d38

commit a980a7d24b9ab416a70880182d4e6b4975967d38
Author: John Baldwin <jhb@FreeBSD.org>
Date:   Fri Mar 10 12:01:40 2023 -0800

    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)

Diff:
---
 gdb/Makefile.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 321a58c4635..fa7c81a0fab 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)

                 reply	other threads:[~2023-03-10 20:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230310200921.1832F3858CDA@sourceware.org \
    --to=jhb@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).