-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
-
x86
-
os_x
Changes to target MacOS 10.7 from builds on 10.8 use a flag that implicitly set a preprocessor symbol, and the symbol is checked by MacOS include files. Parfait doesn't know about the implicit link between flag and symbol, and thus fails in the preprocessor. This was observed with "old build" for hotspot, but it should repeat whenever Parfait is used to build on MacOS.
flag: -mmacosx-version-min=
symbol: MAC_OS_X_VERSION_MIN_REQUIRED
failure:
In file included from /usr/include/dlfcn.h:41:
/usr/include/AvailabilityMacros.h:140:6: error: MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED
#error MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED
^
1 error generated.
Proposed fix that was observed to work for old-building hotspot:
diff --git a/make/bsd/makefiles/gcc.make b/make/bsd/makefiles/gcc.make
--- a/make/bsd/makefiles/gcc.make
+++ b/make/bsd/makefiles/gcc.make
@@ -239,6 +239,7 @@
endif
# The macro takes the version with no dots, ex: 1070
CFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \
+ -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
-mmacosx-version-min=$(MACOSX_VERSION_MIN)
LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
endif
This change probably needs to be applied to two other make files.
See also:JDK-8008451, JDK-8005879
flag: -mmacosx-version-min=
symbol: MAC_OS_X_VERSION_MIN_REQUIRED
failure:
In file included from /usr/include/dlfcn.h:41:
/usr/include/AvailabilityMacros.h:140:6: error: MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED
#error MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED
^
1 error generated.
Proposed fix that was observed to work for old-building hotspot:
diff --git a/make/bsd/makefiles/gcc.make b/make/bsd/makefiles/gcc.make
--- a/make/bsd/makefiles/gcc.make
+++ b/make/bsd/makefiles/gcc.make
@@ -239,6 +239,7 @@
endif
# The macro takes the version with no dots, ex: 1070
CFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \
+ -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
-mmacosx-version-min=$(MACOSX_VERSION_MIN)
LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
endif
This change probably needs to be applied to two other make files.
See also: