When specifying a non-system prefix with --with-zstd, the build fails because the...
authorMichael Kuhn <gcc@ikkoku.de>
Tue, 9 Jun 2020 20:05:07 +0000 (14:05 -0600)
committerJeff Law <law@redhat.com>
Tue, 9 Jun 2020 20:07:46 +0000 (14:07 -0600)
commit776256757b3d12830e5449c41f1dd6c13fdf2868
tree3a9d1c3f92cd65e644e961eeefd85e9379ceec95
parent84fa38d20a65e6d0dd5707c275acdb5cad3ceb5a
When specifying a non-system prefix with --with-zstd, the build fails because the header and library cannot be found (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005).

The attached patch fixes the problem and is what we use in Spack to
make GCC build with zstd support.

gcc/
* Makefile.in (ZSTD_INC): Define.
(ZSTD_LIB): Include ZSTD_LDFLAGS.
(CFLAGS-lto-compress.o): Add ZSTD_INC.
* configure.ac (ZSTD_CPPFLAGS, ZSTD_LDFLAGS): New variables for
AC_SUBST.
* configure: Rebuilt.
gcc/Makefile.in
gcc/configure
gcc/configure.ac