From: YunQiang Su <yunqiang.su@cipunited.com>
To: gcc-patches@gcc.gnu.org
Cc: aurelien@aurel32.net, adhemerval.zanella@linaro.org,
jiaxun.yang@flygoat.com, macro@orcam.me.uk, syq@debian.org,
YunQiang Su <yunqiang.su@cipunited.com>
Subject: [PATCH] Set CROSS_SYSTEM_HEADER_DIR according includedir
Date: Fri, 6 Jan 2023 18:25:20 +0800 [thread overview]
Message-ID: <20230106102520.3949796-1-yunqiang.su@cipunited.com> (raw)
For cross building with option:
--sysroot=/ --prefix=/usr --includedir=/usr/<triple>
just like Debian does, fixinc.sh will use the wrong header files
from /usr/include.
gcc/
* Makefile.in (CROSS_SYSTEM_HEADER_DIR): set according the
value of includedir.
---
gcc/Makefile.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 6aed2cda3ca..6001c9e3b55 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -532,7 +532,11 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
-CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+ifeq (@includedir@,$(prefix)/include)
+ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+else
+ CROSS_SYSTEM_HEADER_DIR = @includedir@
+endif
# autoconf sets SYSTEM_HEADER_DIR to one of the above.
# Purge it of unnecessary internal relative paths
--
2.30.2
reply other threads:[~2023-01-06 10:25 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=20230106102520.3949796-1-yunqiang.su@cipunited.com \
--to=yunqiang.su@cipunited.com \
--cc=adhemerval.zanella@linaro.org \
--cc=aurelien@aurel32.net \
--cc=gcc-patches@gcc.gnu.org \
--cc=jiaxun.yang@flygoat.com \
--cc=macro@orcam.me.uk \
--cc=syq@debian.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).