egcs-971207: Building libgcc2.a with -Ox where x > 2
manfred@s-direktnet.de
manfred@s-direktnet.de
Tue Dec 9 03:59:00 GMT 1997
I just failed running the libio tests on sparc-sun-solaris2.5.1 due to
various unresolved __builtin_*new* and __builtin_*delete* functions. I
used optimization level -O9 for building the whole tree. Using -O2
(which doesn't enable `-finline-functions') cured this problem.
Tue Dec 9 11:51:57 1997 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (LIBGCC2_CFLAGS): Include -fno-inline-functions to avoid
inlining various __builtin_*new* and __builtin_*delete* functions when
compiling at higher optimization levels than -O2.
diff -c -p egcs-971207/gcc/Makefile.in.orig egcs-971207/gcc/Makefile.in
*** egcs-971207/gcc/Makefile.in.orig Sun Dec 7 01:27:52 1997
--- egcs-971207/gcc/Makefile.in Sun Dec 7 01:27:52 1997
*************** LIBGCC2 = libgcc2.a
*** 280,287 ****
#
# -fexceptions is necessary for eh.o now that the exceptions are
# the default for g++ only.
LIBGCC2_DEBUG_CFLAGS = -g1
! LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fexceptions @inhibit_libc@
# Additional options to use when compiling libgcc2.a.
# Some targets override this to -Iinclude
--- 280,288 ----
#
# -fexceptions is necessary for eh.o now that the exceptions are
# the default for g++ only.
+ # -fno-inline-functions is necessary for new*.o to avoid inlining the builtin_* funcs.
LIBGCC2_DEBUG_CFLAGS = -g1
! LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-inline-functions -fexceptions @inhibit_libc@
# Additional options to use when compiling libgcc2.a.
# Some targets override this to -Iinclude
More information about the Gcc-bugs
mailing list