summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 54c8445e489..d3b07c0d623 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -6266,7 +6266,10 @@ AC_MSG_CHECKING(linker for compressed debug sections)
# In binutils 2.26, gld gained support for the ELF gABI format.
if test $in_tree_ld = yes ; then
gcc_cv_ld_compress_debug=0
- if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 19 -o "$gcc_cv_gld_major_version" -gt 2 \
+ if test $ld_is_mold = yes; then
+ gcc_cv_ld_compress_debug=3
+ gcc_cv_ld_compress_debug_option="--compress-debug-sections"
+ elif test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 19 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes && test $ld_is_gold = yes; then
gcc_cv_ld_compress_debug=2
gcc_cv_ld_compress_debug_option="--compress-debug-sections"
@@ -6279,7 +6282,10 @@ if test $in_tree_ld = yes ; then
gcc_cv_ld_compress_debug=1
fi
elif echo "$ld_ver" | grep GNU > /dev/null; then
- if test "$ld_vers_major" -lt 2 \
+ if test $ld_is_mold = yes; then
+ gcc_cv_ld_compress_debug=3
+ gcc_cv_ld_compress_debug_option="--compress-debug-sections"
+ elif test "$ld_vers_major" -lt 2 \
|| test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 21; then
gcc_cv_ld_compress_debug=0
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 26; then