Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 2020 14:50:54 +0000 (UTC)
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r523967 - head/net/spread
Message-ID:  <202001241450.00OEosKT071103@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pkubaj
Date: Fri Jan 24 14:50:54 2020
New Revision: 523967
URL: https://svnweb.freebsd.org/changeset/ports/523967

Log:
  net/spread: fix build on powerpc64 elfv2
  
  On ELFv2 ABI Clang can't build this port by default and throws assertion (already reported):
  Assertion failed: ((Op.getOpcode() == ISD::FP_TO_SINT || Subtarget.hasFPCVT()) && "i64 FP_TO_UINT is supported only with FPCVT"), function LowerFP_TO_INTForReuse, file /poudriere/jails/powerpc64-elfv2-pkubaj/usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp, line 7281.
  Stack dump:
  0.	Program arguments: /usr/bin/cc -cc1 -triple powerpc64-unknown-freebsd13.0 -emit-obj -disable-free -main-file-name Spread.c -mrelocation-model pic -pic-level 2 -mthread-model posix -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu ppc64 -target-feature +secure-plt -mfloat-abi hard -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file /wrkdirs/usr/ports/net/spread/work/spread-src-3.17.4/perl/Spread/Spread.gcno -resource-dir /usr/lib/clang/9.0.1 -I ../.. -I ../spread-src-3.17.0/ -D VERSION="3.17.4.4" -D XS_VERSION="3.17.4.4" -D PIC -I /usr/local/lib/perl5/5.30/mach/CORE -O2 -fdebug-compilation-dir /wrkdirs/usr/ports/net/spread/work/spread-src-3.17.4/perl/Spread -ferror-limit 19 -fmessage-length 0 -stack-protector 2 -fno-signed-char -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -o Spread.o -x c Spread.c
  1.	<eof> parser at end of file
  2.	Code generation
  3.	Running pass 'Function Pass Manager' on module 'Spread.c'.
  4.	Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@XS_Spread_receive'
  #0 0x000000001371df18 (/usr/bin/cc+0x1371df18)
  #1 0x000000001371e594 (/usr/bin/cc+0x1371e594)
  #2 0x000000001371b858 (/usr/bin/cc+0x1371b858)
  #3 0x000000001371ed0c (/usr/bin/cc+0x1371ed0c)
  #4 0x000000081520176c (/lib/libthr.so.3+0x1b76c)
  cc: error: unable to execute command: Abort trap (core dumped)
  cc: error: clang frontend command failed due to signal (use -v to see invocation)
  FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
  Target: powerpc64-unknown-freebsd13.0
  Thread model: posix
  InstalledDir: /usr/bin
  cc: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
  cc: note: diagnostic msg:
  ********************
  
  The workaround is to optimize for POWER7, which supports necessary features in hardware.
  
  PR:		243245
  Approved by:	portmaster@bsdforge.com (maintainer timeout)

Modified:
  head/net/spread/Makefile

Modified: head/net/spread/Makefile
==============================================================================
--- head/net/spread/Makefile	Fri Jan 24 14:39:48 2020	(r523966)
+++ head/net/spread/Makefile	Fri Jan 24 14:50:54 2020	(r523967)
@@ -44,6 +44,12 @@ PERL_CONFIGURE_ARGS=	CC="${CC}" CCFLAGS="${CFLAGS}" PR
 
 TARGET_ORDER_OVERRIDE=	710:fix-perl-things
 
+.include <bsd.port.pre.mk>
+
+.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2
+CFLAGS+=	-mcpu=power7
+.endif
+
 post-configure:
 	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
 		${WRKSRC}/docs/${PORTNAME}.1 ${WRKSRC}/docs/spmonitor.1
@@ -74,4 +80,4 @@ post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtspread.so.1
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Spread/Spread.so
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001241450.00OEosKT071103>