[Bug bootstrap/115416] [13/14/15 regression] Setting --includedir to a nonexistent directory causes a build error since r13-5490-g59e4c98173a79f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115416 --- Comment #5 from Marcus Calhoun-Lopez --- (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.
[Bug bootstrap/115416] [13/14/15 regression] Setting --includedir to a nonexistent directory causes a build error since r13-5490-g59e4c98173a79f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115416 --- Comment #4 from Marcus Calhoun-Lopez --- (In reply to YunQiang Su from comment #2) > Can you give me the configure command, so that I can have a test. The pertinent part of the configure command is `configure --prefix=/opt/local --includedir=/opt/local/include/gcc --libdir=/opt/local/lib/libgcc`
[Bug bootstrap/115416] New: Setting --includedir to a nonexistent directory causes a build error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115416 Bug ID: 115416 Summary: Setting --includedir to a nonexistent directory causes a build error Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: marcuscalhounlopez at gmail dot com Target Milestone: --- A change made earlier this year[1] is causing troubles on the MacPorts build of GCC. MacPorts sets `--includedir=` to a directory that does not exist until after the build is complete. Since `@includedir@` is not `$(prefix)/include` and `$(prefix)/include` does not exist during the build, the Makefile exits[2]. [1] https://gcc.gnu.org/g:59e4c98173a79fcaa2c33253261409f38856c384 [2] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/Makefile.in;h=6001c9e3b559a90291b4d571c2410db6da4ede94;hb=59e4c98173a79fcaa2c33253261409f38856c384#l3273