aboutsummaryrefslogtreecommitdiffstats
path: root/community/gcc-avr/fix-no-system-headers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/gcc-avr/fix-no-system-headers.patch')
-rw-r--r--community/gcc-avr/fix-no-system-headers.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/community/gcc-avr/fix-no-system-headers.patch b/community/gcc-avr/fix-no-system-headers.patch
new file mode 100644
index 0000000000..c007858fbf
--- /dev/null
+++ b/community/gcc-avr/fix-no-system-headers.patch
@@ -0,0 +1,27 @@
+The normal process of building a cross compilation toolchain is:
+
+ 1. build GCC without the standard C lib
+ 2. build the standard C lib
+ 3. rebuild GCC
+ 4. rebuild the standard C lib with the new GCC
+
+But for AVR, GCC can be build successfully without (a provisionally version of)
+the standard C headers available - likely due to the lack of libstdc++ support
+for AVR. But we still need to remove the check to allow for this.
+
+--- gcc-10.2.0.orig/gcc/Makefile.in
++++ gcc-10.2.0/gcc/Makefile.in
+@@ -3156,13 +3156,6 @@
+ sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
+ multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
+ fix_dir=include-fixed$${multi_dir}; \
+- if ! $(inhibit_libc) && test ! -d ${BUILD_SYSTEM_HEADER_DIR}; then \
+- echo The directory that should contain system headers does not exist: >&2 ; \
+- echo " ${BUILD_SYSTEM_HEADER_DIR}" >&2 ; \
+- tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
+- if test "x${BUILD_SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \
+- then sleep 1; else exit 1; fi; \
+- fi; \
+ $(mkinstalldirs) $${fix_dir}; \
+ chmod a+rx $${fix_dir} || true; \
+ (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \