public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-5490] Set CROSS_SYSTEM_HEADER_DIR according includedir
@ 2023-01-30  9:16 YunQiang Su
  0 siblings, 0 replies; only message in thread
From: YunQiang Su @ 2023-01-30  9:16 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:59e4c98173a79fcaa2c33253261409f38856c384

commit r13-5490-g59e4c98173a79fcaa2c33253261409f38856c384
Author: YunQiang Su <yunqiang.su@cipunited.com>
Date:   Fri Jan 6 18:15:28 2023 +0800

    Set CROSS_SYSTEM_HEADER_DIR according includedir
    
    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.

Diff:
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-30  9:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30  9:16 [gcc r13-5490] Set CROSS_SYSTEM_HEADER_DIR according includedir YunQiang Su

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).