gnu: gcc@9: Fix limits.h include for cross builds.

This allows us to supply gcc-9 as an optional argument to cross-gcc,
successfully constructing gcc-9-based cross-compilers.

* gnu/packages/gcc.scm (gcc-9)[source](patches): Add
  "gcc-9-asan-fix-limits-include.patch".
* gnu/packages/patches/gcc-9-asan-fix-limits-include.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add the patch.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Carl Dong 2019-05-05 14:35:13 +00:00 committed by Ludovic Courtès
parent 83b0a7f41b
commit 0e293f75f1
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 15 additions and 0 deletions

View File

@ -817,6 +817,7 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-6-source-date-epoch-2.patch \ %D%/packages/patches/gcc-6-source-date-epoch-2.patch \
%D%/packages/patches/gcc-8-cross-environment-variables.patch \ %D%/packages/patches/gcc-8-cross-environment-variables.patch \
%D%/packages/patches/gcc-8-strmov-store-file-names.patch \ %D%/packages/patches/gcc-8-strmov-store-file-names.patch \
%D%/packages/patches/gcc-9-asan-fix-limits-include.patch \
%D%/packages/patches/gcc-9-strmov-store-file-names.patch \ %D%/packages/patches/gcc-9-strmov-store-file-names.patch \
%D%/packages/patches/gd-CVE-2018-5711.patch \ %D%/packages/patches/gd-CVE-2018-5711.patch \
%D%/packages/patches/gd-CVE-2018-1000222.patch \ %D%/packages/patches/gd-CVE-2018-1000222.patch \

View File

@ -531,6 +531,7 @@ It also includes runtime support libraries for these languages.")))
(base32 (base32
"1817nc2bqdc251k0lpc51cimna7v68xjrnvqzvc50q3ax4s6i9kr")) "1817nc2bqdc251k0lpc51cimna7v68xjrnvqzvc50q3ax4s6i9kr"))
(patches (search-patches "gcc-9-strmov-store-file-names.patch" (patches (search-patches "gcc-9-strmov-store-file-names.patch"
"gcc-9-asan-fix-limits-include.patch"
"gcc-5.0-libvtv-runpath.patch")))))) "gcc-5.0-libvtv-runpath.patch"))))))
;; Note: When changing the default gcc version, update ;; Note: When changing the default gcc version, update

View File

@ -0,0 +1,13 @@
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
index d92d0596b7c..7926536a0c3 100644
--- a/libsanitizer/asan/asan_linux.cc
+++ b/libsanitizer/asan/asan_linux.cc
@@ -30,7 +30,7 @@
#include <sys/types.h>
#include <dlfcn.h>
#include <fcntl.h>
-#include <limits.h>
+#include <linux/limits.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>