b9880e
crt files and statically linked libgcc objects cause false positives
b9880e
in annobin coverage, so we add the assembler flag to generate notes
b9880e
for them.
b9880e
b9880e
The patch also adds notes to libgcc_s.so, but this is harmless because
b9880e
these notes only confer that there is no other annobin markup.
b9880e
b9880e
2018-07-25  Florian Weimer  <fweimer@redhat.com>
b9880e
b9880e
	* Makefile.in (LIBGCC2_CFLAGS, CRTSTUFF_CFLAGS): Add
b9880e
	-Wa,--generate-missing-build-notes=yes.
b9880e
b9880e
--- libgcc/Makefile.in	2018-01-13 13:05:41.000000000 +0100
b9880e
+++ libgcc/Makefile.in	2018-07-25 13:15:02.036226940 +0200
b9880e
@@ -246,6 +246,7 @@ LIBGCC2_DEBUG_CFLAGS = -g
b9880e
 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
b9880e
 		 $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
b9880e
 		 -fbuilding-libgcc -fno-stack-protector \
b9880e
+		 -Wa,--generate-missing-build-notes=yes \
b9880e
 		 $(INHIBIT_LIBC_CFLAGS)
b9880e
 
b9880e
 # Additional options to use when compiling libgcc2.a.
b9880e
@@ -301,6 +302,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(IN
b9880e
   $(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
b9880e
   -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
b9880e
   -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
b9880e
+  -Wa,--generate-missing-build-notes=yes \
b9880e
   $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
b9880e
 
b9880e
 # Extra flags to use when compiling crt{begin,end}.o.