On Sat, May 14, 2011 at 07:53:00PM +0200, Henri Gomez wrote:
> I tried to build the latest bsd-port on OS/X but it fail with :
> 
> threadService.o thread_bsd_x86.o timer.o type.o typeArrayKlass.o
> typeArrayKlassKlass.o typeArrayOop.o unhandledOops.o universe.o
> unsafe.o utf8.o vectornode.o vectset.o verificationType.o verifier.o
> vframe.o vframeArray.o vframe_hp.o virtualspace.o vmCMSOperations.o
> vmError.o vmError_bsd.o vmGCOperations.o vmPSOperations.o vmStructs.o
> vmSymbols.o vmThread.o vm_operations.o vm_operations_g1.o vm_version.o
> vm_version_bsd_x86.o vm_version_x86.o vmreg.o vmreg_x86.o
> vtableStubs.o vtableStubs_x86_64.o workgroup.o xmlstream.o
> yieldingWorkgroup.o -lm -pthread;       \
>                                               \
>           rm -f libjvm.dylib.1; ln -s libjvm.dylib libjvm.dylib.1;
>                         \
>           [ -f libjvm.dylib ] || { ln -s libjvm.dylib libjvm.dylib; ln -s
> libjvm.dylib.1 libjvm.dylib.1; }; \
>       }
> Linking vm...
> ld: unknown option: -z
> collect2: ld returned 1 exit status
> ln: libjvm.dylib.1: File exists
> make[6]: *** [libjvm.dylib] Error 1
> make[5]: *** [the_vm] Error 2
> make[4]: *** [product] Error 2
> make[3]: *** [generic_build2] Error 2
> make[2]: *** [product] Error 2
> make[1]: *** [hotspot-build] Error 2
> make: *** [build_product_image] Error 2
> 
> There is no -z option for ld under OS/X

I couldn't recall whether it was supported or not.  The attached patch
likely fixes it.

-- 
Greg Lewis                          Email   : gle...@eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : gle...@freebsd.org
diff -r 3eec55c8d534 make/bsd/makefiles/vm.make
--- a/make/bsd/makefiles/vm.make	Fri May 13 22:29:56 2011 -0700
+++ b/make/bsd/makefiles/vm.make	Sat May 14 23:15:53 2011 -0700
@@ -108,7 +108,9 @@
 
 # Don't set excutable bit on stack segment
 # the same could be done by separate execstack command
+ifneq ($(OS_VENDOR), Darwin)
 LFLAGS += -Xlinker -z -Xlinker noexecstack
+endif
 
 LIBS += -lm -pthread
 


Reply via email to