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]

A patch for gcc/Makefile.in


With this patch, I can use -fno-exceptions to compile gcc while
still getting a working libgcc.a.

I also added -fno-exceptions to crtbeginS.o crtendS.o.

-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Fri Oct 17 07:18:13 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* Makefile (GCC_BASE_CFLAGS): New.
	(GCC_CFLAGS): Changed to $(GCC_BASE_CFLAGS) $(CFLAGS).
	(LIBGCC2_EXTRA_CFLAGS): New, set to $(CFLAGS).
	(LIBGCC2_CFLAGS): Use $(LIBGCC2_EXTRA_CFLAGS) $(GCC_BASE_CFLAGS)
	instead of $(GCC_CFLAGS).
	(crtbeginS.o crtendS.o): Add -fno-exceptions.

Index: Makefile.in
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/Makefile.in,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 Makefile.in
--- Makefile.in	1997/10/17 17:12:52	1.1.1.9
+++ Makefile.in	1997/10/17 18:54:51
@@ -147,7 +147,8 @@
 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
 # It omits XCFLAGS, and specifies -B./.
 # It also specifies -I./include to find, e.g., stddef.h.
-GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
+GCC_BASE_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) -I./include $(TCFLAGS)
+GCC_CFLAGS=$(GCC_BASE_CFLAGS) $(CFLAGS)
 
 # Special flags for compiling enquire.
 # We disable optimization to make floating point more reliable.
@@ -269,7 +270,8 @@
 # we use this here because that should be enough, and also
 # so that -g1 will be tested.
 LIBGCC2_DEBUG_CFLAGS = -g1
-LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
+LIBGCC2_EXTRA_CFLAGS = $(CFLAGS)
+LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_BASE_CFLAGS) $(LIBGCC2_EXTRA_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
 	@inhibit_libc@
 
 # Additional options to use when compiling libgcc2.a.
@@ -1133,11 +1135,11 @@
 stamp-crtS:	crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
 	  -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
-	  -g0 -c $(srcdir)/crtstuff.c 
+	  -fno-exceptions -g0 -c $(srcdir)/crtstuff.c 
 	mv crtstuff$(objext) crtbeginS$(objext)
 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
 	  -DCRT_END -finhibit-size-directive -fno-inline-functions \
-	  -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
+	  -fno-exceptions -g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
 	touch stamp-crtS
 
 # Compile the start modules crt0.o and mcrt0.o that are linked with every program


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