gcc/config
Alexandre Oliva 3267bd36aa Use compare-debug for bootstrap-debug-lean to ignore != DW_AT_producer
Unlike bootstrap-debug, bootstrap-debug-lean used to pass compare using
the traditional compare command, because it compiled both stage2 and
stage3 with options that used to generate identical output
(-fcompare-debug= in stage2 vs -fcompare-debug in stage3).

Since we started adding relevant command-line flags to DW_AT_producer,
this is no longer the case, and stages 2 and 3 object files that differ
in nothing but the DW_AT_producer strings.


-fcompare-debug is short for -fcompare-debug=-gtoggle, so stage3
compiles twice, once with the normal options, once with toggled -g, to
then compare the temporary final dumps.  When enabled, both compilations
get from the driver an additional -frandom-seed flag (if none is given
explicitly).

-fcompare-debug= is short for -fno-compare-debug, disabling the second
compilation.


The difference between the DW_AT_producer lines are the different
-fcompare-debug flags, and the presence of the -frandom-seed flag in the
stage3 compilation.

It is easy and sensible enough to filter the -fcompare-debug flags out
of the DW_AT_producer string.  This option should never affect the
compilation output, it just determines whether or not to perform an
additional compilation that should produce the same executable output.

However, dropping -frandom-seed is not quite correct, in that it might
have other consequences on the compilation.  So, it makes little sense
to make the effort to drop it when it's implicit; for those comparing
compiler output differences, it might even hint at what causes, and
could fix, difficult to explain differences, namely, explicitly
supplying -frandom-seed options.

They don't seem to matter for compiler bootstraps, though, at least
for now, so we can safely refrain from issuing -frandom-seed (or maybe
we already issue it where needed :-), and then, for
bootstrap-debug-lean, use the compare-debug script, that strips out
debug information before comparing the object files.


for  config/ChangeLog

	* bootstrap-debug-lean.mk (do-compare): Use the
	contrib/compare-debug script.

for  gcc/ChangeLog

	* dwarf2out.c (gen_producer_string): Discard
	OPT_fcompare_debug.

From-SVN: r254750
2017-11-15 03:11:37 +00:00
..
acinclude.m4
acx.m4 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
asmcfi.m4
ax_check_define.m4 re PR target/78478 (Compile Error for i386-rtems) 2017-01-19 22:00:53 +01:00
bitfields.m4
bootstrap-asan.mk Add support for ASan odr_indicator. 2016-12-02 09:39:27 +02:00
bootstrap-cet.mk Add bootstrap-cet.mk to bootstrap GCC with Intel CET 2017-10-24 05:50:03 -07:00
bootstrap-debug-big.mk
bootstrap-debug-ckovw.mk
bootstrap-debug-lean.mk Use compare-debug for bootstrap-debug-lean to ignore != DW_AT_producer 2017-11-15 03:11:37 +00:00
bootstrap-debug-lib.mk
bootstrap-debug.mk
bootstrap-lto-noplugin.mk Enable -flto in all PGO stages for bootstrap-lto-{,noplugin}.mk. 2017-06-19 13:20:20 +00:00
bootstrap-lto.mk Enable -flto in all PGO stages for bootstrap-lto-{,noplugin}.mk. 2017-06-19 13:20:20 +00:00
bootstrap-mpx.mk
bootstrap-O1.mk
bootstrap-O3.mk
bootstrap-time.mk
bootstrap-ubsan.mk
ChangeLog Use compare-debug for bootstrap-debug-lean to ignore != DW_AT_producer 2017-11-15 03:11:37 +00:00
codeset.m4
depstand.m4
dfp.m4
elf.m4 sync config/* from binutils 2016-12-08 09:46:03 +10:30
enable.m4
extensions.m4
futex.m4
gc++filt.m4
gcc-plugin.m4
gettext-sister.m4
gettext.m4
glibc21.m4
gthr.m4
gxx-include-dir.m4
hwcaps.m4 Build libgo with -Wa,-nH if possible (PR go/78978) [non-libgo parts] 2017-01-06 14:33:47 +00:00
iconv.m4
intdiv0.m4
inttypes_h.m4
inttypes-pri.m4
inttypes.m4
isl.m4 isl.m4: Remove support for ISL 0.14. 2017-02-13 08:54:02 +00:00
largefile.m4
lcmessage.m4
ld-symbolic.m4
lead-dot.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
libstdc++-raw-cxx.m4
lthostflags.m4
math.m4
mh-alpha-linux
mh-cygwin
mh-darwin
mh-djgpp
mh-mingw
mh-pa
mh-pa-hpux10
mh-ppc-aix
mmap.m4
mt-alphaieee
mt-android configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
mt-d30v
mt-gnu
mt-mips16-compat
mt-mips-elfoabi
mt-mips-gnu
mt-nios2-elf
mt-ospace
mt-sde
mt-spu
multi.m4 config-ml.in: Remove references to GCJ. 2016-11-15 16:34:02 +00:00
nls.m4
no-executables.m4
override.m4 sync config/* from binutils 2016-12-08 09:46:03 +10:30
picflag.m4 Update configure deps, remove stray \xA0 in picflag.m4, regenerate 2017-01-04 18:59:34 +10:30
plugins.m4
po.m4
proginstall.m4
progtest.m4
sjlj.m4
stdint_h.m4
stdint.m4
target-posix
tcl.m4
tls.m4
uintmax_t.m4
ulonglong.m4
unwind_ipinfo.m4
warnings.m4 * warnings.m4: Fix comment. 2015-05-27 16:40:38 -04:00
weakref.m4
zlib.m4