hg: bsd-port/jdk8/hotspot: - Build libjvm.so with -gstabs on bsd/amd64 with gcc. Using -g

Kurt Miller kurt at intricatesoftware.com
Tue Jun 23 14:07:22 UTC 2015


On Sun, 2015-06-21 at 11:10 -0700, Greg Lewis wrote:
> On Sat, Jun 06, 2015 at 05:40:41PM +0000, kurt at intricatesoftware.com wrote:
> > Changeset: cc98d91d605d
> > Author:    kurt
> > Date:      2015-06-06 13:40 -0400
> > URL:       http://hg.openjdk.java.net/bsd-port/jdk8/hotspot/rev/cc98d91d605d
> > 
> > - Build libjvm.so with -gstabs on bsd/amd64 with gcc. Using -g
> > produces ~500M debuginfo whereas -gstabs produces ~35M debuginfo.
> > 
> > ! make/bsd/makefiles/gcc.make
> 
> Unfortunately break FreeBSD/clang (yes, it perhaps shouldn't use gcc.make,
> but it does).
> 
> Generating precompiled header precompiled.hpp.pch
> CC: error: unsupported option '-gstabs'
> /home/glewis/projects/java/jdk18/bsd-port/jdk8/hotspot/make/bsd/makefiles/vm.make:310:
> recipe for target 'precompiled.hpp.pch' failed
> gmake[6]: *** [precompiled.hpp.pch] Error 1
> /home/glewis/projects/java/jdk18/bsd-port/jdk8/hotspot/make/bsd/makefiles/top.make:128:
> recipe for target 'the_vm' failed
> gmake[5]: *** [the_vm] Error 2
> ...
> 

Hi Greg,

Sorry about the fallout. It seems the DEBUG_CFLAGS section is missing
the USE_CLANG check that both FASTDEBUG_CFLAGS and OPT_CFLAGS has. Does
the following diff fix things for you?

Regards,
-Kurt

diff -r 10ef1451139e make/bsd/makefiles/gcc.make
--- a/make/bsd/makefiles/gcc.make	Wed Jun 17 12:45:28 2015 -0400
+++ b/make/bsd/makefiles/gcc.make	Tue Jun 23 09:57:44 2015 -0400
@@ -442,7 +442,12 @@
   DEBUG_CFLAGS/ppc   = -g
   DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
   ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
-  DEBUG_CFLAGS += -gstabs
+    ifeq ($(USE_CLANG), true)
+      # Clang doesn't understand -gstabs
+      DEBUG_CFLAGS += -g
+    else
+      DEBUG_CFLAGS += -gstabs
+    endif
   endif
   
   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)




More information about the bsd-port-dev mailing list