forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for errors encountered compiling for OSX
* add OSX specific uma artifacts * update uma artifacts with osx requirements Signed-off-by: Joe deKoning <[email protected]>
- Loading branch information
1 parent
a760cef
commit 28210be
Showing
8 changed files
with
230 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
############################################################################### | ||
# Copyright (c) 2017, 2017 IBM Corp. and others | ||
# | ||
# This program and the accompanying materials are made available under | ||
# the terms of the Eclipse Public License 2.0 which accompanies this | ||
# distribution and is available at http://eclipse.org/legal/epl-2.0 | ||
# or the Apache License, Version 2.0 which accompanies this distribution | ||
# and is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# This Source Code may also be made available under the following Secondary | ||
# Licenses when the conditions for such availability set forth in the | ||
# Eclipse Public License, v. 2.0 are satisfied: GNU General Public License, | ||
# version 2 with the GNU Classpath Exception [1] and GNU General Public | ||
# License, version 2 with the OpenJDK Assembly Exception [2]. | ||
# | ||
# [1] https://www.gnu.org/software/classpath/license.html | ||
# [2] http://openjdk.java.net/legal/assembly-exception.html | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
############################################################################### | ||
|
||
TEMP_TARGET_DATASIZE:=64 | ||
|
||
include $(CONFIG_INCL_DIR)/configure_common.mk | ||
|
||
CONFIGURE_ARGS += \ | ||
--enable-OMR_EXAMPLE \ | ||
--enable-OMR_GC \ | ||
--enable-OMR_JITBUILDER \ | ||
--enable-OMR_PORT \ | ||
--enable-OMR_THREAD \ | ||
--enable-OMR_OMRSIG \ | ||
--enable-OMRTHREAD_LIB_UNIX \ | ||
--enable-OMR_ARCH_X86 \ | ||
--enable-OMR_ENV_DATA64 \ | ||
--enable-OMR_ENV_LITTLE_ENDIAN \ | ||
--enable-OMR_GC_TLH_PREFETCH_FTA \ | ||
--enable-OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS \ | ||
--enable-OMR_TEST_COMPILER \ | ||
--enable-OMR_THR_FORK_SUPPORT \ | ||
--enable-OMR_THR_THREE_TIER_LOCKING \ | ||
--enable-OMR_THR_YIELD_ALG \ | ||
--enable-OMR_GC_ARRAYLETS \ | ||
--enable-OMR_THR_SPIN_WAKE_CONTROL | ||
|
||
|
||
CONFIGURE_ARGS += libprefix=lib exeext= solibext=.dylib arlibext=.a objext=.o | ||
|
||
CONFIGURE_ARGS += 'AS=as' | ||
CONFIGURE_ARGS += 'CC=cc' | ||
CONFIGURE_ARGS += 'CXX=c++' | ||
CONFIGURE_ARGS += 'CCLINK=$$(CC)' | ||
CONFIGURE_ARGS += 'CXXLINKSHARED=$$(CC)' | ||
CONFIGURE_ARGS += 'CXXLINKEXE=$$(CXX)' | ||
CONFIGURE_ARGS += 'AR=ar' | ||
|
||
CONFIGURE_ARGS += 'OMR_HOST_OS=osx' | ||
CONFIGURE_ARGS += 'OMR_HOST_ARCH=x86' | ||
CONFIGURE_ARGS += 'OMR_TARGET_DATASIZE=$(TEMP_TARGET_DATASIZE)' | ||
CONFIGURE_ARGS += 'OMR_TOOLCHAIN=gcc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
<#-- | ||
Copyright (c) 1998, 2017 IBM Corp. and others | ||
This program and the accompanying materials are made available under | ||
the terms of the Eclipse Public License 2.0 which accompanies this | ||
distribution and is available at https://www.eclipse.org/legal/epl-2.0/ | ||
or the Apache License, Version 2.0 which accompanies this distribution and | ||
is available at https://www.apache.org/licenses/LICENSE-2.0 | ||
This Source Code may also be made available under the following | ||
Secondary Licenses when the conditions for such availability set | ||
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU | ||
General Public License, version 2 with the GNU Classpath | ||
Exception [1] and GNU General Public License, version 2 with the | ||
OpenJDK Assembly Exception [2]. | ||
[1] https://www.gnu.org/software/classpath/license.html | ||
[2] http://openjdk.java.net/legal/assembly-exception.html | ||
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
--> | ||
|
||
<#assign lib_target_rule> | ||
$(UMA_LIBTARGET): $(UMA_OBJECTS) | ||
$(AR) rcv $(UMA_LIBTARGET) $(UMA_OBJECTS) | ||
</#assign> | ||
|
||
<#assign dll_target_rule> | ||
$(UMA_DLLTARGET): $(UMA_OBJECTS) $(UMA_TARGET_LIBRARIES) | ||
$(UMA_DLL_LD) $(UMA_DLL_LINK_FLAGS) \ | ||
$(VMLINK) $(UMA_LINK_PATH) -o $(UMA_DLLTARGET)\ | ||
$(UMA_OBJECTS) \ | ||
$(UMA_DLL_LINK_POSTFLAGS) | ||
</#assign> | ||
|
||
<#assign exe_target_rule> | ||
$(UMA_EXETARGET): $(UMA_OBJECTS) $(UMA_TARGET_LIBRARIES) | ||
$(UMA_EXE_LD) $(UMA_EXE_PREFIX_FLAGS) $(UMA_LINK_PATH) $(VMLINK) \ | ||
$(UMA_OBJECTS) \ | ||
$(UMA_BEGIN_DASH_L) \ | ||
$(UMA_LINK_STATIC_LIBRARIES) \ | ||
$(UMA_END_DASH_L) \ | ||
$(UMA_LINK_SHARED_LIBRARIES) \ | ||
-o $@ $(UMA_EXE_POSTFIX_FLAGS) | ||
</#assign> | ||
|
||
UMA_BEGIN_DASH_L= | ||
UMA_END_DASH_L= | ||
|
||
UMA_EXE_POSTFIX_FLAGS+=-lm -liconv -lc -ldl -lutil -Wl,-rpath,\$$ORIGIN | ||
|
||
<#if uma.spec.processor.amd64> | ||
UMA_MASM2GAS_FLAGS+=--64 | ||
</#if> | ||
|
||
ifndef UMA_DO_NOT_OPTIMIZE_CCODE | ||
<#if uma.spec.properties.uma_optimization_cflags.defined> | ||
UMA_OPTIMIZATION_CFLAGS+=${uma.spec.properties.uma_optimization_cflags.value} | ||
<#else> | ||
<#if uma.spec.processor.amd64> | ||
UMA_OPTIMIZATION_CFLAGS+=-O3 -fno-strict-aliasing | ||
<#else> | ||
UMA_OPTIMIZATION_CFLAGS+=-O | ||
</#if> | ||
</#if> | ||
<#if uma.spec.properties.uma_optimization_cxxflags.defined> | ||
UMA_OPTIMIZATION_CXXFLAGS+=${uma.spec.properties.uma_optimization_cxxflags.value} | ||
<#else> | ||
<#if uma.spec.processor.amd64> | ||
UMA_OPTIMIZATION_CXXFLAGS+=-O3 -fno-strict-aliasing | ||
<#if uma.spec.flags.env_littleEndian.enabled && uma.spec.type.linux> | ||
UMA_OPTIMIZATION_CXXFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 | ||
</#if> | ||
<#else> | ||
UMA_OPTIMIZATION_CXXFLAGS+=-O | ||
</#if> | ||
</#if> | ||
else | ||
UMA_OPTIMIZATION_CFLAGS+=-O0 | ||
UMA_OPTIMIZATION_CXXFLAGS+=-O0 | ||
endif | ||
|
||
|
||
CFLAGS+=$(UMA_OPTIMIZATION_CFLAGS) | ||
CXXFLAGS+=$(UMA_OPTIMIZATION_CXXFLAGS) | ||
|
||
<#if uma.spec.flags.env_gcc.enabled> | ||
CXXFLAGS+=-fno-exceptions -fno-threadsafe-statics | ||
</#if> | ||
|
||
ifdef j9vm_uma_gnuDebugSymbols | ||
CFLAGS+=-g | ||
CXXFLAGS+=-g | ||
endif | ||
|
||
<#if uma.spec.processor.amd64 > | ||
<#-- GCC compilers support dependency generation --> | ||
CFLAGS+=-MMD | ||
CPPFLAGS+=-MMD | ||
CXXFLAGS+=-MMD | ||
</#if> | ||
|
||
CFLAGS+=-DOSX -D_REENTRANT -D_FILE_OFFSET_BITS=64 | ||
CXXFLAGS+=-DOSX -D_REENTRANT -D_FILE_OFFSET_BITS=64 | ||
CPPFLAGS+=-DOSX -D_REENTRANT | ||
|
||
<#-- Add Position Indepdent compile flag --> | ||
CFLAGS+=-fPIC | ||
CXXFLAGS+=-fPIC | ||
|
||
ifdef j9vm_uma_supportsIpv6 | ||
CFLAGS+=-DIPv6_FUNCTION_SUPPORT | ||
CXXFLAGS+=-DIPv6_FUNCTION_SUPPORT | ||
CPPFLAGS+=-DIPv6_FUNCTION_SUPPORT | ||
endif | ||
|
||
<#if uma.spec.processor.amd64> | ||
CFLAGS+=-DJ9HAMMER -m64 | ||
CXXFLAGS+=-DJ9HAMMER -m64 | ||
CPPFLAGS+=-DJ9HAMMER -m64 | ||
</#if> | ||
|
||
UMA_DLL_LINK_FLAGS+=-shared -install_name lib$(UMA_TARGET_NAME).dylib | ||
ifdef UMA_USING_LD_TO_LINK | ||
UMA_DLL_LINK_FLAGS+=origin -rpath \$$ORIGIN --disable-new-dtags | ||
else | ||
UMA_DLL_LINK_FLAGS+=-Xlinker -rpath -Xlinker \$$ORIGIN | ||
endif | ||
|
||
UMA_DLL_LINK_POSTFLAGS+=$(UMA_LINK_STATIC_LIBRARIES) | ||
UMA_DLL_LINK_POSTFLAGS+=$(UMA_LINK_SHARED_LIBRARIES) | ||
|
||
ifdef j9vm_uma_gnuDebugSymbols | ||
UMA_DLL_LINK_POSTFLAGS+=-g | ||
endif | ||
|
||
<#if uma.spec.processor.amd64> | ||
UMA_DLL_LINK_FLAGS+=-m64 | ||
</#if> | ||
|
||
ifdef UMA_IS_C_PLUS_PLUS | ||
UMA_DLL_LINK_POSTFLAGS+=-lc | ||
endif | ||
UMA_DLL_LINK_POSTFLAGS+=-lm | ||
|
||
ifdef UMA_TREAT_WARNINGS_AS_ERRORS | ||
ifndef UMA_SUPPRESS_WARNINGS_AS_ERRORS | ||
CFLAGS+=-Wimplicit -Wreturn-type -Werror | ||
CXXFLAGS+=-Wreturn-type -Werror | ||
endif | ||
endif | ||
|
||
ifdef UMA_ENABLE_ALL_WARNINGS | ||
ifndef UMA_SUPPRESS_ALL_WARNINGS | ||
CFLAGS+=-Wall | ||
CXXFLAGS+=-Wall -Wno-non-virtual-dtor | ||
endif | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters