diff options
author | Chris Packham <judge.packham@gmail.com> | 2021-08-29 09:27:29 (GMT) |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2021-08-29 09:27:29 (GMT) |
commit | b346fa58b15b9880b714c6f0cc4dddaf84d3da6f (patch) | |
tree | 60bf7a60bcfd2f3c516699128dc787933f496e73 /scripts/build/cc | |
parent | f64bd272d8b879662ddbfecc9661553cac987c92 (diff) |
cc/gcc: Add options for zstd usage
GCC can support using zstd compression for LTO object files. By default
GCC's configure will enable this if libzstd is installed on the machine
building the toolchain. This may be undesirable if the toolchain is to
be used on a different machine. Add an option to control zstd usage and
set the default to the same as the current behaviour (i.e. auto).
Fixes #1579
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 4e0def0..fdfa7d6 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -1130,6 +1130,11 @@ do_gcc_backend() { else extra_config+=("--disable-lto") fi + case "${CT_CC_GCC_LTO_ZSTD}" in + y) extra_config+=("--with-zstd");; + m) ;; + *) extra_config+=("--without-zstd");; + esac if [ ${#host_libstdcxx_flags[@]} -ne 0 ]; then extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}") |