make/bsd/makefiles/saproc.make

changeset 7562
0e1aa319e805
parent 5898
f509b8f4699b
child 7637
10c237e58446
     1.1 --- a/make/bsd/makefiles/saproc.make	Mon Jan 12 15:24:29 2015 +0100
     1.2 +++ b/make/bsd/makefiles/saproc.make	Fri Jun 13 18:04:49 2014 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  #
     1.5 -# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
     1.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8  #
     1.9  # This code is free software; you can redistribute it and/or modify it
    1.10 @@ -64,9 +64,22 @@
    1.11  else
    1.12    ifeq ($(OS_VENDOR), Darwin)
    1.13      SASRCFILES = $(DARWIN_NON_STUB_SASRCFILES)
    1.14 -    SALIBS = -g -framework Foundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks -framework JavaNativeFoundation -framework Security -framework CoreFoundation
    1.15 +    SALIBS = -g \
    1.16 +             -framework Foundation \
    1.17 +             -framework JavaNativeFoundation \
    1.18 +             -framework Security \
    1.19 +             -framework CoreFoundation
    1.20      #objc compiler blows up on -march=i586, perhaps it should not be included in the macosx intel 32-bit C++ compiles?
    1.21      SAARCH = $(subst -march=i586,,$(ARCHFLAG))
    1.22 +
    1.23 +    # This is needed to locate JavaNativeFoundation.framework
    1.24 +    # JDK 8 doesn't have SYSROOT_CFLAGS, so we'll cobble it together here
    1.25 +    SA_SYSROOT_FLAGS=
    1.26 +    ifneq ($(SDKPATH),)
    1.27 +      SA_SYSROOT_FLAGS += -isysroot "$(SDKPATH)" -iframework"$(SDKPATH)/System/Library/Frameworks"
    1.28 +    endif
    1.29 +    # always needed, even if SDKPATH is empty
    1.30 +    SA_SYSROOT_FLAGS += -F"$(SDKPATH)/System/Library/Frameworks/JavaVM.framework/Frameworks"
    1.31    else
    1.32      SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c
    1.33      SALIBS = 
    1.34 @@ -100,14 +113,8 @@
    1.35  endif
    1.36  SA_LFLAGS += $(LDFLAGS_HASH_STYLE)
    1.37  
    1.38 -ifeq ($(OS_VENDOR), Darwin)
    1.39 -  BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \
    1.40 -    -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") \
    1.41 -    -I/System/Library/Frameworks/JavaVM.framework/Headers
    1.42 -else
    1.43 -  BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \
    1.44 -    -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]")
    1.45 -endif
    1.46 +BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \
    1.47 +  -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]")
    1.48  
    1.49  $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
    1.50  	$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
    1.51 @@ -116,6 +123,7 @@
    1.52  	fi
    1.53  	@echo Making SA debugger back-end...
    1.54  	$(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE                   \
    1.55 +	           $(SA_SYSROOT_FLAGS)                                  \
    1.56  	           $(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG)       \
    1.57  	           -I$(SASRCDIR)                                        \
    1.58  	           -I$(GENERATED)                                       \

mercurial