From: Martin Liska Date: Tue, 9 Jul 2019 07:41:39 +0000 (+0200) Subject: Remove usage of ZSTD_CLEVEL_DEFAULT define. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a26ff040e7b1d93e364010ac44f4b4797de778c;p=gcc.git Remove usage of ZSTD_CLEVEL_DEFAULT define. 2019-07-09 Martin Liska * lto-compress.c (lto_normalized_zstd_level): Do not use ZSTD_CLEVEL_DEFAULT as it is not default in old releases of libzstd. One can use 0 as a default compression level. From-SVN: r273263 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b7bfb676f4..a3c7971d643 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-09 Martin Liska + + * lto-compress.c (lto_normalized_zstd_level): Do not use + ZSTD_CLEVEL_DEFAULT as it is not default in old releases + of libzstd. One can use 0 as a default compression level. + 2019-07-09 Martin Liska * doc/invoke.texi: Add link from -fprofile-dir option. diff --git a/gcc/lto-compress.c b/gcc/lto-compress.c index b925363ac71..c5c37dbcbfc 100644 --- a/gcc/lto-compress.c +++ b/gcc/lto-compress.c @@ -115,13 +115,10 @@ lto_normalized_zstd_level (void) { int level = flag_lto_compression_level; - if (level != ZSTD_CLEVEL_DEFAULT) - { - if (level < 1) - level = 1; - else if (level > ZSTD_maxCLevel ()) - level = ZSTD_maxCLevel (); - } + if (level < 0) + level = 0; + else if (level > ZSTD_maxCLevel ()) + level = ZSTD_maxCLevel (); return level; }