diff options
author | Jim Wilson <jimw@sifive.com> | 2020-09-28 17:13:40 -0700 |
---|---|---|
committer | Jim Wilson <jimw@sifive.com> | 2020-09-29 15:27:16 -0700 |
commit | 6649df18f98d5baf89b56a09b816b5eeb5f67bcb (patch) | |
tree | 2467e755fc026372252559eff3164811a97fdce3 /gcc/configure.ac | |
parent | 0eef5eea2b42d892df52b655e55458f27ac3fb81 (diff) | |
download | gcc-6649df18f98d5baf89b56a09b816b5eeb5f67bcb.zip gcc-6649df18f98d5baf89b56a09b816b5eeb5f67bcb.tar.gz gcc-6649df18f98d5baf89b56a09b816b5eeb5f67bcb.tar.bz2 |
Fix GCC 10+ build failure with zstd version 1.2.0 or older.
Extends the configure check for zstd.h to also verify the zstd version,
since gcc requires features that only exist in 1.3.0 and newer. Without
this patch we get a build error for lto-compress.c when using an old zstd
version.
gcc/
PR bootstrap/97183
* configure.ac (gcc_cv_header_zstd_h): Check ZSTD_VERISON_NUMBER.
* configure: Regenerated.
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 975f6d9..f561216 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1376,8 +1376,13 @@ LDFLAGS="$LDFLAGS $ZSTD_LDFLAGS" AC_MSG_CHECKING(for zstd.h) AC_CACHE_VAL(gcc_cv_header_zstd_h, +# We require version 1.3.0 or later. This is the first version that has +# ZSTD_getFrameContentSize. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( -[[#include <zstd.h>]])], +[[#include <zstd.h> +#if ZSTD_VERSION_NUMBER < 10300 +#error "need zstd 1.3.0 or better" +#endif]])], [gcc_cv_header_zstd_h=yes], [gcc_cv_header_zstd_h=no])]) AC_MSG_RESULT($gcc_cv_header_zstd_h) |