summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 7656c492da..f91a4c5d66 100644
--- a/Makerules
+++ b/Makerules
@@ -134,6 +134,14 @@ $(common-objpfx)cstdlib: $(c++-cstdlib-header)
$(common-objpfx)cmath: $(c++-cmath-header)
$(INSTALL_DATA) $< $@T
$(move-if-change) $@T $@
+ifneq (,$(c++-bits-std_abs-h))
+# Also make a copy of <bits/std_abs.h> from GCC 7 to prevent it from
+# including /usr/include/stdlib.h.
+before-compile := $(common-objpfx)bits/std_abs.h $(before-compile)
+$(common-objpfx)bits/std_abs.h: $(c++-bits-std_abs-h)
+ $(INSTALL_DATA) $< $@T
+ $(move-if-change) $@T $@
+endif
endif
before-compile := $(common-objpfx)libc-abis.h $(before-compile)