public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][PUSHED] Support --compress-debug-sections for ld.mold.
@ 2022-04-21  8:18 Martin Liška
  2022-04-21 15:58 ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2022-04-21  8:18 UTC (permalink / raw)
  To: gcc-patches

Pushed to master.

Cheers,
Martin

gcc/ChangeLog:

	* configure.ac: Enable compressed debug sections for mold
	linker.
	* configure: Regenerate.
---
 gcc/configure    | 10 ++++++++--
 gcc/configure.ac | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gcc/configure b/gcc/configure
index 1c1195e95cb..5ce0557719a 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -30623,7 +30623,10 @@ $as_echo_n "checking linker for compressed debug sections... " >&6; }
 # 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"
@@ -30636,7 +30639,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
diff --git a/gcc/configure.ac b/gcc/configure.ac
index ea67fb62292..23bee7010a3 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -6264,7 +6264,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"
@@ -6277,7 +6280,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
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][PUSHED] Support --compress-debug-sections for ld.mold.
  2022-04-21  8:18 [PATCH][PUSHED] Support --compress-debug-sections for ld.mold Martin Liška
@ 2022-04-21 15:58 ` Bernhard Reutner-Fischer
  0 siblings, 0 replies; 2+ messages in thread
From: Bernhard Reutner-Fischer @ 2022-04-21 15:58 UTC (permalink / raw)
  To: gcc-patches, Martin Liška

On 21 April 2022 10:18:48 CEST, "Martin Liška" <mliska@suse.cz> wrote:
>Pushed to master.

>-  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 \

Pre-existing, so just FWIW..

test -a and -o are obsolescent.
See Application Usage in https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

thanks,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-21 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  8:18 [PATCH][PUSHED] Support --compress-debug-sections for ld.mold Martin Liška
2022-04-21 15:58 ` Bernhard Reutner-Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).