Commit 29d7cbd1 by Rainer Orth Committed by Rainer Orth

Support compressed debug sections

	* configure.ac (gcc_cv_as_compress_debug): Check for assembler
	compressed debug support.
	(gcc_cv_ld_compress_debug): Check for linker compressed debug
	support.
	* configure: Regenerate.
	* config.in: Regenerate.
	* common.opt (compressed_debug_sections): New enum.
	(gz, gz=): New options.
	* gcc.c (LINK_COMPRESS_DEBUG_SPEC, ASM_COMPRESS_DEBUG_SPEC):
	Define.
	(LINK_COMMAND_SPEC): Invoke LINK_COMPRESS_DEBUG_SPEC.
	(asm_options): Invoke ASM_COMPRESS_DEBUG_SPEC.
	* config/darwin.h (LINK_COMMAND_SPEC_A): Invoke
	LINK_COMPRESS_DEBUG_SPEC.
	* config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.
	* opts.c (common_handle_option): Handle OPT_gz, OPT_gz_.
	* doc/invoke.texi (Option Summary, Debugging Options): Add
	-gz[=type].
	(Debugging Options): Document -gz[=type].

From-SVN: r212072
parent d284e1b8
2014-06-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (gcc_cv_as_compress_debug): Check for assembler
compressed debug support.
(gcc_cv_ld_compress_debug): Check for linker compressed debug
support.
* configure: Regenerate.
* config.in: Regenerate.
* common.opt (compressed_debug_sections): New enum.
(gz, gz=): New options.
* gcc.c (LINK_COMPRESS_DEBUG_SPEC, ASM_COMPRESS_DEBUG_SPEC):
Define.
(LINK_COMMAND_SPEC): Invoke LINK_COMPRESS_DEBUG_SPEC.
(asm_options): Invoke ASM_COMPRESS_DEBUG_SPEC.
* config/darwin.h (LINK_COMMAND_SPEC_A): Invoke
LINK_COMPRESS_DEBUG_SPEC.
* config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.
* opts.c (common_handle_option): Handle OPT_gz, OPT_gz_.
* doc/invoke.texi (Option Summary, Debugging Options): Add
-gz[=type].
(Debugging Options): Document -gz[=type].
2014-06-27 Martin Jambor <mjambor@suse.cz> 2014-06-27 Martin Jambor <mjambor@suse.cz>
PR ipa/61160 PR ipa/61160
......
...@@ -2527,6 +2527,28 @@ gxcoff+ ...@@ -2527,6 +2527,28 @@ gxcoff+
Common JoinedOrMissing Negative(gcoff) Common JoinedOrMissing Negative(gcoff)
Generate debug information in extended XCOFF format Generate debug information in extended XCOFF format
Enum
Name(compressed_debug_sections) Type(int)
; Since -gz= is completely handled in specs, the values aren't used and we
; assign arbitrary constants.
EnumValue
Enum(compressed_debug_sections) String(none) Value(0)
EnumValue
Enum(compressed_debug_sections) String(zlib) Value(1)
EnumValue
Enum(compressed_debug_sections) String(zlib-gnu) Value(2)
gz
Common Driver
Generate compressed debug sections
gz=
Common Driver Joined Enum(compressed_debug_sections)
-gz=<format> Generate compressed debug sections in format <format>
h h
Driver Joined Separate Driver Joined Separate
......
...@@ -6,6 +6,18 @@ ...@@ -6,6 +6,18 @@
#endif #endif
/* Define to the assembler option to enable compressed debug sections. */
#ifndef USED_FOR_TARGET
#undef AS_COMPRESS_DEBUG_OPTION
#endif
/* Define to the assembler option to disable compressed debug sections. */
#ifndef USED_FOR_TARGET
#undef AS_NO_COMPRESS_DEBUG_OPTION
#endif
/* Define as the number of bits in a byte, if `limits.h' doesn't. */ /* Define as the number of bits in a byte, if `limits.h' doesn't. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef CHAR_BIT #undef CHAR_BIT
...@@ -223,6 +235,13 @@ ...@@ -223,6 +235,13 @@
#endif #endif
/* Define to the level of your assembler's compressed debug section support.
*/
#ifndef USED_FOR_TARGET
#undef HAVE_AS_COMPRESS_DEBUG
#endif
/* Define if your assembler supports the DCI/ICI instructions. */ /* Define if your assembler supports the DCI/ICI instructions. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAVE_AS_DCI #undef HAVE_AS_DCI
...@@ -1274,6 +1293,12 @@ ...@@ -1274,6 +1293,12 @@
#endif #endif
/* Define to the level of your linker's compressed debug section support. */
#ifndef USED_FOR_TARGET
#undef HAVE_LD_COMPRESS_DEBUG
#endif
/* Define if your linker supports --demangle option. */ /* Define if your linker supports --demangle option. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAVE_LD_DEMANGLE #undef HAVE_LD_DEMANGLE
...@@ -1699,6 +1724,12 @@ ...@@ -1699,6 +1724,12 @@
#endif #endif
/* Define to the linker option to enable compressed debug sections. */
#ifndef USED_FOR_TARGET
#undef LD_COMPRESS_DEBUG_OPTION
#endif
/* Define to the linker option to enable use of shared objects. */ /* Define to the linker option to enable use of shared objects. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef LD_DYNAMIC_OPTION #undef LD_DYNAMIC_OPTION
......
...@@ -171,7 +171,8 @@ extern GTY(()) int darwin_ms_struct; ...@@ -171,7 +171,8 @@ extern GTY(()) int darwin_ms_struct;
LINK_PLUGIN_SPEC \ LINK_PLUGIN_SPEC \
"%{flto*:%<fcompare-debug*} \ "%{flto*:%<fcompare-debug*} \
%{flto*} \ %{flto*} \
%l %X %{s} %{t} %{Z} %{u*} \ %l " LINK_COMPRESS_DEBUG_SPEC \
"%X %{s} %{t} %{Z} %{u*} \
%{e*} %{r} \ %{e*} %{r} \
%{o*}%{!o:-o a.out} \ %{o*}%{!o:-o a.out} \
%{!nostdlib:%{!nostartfiles:%S}} \ %{!nostdlib:%{!nostartfiles:%S}} \
......
...@@ -80,7 +80,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -80,7 +80,8 @@ along with GCC; see the file COPYING3. If not see
#undef LINK_COMMAND_SPEC #undef LINK_COMMAND_SPEC
#define LINK_COMMAND_SPEC \ #define LINK_COMMAND_SPEC \
"%{!fsyntax-only: \ "%{!fsyntax-only: \
%{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{e*} %{N} %{n} \ %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l " LINK_COMPRESS_DEBUG_SPEC \
"%X %{o*} %{e*} %{N} %{n} \
\t%{r} %{s} %{t} %{u*} %{z} %{Z}\ \t%{r} %{s} %{t} %{u*} %{z} %{Z}\
\t%{!nostdlib:%{!nostartfiles:%S}}\ \t%{!nostdlib:%{!nostartfiles:%S}}\
\t%{static:} %{L*} %D %o\ \t%{static:} %{L*} %D %o\
......
...@@ -26531,6 +26531,62 @@ $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h ...@@ -26531,6 +26531,62 @@ $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h
fi fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compressed debug sections" >&5
$as_echo_n "checking assembler for compressed debug sections... " >&6; }
if test "${gcc_cv_as_compress_debug+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_as_compress_debug=no
if test x$gcc_cv_as != x; then
$as_echo '' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags --compress-debug-sections -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
# gas compiled without zlib cannot compress debug sections and warns
# about it, but still exits successfully. So check for this, too.
if $gcc_cv_as --compress-debug-sections -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null
then
gcc_cv_as_compress_debug=0
elif $gcc_cv_as --compress-debug-sections -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_compress_debug=1
gcc_cv_as_compress_debug_option="--compress-debug-sections"
gcc_cv_as_no_compress_debug_option="--nocompress-debug-sections"
else
gcc_cv_as_compress_debug=0
# FIXME: Future gas versions will support ELF gABI style via
# --compress-debug-sections[=type].
fi
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_compress_debug" >&5
$as_echo "$gcc_cv_as_compress_debug" >&6; }
cat >>confdefs.h <<_ACEOF
#define HAVE_AS_COMPRESS_DEBUG $gcc_cv_as_compress_debug
_ACEOF
cat >>confdefs.h <<_ACEOF
#define AS_COMPRESS_DEBUG_OPTION "$gcc_cv_as_compress_debug_option"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define AS_NO_COMPRESS_DEBUG_OPTION "$gcc_cv_as_no_compress_debug_option"
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .lcomm with alignment" >&5
$as_echo_n "checking assembler for .lcomm with alignment... " >&6; } $as_echo_n "checking assembler for .lcomm with alignment... " >&6; }
if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then : if test "${gcc_cv_as_lcomm_with_alignment+set}" = set; then :
...@@ -26936,6 +26992,66 @@ fi ...@@ -26936,6 +26992,66 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections_bug" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_gc_sections_bug" >&5
$as_echo "$gcc_cv_ld_eh_gc_sections_bug" >&6; } $as_echo "$gcc_cv_ld_eh_gc_sections_bug" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for compressed debug sections" >&5
$as_echo_n "checking linker for compressed debug sections... " >&6; }
# gold/gld support compressed debug sections since binutils 2.19/2.21
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 \
&& 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"
elif test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_compress_debug=1
fi
elif echo "$ld_ver" | grep GNU > /dev/null; then
gcc_cv_ld_compress_debug=1
if test 0"$ld_date" -lt 20050308; then
if test -n "$ld_date"; then
# If there was date string, but was earlier than 2005-03-08, fail
gcc_cv_ld_compress_debug=0
elif test "$ld_vers_major" -lt 2; then
gcc_cv_ld_compress_debug=0
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 21; then
gcc_cv_ld_compress_debug=0
fi
fi
if test $ld_is_gold = yes; then
gcc_cv_ld_compress_debug=2
gcc_cv_ld_compress_debug_option="--compress-debug-sections"
fi
else
case "${target}" in
*-*-solaris2*)
# Introduced in Solaris 11.2.
if $gcc_cv_ld --help 2>&1 | grep -- '-z compress-sections' > /dev/null; then
gcc_cv_ld_compress_debug=3
gcc_cv_ld_compress_debug_option="-z compress-sections"
else
gcc_cv_ld_compress_debug=0
fi
;;
*)
# Assume linkers other than GNU ld don't support compessed debug
# sections.
gcc_cv_ld_compress_debug=0
;;
esac
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_LD_COMPRESS_DEBUG $gcc_cv_ld_compress_debug
_ACEOF
cat >>confdefs.h <<_ACEOF
#define LD_COMPRESS_DEBUG_OPTION "$gcc_cv_ld_compress_debug_option"
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_compress_debug" >&5
$as_echo "$gcc_cv_ld_compress_debug" >&6; }
# -------- # --------
# UNSORTED # UNSORTED
# -------- # --------
......
...@@ -4406,6 +4406,30 @@ if test x"$insn" != x; then ...@@ -4406,6 +4406,30 @@ if test x"$insn" != x; then
[Define if your assembler supports the --debug-prefix-map option.])]) [Define if your assembler supports the --debug-prefix-map option.])])
fi fi
gcc_GAS_CHECK_FEATURE([compressed debug sections],
gcc_cv_as_compress_debug,,[--compress-debug-sections],,
[# gas compiled without zlib cannot compress debug sections and warns
# about it, but still exits successfully. So check for this, too.
if $gcc_cv_as --compress-debug-sections -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null
then
gcc_cv_as_compress_debug=0
elif $gcc_cv_as --compress-debug-sections -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_compress_debug=1
gcc_cv_as_compress_debug_option="--compress-debug-sections"
gcc_cv_as_no_compress_debug_option="--nocompress-debug-sections"
else
gcc_cv_as_compress_debug=0
# FIXME: Future gas versions will support ELF gABI style via
# --compress-debug-sections[=type].
fi])
AC_DEFINE_UNQUOTED(HAVE_AS_COMPRESS_DEBUG, $gcc_cv_as_compress_debug,
[Define to the level of your assembler's compressed debug section support.])
AC_DEFINE_UNQUOTED(AS_COMPRESS_DEBUG_OPTION, "$gcc_cv_as_compress_debug_option",
[Define to the assembler option to enable compressed debug sections.])
AC_DEFINE_UNQUOTED(AS_NO_COMPRESS_DEBUG_OPTION, "$gcc_cv_as_no_compress_debug_option",
[Define to the assembler option to disable compressed debug sections.])
gcc_GAS_CHECK_FEATURE([.lcomm with alignment], gcc_cv_as_lcomm_with_alignment, gcc_GAS_CHECK_FEATURE([.lcomm with alignment], gcc_cv_as_lcomm_with_alignment,
,, ,,
[.lcomm bar,4,16],, [.lcomm bar,4,16],,
...@@ -4712,6 +4736,60 @@ if test x$gcc_cv_ld_eh_gc_sections_bug = xyes; then ...@@ -4712,6 +4736,60 @@ if test x$gcc_cv_ld_eh_gc_sections_bug = xyes; then
fi fi
AC_MSG_RESULT($gcc_cv_ld_eh_gc_sections_bug) AC_MSG_RESULT($gcc_cv_ld_eh_gc_sections_bug)
AC_MSG_CHECKING(linker for compressed debug sections)
# gold/gld support compressed debug sections since binutils 2.19/2.21
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 \
&& 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"
elif test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_compress_debug=1
fi
elif echo "$ld_ver" | grep GNU > /dev/null; then
gcc_cv_ld_compress_debug=1
if test 0"$ld_date" -lt 20050308; then
if test -n "$ld_date"; then
# If there was date string, but was earlier than 2005-03-08, fail
gcc_cv_ld_compress_debug=0
elif test "$ld_vers_major" -lt 2; then
gcc_cv_ld_compress_debug=0
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 21; then
gcc_cv_ld_compress_debug=0
fi
fi
if test $ld_is_gold = yes; then
gcc_cv_ld_compress_debug=2
gcc_cv_ld_compress_debug_option="--compress-debug-sections"
fi
else
changequote(,)dnl
case "${target}" in
*-*-solaris2*)
# Introduced in Solaris 11.2.
if $gcc_cv_ld --help 2>&1 | grep -- '-z compress-sections' > /dev/null; then
gcc_cv_ld_compress_debug=3
gcc_cv_ld_compress_debug_option="-z compress-sections"
else
gcc_cv_ld_compress_debug=0
fi
;;
*)
# Assume linkers other than GNU ld don't support compessed debug
# sections.
gcc_cv_ld_compress_debug=0
;;
esac
changequote([,])dnl
fi
AC_DEFINE_UNQUOTED(HAVE_LD_COMPRESS_DEBUG, $gcc_cv_ld_compress_debug,
[Define to the level of your linker's compressed debug section support.])
AC_DEFINE_UNQUOTED(LD_COMPRESS_DEBUG_OPTION, "$gcc_cv_ld_compress_debug_option",
[Define to the linker option to enable compressed debug sections.])
AC_MSG_RESULT($gcc_cv_ld_compress_debug)
# -------- # --------
# UNSORTED # UNSORTED
# -------- # --------
......
...@@ -344,7 +344,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -344,7 +344,7 @@ Objective-C and Objective-C++ Dialects}.
-g -g@var{level} -gtoggle -gcoff -gdwarf-@var{version} @gol -g -g@var{level} -gtoggle -gcoff -gdwarf-@var{version} @gol
-ggdb -grecord-gcc-switches -gno-record-gcc-switches @gol -ggdb -grecord-gcc-switches -gno-record-gcc-switches @gol
-gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol -gstabs -gstabs+ -gstrict-dwarf -gno-strict-dwarf @gol
-gvms -gxcoff -gxcoff+ @gol -gvms -gxcoff -gxcoff+ -gz@r{[}=@var{type}@r{]} @gol
-fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
-fdebug-prefix-map=@var{old}=@var{new} @gol -fdebug-prefix-map=@var{old}=@var{new} @gol
-femit-struct-debug-baseonly -femit-struct-debug-reduced @gol -femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
...@@ -5289,6 +5289,18 @@ DWARF extensions from later standard versions is allowed. ...@@ -5289,6 +5289,18 @@ DWARF extensions from later standard versions is allowed.
Allow using extensions of later DWARF standard version than selected with Allow using extensions of later DWARF standard version than selected with
@option{-gdwarf-@var{version}}. @option{-gdwarf-@var{version}}.
@item -gz@r{[}=@var{type}@r{]}
@opindex gz
Produce compressed debug sections in DWARF format, if that is supported.
If @var{type} is not given, the default type depends on the capabilities
of the assembler and linker used. @var{type} may be one of
@option{none} (don't compress debug sections), @option{zlib} (use zlib
compression in ELF gABI format), or @option{zlib-gnu} (use zlib
compression in traditional GNU format). If the linker doesn't support
writing compressed debug sections, the option is rejected. Otherwise,
if the assembler does not support them, @option{-gz} is silently ignored
when producing object files.
@item -gvms @item -gvms
@opindex gvms @opindex gvms
Produce debugging information in Alpha/VMS debug format (if that is Produce debugging information in Alpha/VMS debug format (if that is
......
...@@ -597,6 +597,31 @@ proper position among the other output files. */ ...@@ -597,6 +597,31 @@ proper position among the other output files. */
#endif #endif
#endif #endif
/* Linker options for compressed debug sections. */
#if HAVE_LD_COMPRESS_DEBUG == 0
/* No linker support. */
#define LINK_COMPRESS_DEBUG_SPEC \
" %{gz*:%e-gz is not supported in this configuration} "
#elif HAVE_LD_COMPRESS_DEBUG == 1
/* GNU style on input, GNU ld options. Reject, not useful. */
#define LINK_COMPRESS_DEBUG_SPEC \
" %{gz*:%e-gz is not supported in this configuration} "
#elif HAVE_LD_COMPRESS_DEBUG == 2
/* GNU style, GNU gold options. */
#define LINK_COMPRESS_DEBUG_SPEC \
" %{gz|gz=zlib-gnu:" LD_COMPRESS_DEBUG_OPTION "=zlib}" \
" %{gz=none:" LD_COMPRESS_DEBUG_OPTION "=none}" \
" %{gz=zlib:%e-gz=zlib is not supported in this configuration} "
#elif HAVE_LD_COMPRESS_DEBUG == 3
/* ELF gABI style. */
#define LINK_COMPRESS_DEBUG_SPEC \
" %{gz|gz=zlib:" LD_COMPRESS_DEBUG_OPTION "=zlib}" \
" %{gz=none:" LD_COMPRESS_DEBUG_OPTION "=none}" \
" %{gz=zlib-gnu:" LD_COMPRESS_DEBUG_OPTION "=zlib-gnu} "
#else
#error Unknown value for HAVE_LD_COMPRESS_DEBUG.
#endif
/* config.h can define LIBGCC_SPEC to override how and when libgcc.a is /* config.h can define LIBGCC_SPEC to override how and when libgcc.a is
included. */ included. */
#ifndef LIBGCC_SPEC #ifndef LIBGCC_SPEC
...@@ -631,6 +656,33 @@ proper position among the other output files. */ ...@@ -631,6 +656,33 @@ proper position among the other output files. */
#define ASM_MAP "" #define ASM_MAP ""
#endif #endif
/* Assembler options for compressed debug sections. */
#if HAVE_LD_COMPRESS_DEBUG < 2
/* Reject if the linker cannot write compressed debug sections. */
#define ASM_COMPRESS_DEBUG_SPEC \
" %{gz*:%e-gz is not supported in this configuration} "
#else /* HAVE_LD_COMPRESS_DEBUG >= 2 */
#if HAVE_AS_COMPRESS_DEBUG == 0
/* No assembler support. Ignore silently. */
#define ASM_COMPRESS_DEBUG_SPEC \
" %{gz*:} "
#elif HAVE_AS_COMPRESS_DEBUG == 1
/* GNU style, GNU as options. */
#define ASM_COMPRESS_DEBUG_SPEC \
" %{gz|gz=zlib-gnu:" AS_COMPRESS_DEBUG_OPTION "}" \
" %{gz=none:" AS_NO_COMPRESS_DEBUG_OPTION "}" \
" %{gz=zlib:%e-gz=zlib is not supported in this configuration} "
#elif HAVE_AS_COMPRESS_DEBUG == 2
/* ELF gABI style. */
#define ASM_COMPRESS_DEBUG_SPEC \
" %{gz|gz=zlib:" AS_COMPRESS_DEBUG_OPTION "=zlib}" \
" %{gz=none:" AS_COMPRESS_DEBUG_OPTION "=none}" \
" %{gz=zlib-gnu:" AS_COMPRESS_DEBUG_OPTION "=zlib-gnu} "
#else
#error Unknown value for HAVE_AS_COMPRESS_DEBUG.
#endif
#endif /* HAVE_LD_COMPRESS_DEBUG >= 2 */
/* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g' /* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g'
to the assembler. */ to the assembler. */
#ifndef ASM_DEBUG_SPEC #ifndef ASM_DEBUG_SPEC
...@@ -761,8 +813,8 @@ proper position among the other output files. */ ...@@ -761,8 +813,8 @@ proper position among the other output files. */
LINK_PLUGIN_SPEC \ LINK_PLUGIN_SPEC \
"%{flto|flto=*:%<fcompare-debug*} \ "%{flto|flto=*:%<fcompare-debug*} \
%{flto} %{flto=*} %l " LINK_PIE_SPEC \ %{flto} %{flto=*} %l " LINK_PIE_SPEC \
"%{fuse-ld=*:-fuse-ld=%*}\ "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
%X %{o*} %{e*} %{N} %{n} %{r}\ "%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
%{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
...@@ -885,6 +937,7 @@ static const char *asm_options = ...@@ -885,6 +937,7 @@ static const char *asm_options =
to the assembler equivalents. */ to the assembler equivalents. */
"%{v} %{w:-W} %{I*} " "%{v} %{w:-W} %{I*} "
#endif #endif
ASM_COMPRESS_DEBUG_SPEC
"%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}"; "%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}";
static const char *invoke_as = static const char *invoke_as =
......
...@@ -1879,6 +1879,11 @@ common_handle_option (struct gcc_options *opts, ...@@ -1879,6 +1879,11 @@ common_handle_option (struct gcc_options *opts,
loc); loc);
break; break;
case OPT_gz:
case OPT_gz_:
/* Handled completely via specs. */
break;
case OPT_pedantic_errors: case OPT_pedantic_errors:
dc->pedantic_errors = 1; dc->pedantic_errors = 1;
control_warning_option (OPT_Wpedantic, DK_ERROR, value, control_warning_option (OPT_Wpedantic, DK_ERROR, value,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment