This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add --enable-compressed-debug-sections={all,gas,gold,ld}


This patch removes the gas configure option:

--enable-compressed-debug-sections

and adds a toplevel configure option:

--enable-compressed-debug-sections={all,gas,gold,ld}

to enable compressed debug sections for gas, gold or ld by default.  At
the moment, this configure option is ignored by gold and ld.

Any objections?


H.J.
---
	PR gas/19109
	* configure.ac: Add
	--enable-compressed-debug-sections={all,gas,gold,ld}.
	* configure: Regenerated.

gas/

	PR gas/19109
	* NEWS: Update --enable-compressed-debug-sections=.
	* configure.ac: Remove --enable-compressed-debug-sections.
	(DEFAULT_FLAG_COMPRESS_DEBUG): Check
	--enable-compressed-debug-sections={all,gas} instead of
	--enable-compressed-debug-sections.
	* configure: Regenerated.
---
 configure        | 19 +++++++++++++++++++
 configure.ac     | 13 +++++++++++++
 gas/NEWS         |  4 ++--
 gas/configure    | 25 ++++++-------------------
 gas/configure.ac | 21 ++++++---------------
 5 files changed, 46 insertions(+), 36 deletions(-)

diff --git a/configure b/configure
index eca5e6f..f66f424 100755
--- a/configure
+++ b/configure
@@ -753,6 +753,7 @@ enable_as_accelerator_for
 enable_offload_targets
 enable_gold
 enable_ld
+enable_compressed_debug_sections
 enable_libquadmath
 enable_libquadmath_support
 enable_libada
@@ -1476,6 +1477,9 @@ Optional Features:
                           offload target compiler during the build
   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
   --enable-ld[=ARG]       build ld [ARG={default,yes,no}]
+  --enable-compressed-debug-sections={all,gas,gold,ld}
+                          Enable compressed debug sections for gas, gold or ld
+                          by default
   --disable-libquadmath   do not build libquadmath directory
   --disable-libquadmath-support
                           disable libquadmath support for Fortran
@@ -3013,6 +3017,21 @@ $as_echo "$as_me: WARNING: neither ld nor gold are enabled" >&2;}
     ;;
 esac
 
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+# Provide a configure time option to override our default.
+# Check whether --enable-compressed_debug_sections was given.
+if test "${enable_compressed_debug_sections+set}" = set; then :
+  enableval=$enable_compressed_debug_sections;
+  if test x"$enable_compressed_debug_sections" = xyes; then
+    as_fn_error "no program with compressed debug sections specified" "$LINENO" 5
+  fi
+
+else
+  enable_compressed_debug_sections=
+fi
+
+
 # Configure extra directories which are host specific
 
 case "${host}" in
diff --git a/configure.ac b/configure.ac
index 9241261..cb6ca24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -393,6 +393,19 @@ case "${ENABLE_LD}" in
     ;;
 esac
 
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+# Provide a configure time option to override our default.
+AC_ARG_ENABLE(compressed_debug_sections,
+[AS_HELP_STRING([--enable-compressed-debug-sections={all,gas,gold,ld}],
+		[Enable compressed debug sections for gas, gold or ld by
+		 default])],
+[
+  if test x"$enable_compressed_debug_sections" = xyes; then
+    AC_MSG_ERROR([no program with compressed debug sections specified])
+  fi
+], [enable_compressed_debug_sections=])
+
 # Configure extra directories which are host specific
 
 case "${host}" in
diff --git a/gas/NEWS b/gas/NEWS
index 50b921d..0ea699b 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,7 +1,7 @@
 -*- text -*-
 
-* Add a configure option --enable-compressed-debug-sections=[yes|no] to decide
-  whether DWARF debug sections should be compressed by default.
+* Add a configure option --enable-compressed-debug-sections={all,gas} to
+  decide whether DWARF debug sections should be compressed by default.
 
 * Add support for the ARC EM/HS, and ARC600/700 architectures.  Remove
   assembler support for Argonaut RISC architectures.
diff --git a/gas/configure b/gas/configure
index 83bc95c..478874d 100755
--- a/gas/configure
+++ b/gas/configure
@@ -764,7 +764,6 @@ enable_plugins
 enable_largefile
 enable_targets
 enable_checking
-enable_compressed_debug_sections
 enable_werror
 enable_build_warnings
 enable_nls
@@ -1413,7 +1412,6 @@ Optional Features:
   --disable-largefile     omit support for large files
   --enable-targets        alternative target configurations besides the primary
   --enable-checking       enable run-time checks
-  --enable-compressed-debug-sections  compress debug sections by default
   --enable-werror         treat compile warnings as errors
   --enable-build-warnings enable build-time compiler warnings
   --disable-nls           do not use Native Language Support
@@ -10971,7 +10969,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10974 "configure"
+#line 10972 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11077,7 +11075,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11080 "configure"
+#line 11078 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11666,19 +11664,6 @@ $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
 
 fi
 
-# PR gas/19109
-# Decide the default method for compressing debug sections.
-ac_default_compressed_debug_sections=unset
-# Provide a configure time option to override our default.
-# Check whether --enable-compressed_debug_sections was given.
-if test "${enable_compressed_debug_sections+set}" = set; then :
-  enableval=$enable_compressed_debug_sections; case "${enableval}" in
-  yes) ac_default_compressed_debug_sections=yes ;;
-  no)  ac_default_compressed_debug_sections=no ;;
-  *)   ac_default_compressed_debug_sections=unset ;;
-esac
-fi
-
 using_cgen=no
 
 
@@ -12504,11 +12489,13 @@ _ACEOF
 
 done
 
-if test x$ac_default_compressed_debug_sections == xyes ; then
+case x${enable_compressed_debug_sections} in
+x*gas*|xall)
 
 $as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h
 
-fi
+  ;;
+esac
 
 # Turn on all targets if possible
 if test ${all_targets} = "yes"; then
diff --git a/gas/configure.ac b/gas/configure.ac
index 278b45d..e39aede 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -64,18 +64,6 @@ if test x$ac_checking != x ; then
   AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
 fi
 
-# PR gas/19109
-# Decide the default method for compressing debug sections.
-ac_default_compressed_debug_sections=unset
-# Provide a configure time option to override our default.
-AC_ARG_ENABLE(compressed_debug_sections,
-[  --enable-compressed-debug-sections  compress debug sections by default],
-[case "${enableval}" in
-  yes) ac_default_compressed_debug_sections=yes ;;
-  no)  ac_default_compressed_debug_sections=no ;;
-  *)   ac_default_compressed_debug_sections=unset ;;
-esac])dnl
-
 using_cgen=no
 
 AM_BINUTILS_WARNINGS
@@ -548,9 +536,12 @@ changequote([,])dnl
 
 done
 
-if test x$ac_default_compressed_debug_sections == xyes ; then
-  AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
-fi
+case x${enable_compressed_debug_sections} in
+x*gas*|xall)
+  AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1,
+	    [Define if you want compressed debug sections by default.])
+  ;;
+esac
 
 # Turn on all targets if possible
 if test ${all_targets} = "yes"; then
-- 
2.4.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]