pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/libLLVM libLLVM: use mk/atomic64.mk, remove i386-...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0adc01aaddd1
branches:  trunk
changeset: 389352:0adc01aaddd1
user:      he <he%pkgsrc.org@localhost>
date:      Sun Dec 04 11:28:51 2022 +0000

description:
libLLVM: use mk/atomic64.mk, remove i386-specific hack.

Also copy the use of -mno-pltseq construct for powerpc
from llvm Makefile.  Fixes build problem on macppc-current.

diffstat:

 lang/libLLVM/Makefile |  20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diffs (45 lines):

diff -r d88813aa62cd -r 0adc01aaddd1 lang/libLLVM/Makefile
--- a/lang/libLLVM/Makefile     Sun Dec 04 10:46:14 2022 +0000
+++ b/lang/libLLVM/Makefile     Sun Dec 04 11:28:51 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2022/10/31 14:54:38 triaxx Exp $
+# $NetBSD: Makefile,v 1.43 2022/12/04 11:28:51 he Exp $
 
 DISTNAME=      llvm-13.0.1.src
 PKGNAME=       ${DISTNAME:S/llvm/libLLVM/:S/.src//}
@@ -111,15 +111,22 @@
 PLIST_SUBST+=  SOEXT=${SOEXT}
 PLIST_SUBST+=  LLVM_LIBNAME=${LLVM_LIBNAME}
 
-# needs std::atomic with 64-bit CAS
-.if ${MACHINE_ARCH} == "i386"
-CXXFLAGS+=     -march=i586
-.endif
-
 .if !empty(MACHINE_ARCH:Mpowerpc*)
 # Needed to avoid "relocation truncated to fit: R_PPC_REL24"
 CFLAGS+=       -mlongcall
 CXXFLAGS+=     -mlongcall
+.  if ${OPSYS} == "NetBSD"
+.    if ${OPSYS_VERSION} >= 099917
+# The -mno-pltseq option is not available in gcc7, but is needed for
+# the above-mentioned relocation truncation issue in newer GCC
+CFLAGS+=        -mno-pltseq
+CXXFLAGS+=      -mno-pltseq
+.    endif # (just drop for older NetBSD)
+.  else # Not NetBSD
+# Let's just insist on newer gcc -- untested.
+CFLAGS+=        -mno-pltseq
+CXXFLAGS+=      -mno-pltseq
+.  endif
 .endif
 
 .include "options.mk"
@@ -147,6 +154,7 @@
                ${DESTDIR}${PREFIX}/lib/libLLVM/libLLVM-${PKGVERSION_NOREV}.${SOEXT}
 .endif
 
+.include "../../mk/atomic64.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../lang/python/tool.mk"
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index