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]

Re: Restore __eprintf


On Thu, May 31, 2001 at 11:22:48AM -0300, Alexandre Oliva wrote:
> Even in the case of shared libraries, the work-around is not
> that difficult: -nodefaultlibs -lgcc_s -lc -lgcc_s -lgcc -lc -lgcc

I think this makes the most sense.  I've done this by
default in the gcc driver.


r~


        * gcc.c (init_gcc_specs): When linking against libgcc_s.so,
        also link against libgcc.a.

Index: gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.205.2.15
diff -c -p -d -r1.205.2.15 gcc.c
*** gcc.c	2001/05/30 23:57:05	1.205.2.15
--- gcc.c	2001/05/31 20:50:14
*************** init_gcc_specs (obstack, shared_name, st
*** 1275,1289 ****
    char buffer[128];
  
    /* If we see -shared-libgcc, then use the shared version.  */
!   sprintf (buffer, "%%{shared-libgcc:%s}", shared_name);
    obstack_grow (obstack, buffer, strlen (buffer));
    /* If we see -static-libgcc, then use the static version.  */
    sprintf (buffer, "%%{static-libgcc:%s}", static_name);
    obstack_grow (obstack, buffer, strlen (buffer));
    /* Otherwise, if we see -shared, then use the shared version.  */
    sprintf (buffer,
! 	   "%%{!shared-libgcc:%%{!static-libgcc:%%{shared:%s}}}", 
! 	   shared_name);
    obstack_grow (obstack, buffer, strlen (buffer));
    /* Otherwise, use the static version.  */
    sprintf (buffer, 
--- 1275,1289 ----
    char buffer[128];
  
    /* If we see -shared-libgcc, then use the shared version.  */
!   sprintf (buffer, "%%{shared-libgcc:%s %s}", shared_name, static_name);
    obstack_grow (obstack, buffer, strlen (buffer));
    /* If we see -static-libgcc, then use the static version.  */
    sprintf (buffer, "%%{static-libgcc:%s}", static_name);
    obstack_grow (obstack, buffer, strlen (buffer));
    /* Otherwise, if we see -shared, then use the shared version.  */
    sprintf (buffer,
! 	   "%%{!shared-libgcc:%%{!static-libgcc:%%{shared:%s %s}}}", 
! 	   shared_name, static_name);
    obstack_grow (obstack, buffer, strlen (buffer));
    /* Otherwise, use the static version.  */
    sprintf (buffer, 


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