summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2021-07-19 16:18:48 +0000
committertnn <tnn@pkgsrc.org>2021-07-19 16:18:48 +0000
commit2873307848087aa8a366b6cc9912bec7987f54be (patch)
tree207ef9677008d1a5012e40f9ce4cc7684c913441 /lang
parentf65a9699de956b710548ad190d92cbc048c88ad0 (diff)
downloadpkgsrc-2873307848087aa8a366b6cc9912bec7987f54be.tar.gz
llvm: move powerpc fix from options.mk to Makefile
Compiler options/fixes pertaining to the host compiler should not depend on the target selection.
Diffstat (limited to 'lang')
-rw-r--r--lang/llvm/Makefile8
-rw-r--r--lang/llvm/options.mk5
2 files changed, 8 insertions, 5 deletions
diff --git a/lang/llvm/Makefile b/lang/llvm/Makefile
index 566f10257bb..1e0efdc01c1 100644
--- a/lang/llvm/Makefile
+++ b/lang/llvm/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.65 2021/07/19 13:55:37 jperkin Exp $
+# $NetBSD: Makefile,v 1.66 2021/07/19 16:18:48 tnn Exp $
#
# when updating this, please also update:
# devel/include-what-you-use
@@ -102,6 +102,12 @@ PLIST_SUBST+= SOEXT=${SOEXT}
CXXFLAGS+= -march=i586
.endif
+.if !empty(MACHINE_ARCH:Mpowerpc*)
+# Needed to avoid "relocation truncated to fit: R_PPC_REL24"
+CFLAGS+= -mlongcall
+CXXFLAGS+= -mlongcall
+.endif
+
.include "options.mk"
# replacing config.guess is required even for cmake.
diff --git a/lang/llvm/options.mk b/lang/llvm/options.mk
index fc8b8114047..433b3c293de 100644
--- a/lang/llvm/options.mk
+++ b/lang/llvm/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.9 2021/07/12 18:41:02 adam Exp $
+# $NetBSD: options.mk,v 1.10 2021/07/19 16:18:48 tnn Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.llvm
@@ -26,9 +26,6 @@ PKG_SUGGESTED_OPTIONS+= terminfo
PKG_SUGGESTED_OPTIONS+= llvm-target-sparc
.elif !empty(MACHINE_ARCH:Mpowerpc*)
PKG_SUGGESTED_OPTIONS+= llvm-target-powerpc
-# Needed to avoid "relocation truncated to fit: R_PPC_REL24"
-CFLAGS+= -mlongcall
-CXXFLAGS+= -mlongcall
.elif !empty(MACHINE_ARCH:Mearm*)
PKG_SUGGESTED_OPTIONS+= llvm-target-arm
.elif !empty(MACHINE_ARCH:M*mips*)