On Sun, 2016-05-08 at 17:56 -0400, Christos Zoulas wrote: > Hello, > > 1. get rid of -gstabs; stabs don't work together with pre-compiled-headers > and gcc anymore. Makes the code a lot simpler!
Hi Christos, Do you know what version of gcc -gstabs broke? The last time I checked -gstabs was still needed on OpenBSD due to the blowup in libjvm.so size. I think the the removal of -gstabs should be conditional on gcc version. -Kurt > 2. define __STDC_LIMIT_MACROS early so that other headers that include > <stdint.h> by side effect define the necessary macros. > 3. remove stray <fcntl.h> include. This is not used at all in this file; > it looks out of place anyway :-) > > Best, > > christos > > diff -r 361ef7f29332 make/bsd/makefiles/gcc.make > --- a/make/bsd/makefiles/gcc.make Sun May 01 23:35:54 2016 -0700 > +++ b/make/bsd/makefiles/gcc.make Sun May 08 17:51:09 2016 -0400 > @@ -431,51 +431,12 @@ > ifeq ($(DEBUG_BINARIES), true) > CFLAGS += -g > else > - # Use the stabs format for debugging information (this is the default > - # on gcc-2.91). It's good enough, has all the information about line > - # numbers and local variables, and libjvm.so is only about 16M. > - # Change this back to "-g" if you want the most expressive format. > - # (warning: that could easily inflate libjvm.so to 150M!) > - # Note: The Itanium gcc compiler crashes when using -gstabs. > - DEBUG_CFLAGS/ia64 = -g > - DEBUG_CFLAGS/arm = -g > - DEBUG_CFLAGS/ppc = -g > - DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) > - ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) > - ifeq ($(USE_CLANG), true) > - # Clang doesn't understand -gstabs > - DEBUG_CFLAGS += -g > - else > - DEBUG_CFLAGS += -gstabs > - endif > - endif > + DEBUG_CFLAGS += -g > > ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) > - FASTDEBUG_CFLAGS/ia64 = -g > - FASTDEBUG_CFLAGS/arm = -g > - FASTDEBUG_CFLAGS/ppc = -g > - FASTDEBUG_CFLAGS += $(FASTDEBUG_CFLAGS/$(BUILDARCH)) > - ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),) > - ifeq ($(USE_CLANG), true) > - # Clang doesn't understand -gstabs > - FASTDEBUG_CFLAGS += -g > - else > - FASTDEBUG_CFLAGS += -gstabs > - endif > - endif > + FASTDEBUG_CFLAGS += -g > > - OPT_CFLAGS/ia64 = -g > - OPT_CFLAGS/arm = -g > - OPT_CFLAGS/ppc = -g > - OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH)) > - ifeq ($(OPT_CFLAGS/$(BUILDARCH)),) > - ifeq ($(USE_CLANG), true) > - # Clang doesn't understand -gstabs > - OPT_CFLAGS += -g > - else > - OPT_CFLAGS += -gstabs > - endif > - endif > + OPT_CFLAGS += -g > endif > endif > > diff -r 361ef7f29332 src/share/vm/utilities/globalDefinitions_gcc.hpp > --- a/src/share/vm/utilities/globalDefinitions_gcc.hpp Sun May 01 > 23:35:54 2016 -0700 > +++ b/src/share/vm/utilities/globalDefinitions_gcc.hpp Sun May 08 > 17:51:09 2016 -0400 > @@ -30,6 +30,11 @@ > // This file holds compiler-dependent includes, > // globally used constants & types, class (forward) > // declarations and a few frequently used utility functions. > +#if defined(LINUX) || defined(_ALLBSD_SOURCE) > +#ifndef __STDC_LIMIT_MACROS > +#define __STDC_LIMIT_MACROS > +#endif // __STDC_LIMIT_MACROS > +#endif > > #include <ctype.h> > #include <string.h> > @@ -69,9 +74,6 @@ > # endif > > #if defined(LINUX) || defined(_ALLBSD_SOURCE) > -#ifndef __STDC_LIMIT_MACROS > -#define __STDC_LIMIT_MACROS > -#endif // __STDC_LIMIT_MACROS > #include <inttypes.h> > #include <signal.h> > #ifndef __OpenBSD__ > diff -r 361ef7f29332 src/share/vm/utilities/vmError.cpp > --- a/src/share/vm/utilities/vmError.cpp Sun May 01 23:35:54 2016 -0700 > +++ b/src/share/vm/utilities/vmError.cpp Sun May 08 17:51:09 2016 -0400 > @@ -22,7 +22,6 @@ > * > */ > > -#include <fcntl.h> > #include "precompiled.hpp" > #include "compiler/compileBroker.hpp" > #include "gc_interface/collectedHeap.hpp" >