Path for hsdis Makefile

Claudio Nieder private at claudio.ch
Tue Sep 4 09:49:16 PDT 2012


Hi,

for my personal use I modified jdk7u/hotspot/src/share/tools/hsdis/Makefile to support OS X. I herby put the below patch into the public domain for anyone to use as (s)he wants.

--- Makefile.orig	2012-09-04 18:02:08.000000000 +0200
+++ Makefile	2012-09-04 18:40:26.000000000 +0200
@@ -52,6 +52,18 @@
 OUTFLAGS	+= -o $@
 LIB_EXT		= .so
 else
+## OS = OSX ##
+ifeq		($(OS),Darwin)
+OS		= Darwin
+CC		= gcc
+ARCH		= amd64
+CFLAGS		+= -m64
+DLDFLAGS	+= -dynamiclib
+DLDFLAGS	+= -lz
+LDFLAGS		+= -ldl
+OUTFLAGS	+= -o $@
+LIB_EXT		= .dylib
+else
 ## OS = Linux ##
 ifeq		($(OS),Linux)
 ifneq           ($(MINGW),)
@@ -96,6 +108,7 @@
 OUTFLAGS	+= /link /out:$@
 LIB_EXT		= .dll
 endif	# Linux
+endif	# Darwin
 endif	# SunOS
 
 LIBARCH		= $(ARCH)
@@ -118,7 +131,7 @@
 BINUTILSDIR	= $(shell cd $(BINUTILS);pwd)
 endif
 
-CPPFLAGS	+= -I$(BINUTILSDIR)/include -I$(BINUTILS)/bfd -I$(TARGET_DIR)/bfd
+CPPFLAGS	+= -I$(BINUTILSDIR)/include -I$(BINUTILSDIR)/bfd -I$(TARGET_DIR)/bfd
 CPPFLAGS	+= -DLIBARCH_$(LIBARCH) -DLIBARCH=\"$(LIBARCH)\" -DLIB_EXT=\"$(LIB_EXT)\"
 
 TARGET_DIR	= build/$(OS)-$(JDKARCH)


Please note, that the last change (BINUTILS -> BINUTILSDIR) points to a bug in the original Makefile while everything else is extension to support OSX.


claudio
-- 
Claudio Nieder, Talweg 6, CH-8610 Uster, Tel +4179 357 6743, www.claudio.ch






More information about the macosx-port-dev mailing list