fix OS X build

This commit is contained in:
Joel Dice 2010-11-07 21:23:25 -07:00
parent 580e7e1b3f
commit 8ca5e9780e
2 changed files with 12 additions and 5 deletions

View File

@ -141,6 +141,10 @@ build-lflags = -lz -lpthread -ldl
lflags = $(common-lflags) -lpthread -ldl lflags = $(common-lflags) -lpthread -ldl
version-script-flag = -Wl,--version-script=openjdk.ld
jvm-flags = -L$(build) -ljvm
build-system = posix build-system = posix
system = posix system = posix
@ -168,7 +172,10 @@ ifeq ($(arch),arm)
endif endif
ifeq ($(platform),darwin) ifeq ($(platform),darwin)
version-script-flag =
jvm-flags = $(build)/libjvm.jnilib
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src) build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src)
build-lflags += -framework CoreFoundation
lflags = $(common-lflags) -ldl -framework CoreFoundation -framework CoreServices lflags = $(common-lflags) -ldl -framework CoreFoundation -framework CoreServices
ifeq ($(bootimage),true) ifeq ($(bootimage),true)
bootimage-lflags = -Wl,-segprot,__RWX,rwx,rwx bootimage-lflags = -Wl,-segprot,__RWX,rwx,rwx
@ -736,8 +743,8 @@ ifdef msvc
-IMPLIB:$(build)/$(name).lib -MANIFESTFILE:$(@).manifest -IMPLIB:$(build)/$(name).lib -MANIFESTFILE:$(@).manifest
$(mt) -manifest $(@).manifest -outputresource:"$(@);2" $(mt) -manifest $(@).manifest -outputresource:"$(@);2"
else else
$(ld) $(^) -Wl,--version-script=openjdk.ld \ $(ld) $(^) $(version-script-flag) $(shared) $(lflags) $(bootimage-lflags) \
$(shared) $(lflags) $(bootimage-lflags) -o $(@) -o $(@)
endif endif
$(strip) $(strip-all) $(@) $(strip) $(strip-all) $(@)
@ -748,7 +755,7 @@ ifdef msvc
-PDB:$(@).pdb -IMPLIB:$(@).lib $(<) -out:$(@) -MANIFESTFILE:$(@).manifest -PDB:$(@).pdb -IMPLIB:$(@).lib $(<) -out:$(@) -MANIFESTFILE:$(@).manifest
$(mt) -manifest $(@).manifest -outputresource:"$(@);1" $(mt) -manifest $(@).manifest -outputresource:"$(@);1"
else else
$(ld) $(<) -L$(build) -ljvm $(lflags) -o $(@) $(ld) $(<) $(jvm-flags) $(lflags) -o $(@)
endif endif
$(strip) $(strip-all) $(@) $(strip) $(strip-all) $(@)

View File

@ -8,14 +8,14 @@
There is NO WARRANTY for this software. See license.txt for There is NO WARRANTY for this software. See license.txt for
details. */ details. */
#define __STDC_CONSTANT_MACROS
#ifdef __APPLE__ #ifdef __APPLE__
# include "CoreFoundation/CoreFoundation.h" # include "CoreFoundation/CoreFoundation.h"
# undef assert # undef assert
# define _XOPEN_SOURCE # define _XOPEN_SOURCE
#endif #endif
#define __STDC_CONSTANT_MACROS
#include "sys/mman.h" #include "sys/mman.h"
#include "sys/types.h" #include "sys/types.h"
#include "sys/stat.h" #include "sys/stat.h"