mirror of
https://github.com/openwrt/openwrt.git
synced 2025-08-12 22:26:10 +08:00

In order to solve the problem of the possibility that the "stack" binary is incorrectly included as a header while the compiler looks for the standard C++ header "stack", a workaround forcing a dependency between building "stack" and the C++ program was introduced. This upstream fix uses the compiler "-iquote" option in order to avoid looking for standard headers in the current working directory and blocks the default inclusion of "-I ." to the compiler flags. The upstream fix happens to be incomplete, so add an extra patch to fix an additional instance and then remove the workaround. Also, adjust the way DEFAULT_INCLUDES is overridden in the build Makefile by using the "-iquote" option in the same manner in order to remove all instances of the default inclusion for the current directory. Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
13 lines
493 B
Diff
13 lines
493 B
Diff
--- a/src/Makefile.am
|
|
+++ b/src/Makefile.am
|
|
@@ -21,7 +21,8 @@ DEFS += $(YYDEBUG) -DDEBUGPRED=@DEBUGPRE
|
|
-DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
|
|
|
|
DEFAULT_INCLUDES =
|
|
-AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
|
|
+AM_CPPFLAGS = -iquote . -iquote $(srcdir) -I$(top_srcdir)/lib \
|
|
+ -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
|
|
-I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \
|
|
-I$(srcdir)/../libdwfl -I$(srcdir)/../libasm -I../debuginfod
|
|
|