From aced7c2b16526fab42544ddd1d108723e3e66c53 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 1 Sep 2016 22:06:31 +0000 Subject: [PATCH] Attempt to fix build on platforms that don't support COMPILER_RT. Make GOLD an amd64-only option (not belived to be a functional change). PR: 212312 --- devel/llvm-devel/Makefile | 16 ++++++++++++++-- devel/llvm38/Makefile | 16 ++++++++++++++-- devel/llvm39/Makefile | 16 ++++++++++++++-- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/devel/llvm-devel/Makefile b/devel/llvm-devel/Makefile index 8b3f7fb4a2dc..cff08241dc9e 100644 --- a/devel/llvm-devel/Makefile +++ b/devel/llvm-devel/Makefile @@ -33,8 +33,8 @@ GH_TAGNAME= ${LLVM_COMMIT} .include "Makefile.snapshot" -OPTIONS_DEFINE= CLANG DOCS EXTRAS GOLD LIT LLD LLDB -OPTIONS_DEFINE_amd64= COMPILER_RT OPENMP +OPTIONS_DEFINE= CLANG DOCS EXTRAS LIT LLD LLDB +OPTIONS_DEFINE_amd64= COMPILER_RT GOLD OPENMP OPTIONS_DEFINE_i386= COMPILER_RT OPTIONS_DEFAULT= CLANG EXTRAS LIT LLD LLDB OPTIONS_DEFAULT_amd64= COMPILER_RT GOLD OPENMP @@ -183,6 +183,18 @@ COMMANDS+= lldb \ _USES_PYTHON= python .endif +.if ! ${OPTIONS_DEFINE:MCOMPILER_RT} +# Hack to disable COMPILER_RT in plist of unsupported architectures +PLIST_SUB+= COMPILER_RT="@comment " +.else +.endif + +.if ! ${OPTIONS_DEFINE:MGOLD} +# Hack to disable GOLD in plist of unsupported architectures +PLIST_SUB+= GOLD="@comment " +.else +.endif + .if ! ${OPTIONS_DEFINE:MOPENMP} # Hack to disable OPENMP in plist of unsupported architectures PLIST_SUB+= OPENMP="@comment " diff --git a/devel/llvm38/Makefile b/devel/llvm38/Makefile index 12d945c77f82..f99d1aa09b07 100644 --- a/devel/llvm38/Makefile +++ b/devel/llvm38/Makefile @@ -32,8 +32,8 @@ SUB_LIST= LLVM_PREFIX="${LLVM_PREFIX}" LLVM_SUFFIX="${LLVM_SUFFIX}" CMAKE_INSTALL_PREFIX= ${LLVM_PREFIX} CMAKE_ARGS= -OPTIONS_DEFINE= CLANG DOCS EXTRAS GOLD LIT LLD LLDB -OPTIONS_DEFINE_amd64= COMPILER_RT OPENMP +OPTIONS_DEFINE= CLANG DOCS EXTRAS LIT LLD LLDB +OPTIONS_DEFINE_amd64= COMPILER_RT GOLD OPENMP OPTIONS_DEFINE_i386= COMPILER_RT OPTIONS_DEFAULT= CLANG EXTRAS LIT LLD LLDB OPTIONS_DEFAULT_amd64= COMPILER_RT GOLD OPENMP @@ -173,6 +173,18 @@ COMMANDS+= argdumper \ _USES_PYTHON= python .endif +.if ! ${OPTIONS_DEFINE:MCOMPILER_RT} +# Hack to disable COMPILER_RT in plist of unsupported architectures +PLIST_SUB+= COMPILER_RT="@comment " +.else +.endif + +.if ! ${OPTIONS_DEFINE:MGOLD} +# Hack to disable GOLD in plist of unsupported architectures +PLIST_SUB+= GOLD="@comment " +.else +.endif + .if ! ${OPTIONS_DEFINE:MOPENMP} # Hack to disable OPENMP in plist of unsupported architectures PLIST_SUB+= OPENMP="@comment " diff --git a/devel/llvm39/Makefile b/devel/llvm39/Makefile index 9a07471bca58..81b143aca13c 100644 --- a/devel/llvm39/Makefile +++ b/devel/llvm39/Makefile @@ -33,8 +33,8 @@ SUB_LIST= LLVM_PREFIX="${LLVM_PREFIX}" LLVM_SUFFIX="${LLVM_SUFFIX}" CMAKE_INSTALL_PREFIX= ${LLVM_PREFIX} CMAKE_ARGS= -OPTIONS_DEFINE= CLANG DOCS EXTRAS GOLD LIT LLD LLDB -OPTIONS_DEFINE_amd64= COMPILER_RT OPENMP +OPTIONS_DEFINE= CLANG DOCS EXTRAS LIT LLD LLDB +OPTIONS_DEFINE_amd64= COMPILER_RT GOLD OPENMP OPTIONS_DEFINE_i386= COMPILER_RT OPTIONS_DEFAULT= CLANG EXTRAS LIT LLD LLDB OPTIONS_DEFAULT_amd64= COMPILER_RT GOLD OPENMP @@ -183,6 +183,18 @@ COMMANDS+= argdumper \ _USES_PYTHON= python .endif +.if ! ${OPTIONS_DEFINE:MCOMPILER_RT} +# Hack to disable COMPILER_RT in plist of unsupported architectures +PLIST_SUB+= COMPILER_RT="@comment " +.else +.endif + +.if ! ${OPTIONS_DEFINE:MGOLD} +# Hack to disable GOLD in plist of unsupported architectures +PLIST_SUB+= GOLD="@comment " +.else +.endif + .if ! ${OPTIONS_DEFINE:MOPENMP} # Hack to disable OPENMP in plist of unsupported architectures PLIST_SUB+= OPENMP="@comment "