This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

code coverage, ARM and C library


Hello,
at the moment, when building gcc for arm-none-eabi with newlib as C library,
gcc decides that the C library is not available, sets inhibit_libc for 
compilations, and as result instead of real gcov support routines dummy 
functions are used.

There are two places where inhibit_libc is set

      - Configure code (which looks at --with-newlib and --with-headers)
      - Arm config bits, which set inhibit_libc unconditionally.

That hardcoding looks wrong -- there's nothing fundamentally preventing 
building arm toolchain with some C library. If I remove that hardcoding, and 
modify configure options appropriately, inhibit_libc is not set, gcc builds 
fine, and the code coverage works.

The patch is attached, OK?

- Volodya

	* config/arm/t-strongarm-pe: (TARGET_LIBGCC2_CFLAGS): Do no set
	inhibit_libc.
	* config/arm/t-strongarm-elf: Likewise.
	* config/arm/t-pe: Likewise.
	* config/arm/t-arm-elf: Likewise.
	* config/arm/t-xscale-elf: Likewise.
	* config/arm/t-arm-coff: Likewise.
	* config/arm/t-xscale-coff: Likewise.
	* config/arm/t-wince-pe: Likewise.
Index: config/arm/t-strongarm-pe
===================================================================
--- config/arm/t-strongarm-pe	(revision 117997)
+++ config/arm/t-strongarm-pe	(working copy)
@@ -35,4 +35,4 @@
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
+TARGET_LIBGCC2_CFLAGS = -fno-inline
Index: config/arm/t-strongarm-elf
===================================================================
--- config/arm/t-strongarm-elf	(revision 117997)
+++ config/arm/t-strongarm-elf	(working copy)
@@ -32,7 +32,7 @@
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
+TARGET_LIBGCC2_CFLAGS = -fno-inline
 
 # Assemble startup files.
 $(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES)
Index: config/arm/t-pe
===================================================================
--- config/arm/t-pe	(revision 117997)
+++ config/arm/t-pe	(working copy)
@@ -29,4 +29,4 @@
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc
+TARGET_LIBGCC2_CFLAGS = 
\ No newline at end of file
Index: config/arm/t-arm-elf
===================================================================
--- config/arm/t-arm-elf	(revision 117997)
+++ config/arm/t-arm-elf	(working copy)
@@ -77,7 +77,7 @@
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
+TARGET_LIBGCC2_CFLAGS = -fno-inline
 
 # Assemble startup files.
 $(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES)
Index: config/arm/t-xscale-elf
===================================================================
--- config/arm/t-xscale-elf	(revision 117997)
+++ config/arm/t-xscale-elf	(working copy)
@@ -54,7 +54,7 @@
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
+TARGET_LIBGCC2_CFLAGS = -fno-inline
 
 # Assemble startup files.
 $(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES)
Index: config/arm/t-arm-coff
===================================================================
--- config/arm/t-arm-coff	(revision 117997)
+++ config/arm/t-arm-coff	(working copy)
@@ -31,4 +31,4 @@
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
+TARGET_LIBGCC2_CFLAGS = -fno-inline
Index: config/arm/t-xscale-coff
===================================================================
--- config/arm/t-xscale-coff	(revision 117997)
+++ config/arm/t-xscale-coff	(working copy)
@@ -42,4 +42,4 @@
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
+TARGET_LIBGCC2_CFLAGS = -fno-inline
Index: config/arm/t-wince-pe
===================================================================
--- config/arm/t-wince-pe	(revision 117997)
+++ config/arm/t-wince-pe	(working copy)
@@ -34,4 +34,4 @@
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
-TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc
+TARGET_LIBGCC2_CFLAGS = 

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