Skip to content

Commit 9fcc02c

Browse files
committed
Don't include subproject headers with -I
Use -iquote instead. This prevents our include paths from messing up the system headers depended upon by libstdc++. (The specific problem was syscall.h in fesvr/, which was interfering with libstdc++'s dependence on the system's syscall.h for SYS_futex.) Subproject headers can now be included in the following ways: #include "foo.h" // for a header local to this subproject #include <bar/baz.h>" // for a header in another subproject But no longer: #include <baz.h> // for a header in any subproject As a special case, libfdt needs itself to be added to the -I path, because their coding style is to use angle brackets for local headers.
1 parent 567e687 commit 9fcc02c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ install_exes_dir := $(INSTALLDIR)/bin
6969
sprojs := @subprojects@
7070
sprojs_enabled := @subprojects_enabled@
7171

72-
sprojs_include := -I. -I$(src_dir) $(addprefix -I$(src_dir)/, $(sprojs_enabled))
72+
sprojs_include := -iquote . -I$(src_dir) $(addprefix -iquote $(src_dir)/, $(sprojs_enabled))
7373
VPATH := $(addprefix $(src_dir)/, $(sprojs_enabled))
7474

7575
#-------------------------------------------------------------------------

fdt/fdt.mk.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ fdt_c_srcs = \
1515
fdt_empty_tree.c \
1616
fdt_addresses.c \
1717
fdt_overlay.c \
18+
19+
fdt_CFLAGS = -I$(src_dir)/fdt

0 commit comments

Comments
 (0)