https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115416
--- Comment #5 from Marcus Calhoun-Lopez <marcuscalhounlopez at gmail dot com> --- (In reply to YunQiang Su from comment #3) > Since it doesn't exist, why use --includedir with it? /opt/local/include/gcc is where the header files will be installed after the build, so there is no reason for it to exist before the build. > Anyway, so, maybe we should detect the existence of this dir. > Can you have a try of this patch? > > --- a/gcc/Makefile.in > +++ b/gcc/Makefile.in > @@ -560,10 +560,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. > -ifeq (@includedir@,$(prefix)/include) > - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ > -else > - CROSS_SYSTEM_HEADER_DIR = @includedir@ > +CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ > +ifneq (@includedir@,$(prefix)/include) > + ifneq (,$(wildcard @includedir@)) > + CROSS_SYSTEM_HEADER_DIR = @includedir@ > + endif > endif Yes, this seems to work. Thank you very much.