This is the mail archive of the gcc@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]

Re: Unreviewed patch / {PATCH] Do not override configure decision about inhibit_libc


Momchil Velikov wrote:
> Joern> Is there a demand for this configuration?  In that case, we should
> Joern> have something more fine-grained that inhibit_libc, which suppresses
> Joern> the profiling support along with eprintf.
> 
> I'd think disabling profiling in the environments, which do not
> support stdio is prefferable to disabling the use of GCC in these
> environments.

Yes, but currently inhibit_libc is set automatically for all newlib
toolchains, so if we disabled profiling using inhibit_libc, profiling
would be disabled altogether for newlib toolchains.  We have to get rid of
this automatic setting of inhibit_libc so that inhibit_libc actually
means somehing again.
	
-- 
--------------------------
SuperH
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330
Thu Jul 25 22:40:05 2002  J"orn Rennecke <joern.rennecke@superh.com>

	* configure.in (inhibit_libc): For newlib, set to -Dinhibit_eprintf.
	* libgcc2.c (__eprintf): Also inhibited by inhibit_eprintf.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.610
diff -p -r1.610 configure.in
*** configure.in	14 Jul 2002 01:59:13 -0000	1.610
--- configure.in	25 Jul 2002 21:39:58 -0000
*************** fi
*** 1144,1157 ****
  # have its own set of headers then define
  # inhibit_libc
  
! # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
! # This prevents libgcc2 from containing any code which requires libc
! # support.
  inhibit_libc=
! if [test x$host != x$target] && [test x$with_headers = x]; then
!        inhibit_libc=-Dinhibit_libc
  else
!        if [test x$with_newlib = xyes]; then
                 inhibit_libc=-Dinhibit_libc
         fi
  fi
--- 1144,1157 ----
  # have its own set of headers then define
  # inhibit_libc
  
! # If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS to
! # -Dinhibit_eprintf.  We should not be using __eprintf because newlib
! # has its own version of assert.h
  inhibit_libc=
! if [test x$with_newlib = xyes]; then
!        inhibit_libc=-Dinhibit_eprintf
  else
!        if [test x$host != x$target] && [test x$with_headers = x]; then
                 inhibit_libc=-Dinhibit_libc
         fi
  fi
Index: libgcc2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/libgcc2.c,v
retrieving revision 1.144
diff -p -r1.144 libgcc2.c
*** libgcc2.c	22 Jul 2002 00:15:49 -0000	1.144
--- libgcc2.c	25 Jul 2002 21:39:58 -0000
*************** __gcc_bcmp (const unsigned char *s1, con
*** 1214,1220 ****
     for binary backward compatibility.  Note that it is not included in
     the shared version of libgcc.  */
  #ifdef L_eprintf
! #ifndef inhibit_libc
  
  #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch.  */
  #include <stdio.h>
--- 1214,1220 ----
     for binary backward compatibility.  Note that it is not included in
     the shared version of libgcc.  */
  #ifdef L_eprintf
! #if ! defined (inhibit_libc) && ! defined (inhibit_eprintf)
  
  #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch.  */
  #include <stdio.h>

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