patches to make jdk8 build on NetBSD

Kurt Miller kurt at intricatesoftware.com
Mon May 9 19:31:28 UTC 2016


On Mon, 2016-05-09 at 15:26 -0400, Christos Zoulas wrote:
> On May 9,  2:41pm, kurt at intricatesoftware.com (Kurt Miller) wrote:
> -- Subject: Re: patches to make jdk8 build on NetBSD
> 
> | On Mon, 2016-05-09 at 08:57 -0400, Christos Zoulas wrote:
> | > On May 9,  7:22am, kurt at intricatesoftware.com (Kurt Miller) wrote:
> | > -- Subject: Re: patches to make jdk8 build on NetBSD
> | > 
> | > | 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.
> | > 
> | > I am using gcc-5.3. The exact error is:
> | > 
> | > cc1plus: error: the "stabs" debug format cannot be used with pre-compiled
> | > headers [-Werror=deprecated]
> | > 
> | > I see the same error string in the gcc-4.8.3 sources I have around.
> | > I don't have anything older... Searching through google for that error
> | > message, it appears that the jdk build broke with gcc-4.8.
> | 
> | Ok. I found the same results as you. Could you use the following
> | conditional to use -g for gcc >= 4.8 instead of removing these sections?
> | 
> |   ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"
> |     # GCC >= 4.8
> 
> Ok, how about this then?
> I think that the logic was slightly incorrect before...
> 

Looks good to me.

Thanks,
-Kurt

> Thanks,
> 
> 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	Mon May 09 15:23:22 2016 -0400
> @@ -427,55 +427,43 @@
>    CFLAGS += -flimit-debug-info
>  endif
>  
> +# 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.
> +# Don't use stabs on gcc>=4.8 because it is incompatible with
> +# pre-compiled-headers
> +ifeq ($(USE_CLANG), true)
> +  # Clang doesn't understand -gstabs
> +  STABS_CFLAGS += -g
> +else
> +  ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"
> +    # GCC >= 4.8
> +    STABS_CFLAGS += -g
> +  else
> +    STABS_CFLAGS/ia64  = -g
> +    STABS_CFLAGS/arm   = -g
> +    STABS_CFLAGS/ppc   = -g
> +    ifeq ($(STABS_CFLAGS/$(BUILDARCH)),)
> +      STABS_CFLAGS += -gstabs
> +    else
> +      STABS_CFLAGS += $(STABS_CFLAGS/$(BUILDARCH))
> +    endif
> +  endif
> +endif
> +
>  # DEBUG_BINARIES uses full -g debug information for all configs
>  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 += ${STABS_CFLAGS}
>    
>    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 += ${STABS_CFLAGS}
>    
> -    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 += ${STABS_CFLAGS}
>    endif
>  endif
>  
> 





More information about the bsd-port-dev mailing list