Skip to content

Commit

Permalink
sysutils/lttng-tools: fix build on powerpc64 elfv2
Browse files Browse the repository at this point in the history
Use GCC unconditionally on powerpc64:
Invalid PPC CTR loop!
UNREACHABLE executed at /poudriere/jails/powerpc64-elfv2-pkubaj/usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp:214!
Stack dump:
0.	Program arguments: /usr/bin/cc -cc1 -triple powerpc64-unknown-freebsd13.0 -emit-obj -disable-free -main-file-name main.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 -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file /wrkdirs/usr/ports/sysutils/lttng-tools/work/lttng-tools-2.9.3/src/bin/lttng-sessiond/main.gcno -resource-dir /usr/lib/clang/9.0.1 -dependency-file .deps/main.Tpo -sys-header-deps -MP -MT main.o -include config.h -isystem /usr/local/include -isystem /usr/local/include -D HAVE_CONFIG_H -I ../../.. -I ../../.. -I ../../../src -I ../../../include -I ../../../include -I ../../../src -D INSTALL_BIN_PATH="/usr/local/lib/lttng/libexec" -D INSTALL_LIB_PATH="/usr/local/lib" -I /usr/local/include -D _THREAD_SAFE -O2 -Wall -fdebug-compilation-dir /wrkdirs/usr/ports/sysutils/lttng-tools/work/lttng-tools-2.9.3/src/bin/lttng-sessiond -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 2 -fno-signed-char -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -o main.o -x c main.c
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'main.c'.
4.	Running pass 'PowerPC CTR Loops Verify' on function '@thread_manage_clients'
#0 0x000000001371e818 (/usr/bin/cc+0x1371e818)
#1 0x000000001371ee94 (/usr/bin/cc+0x1371ee94)
#2 0x000000001371c158 (/usr/bin/cc+0x1371c158)
#3 0x000000001371f60c (/usr/bin/cc+0x1371f60c)
#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.
--- ust-app.o ---
mv -f .deps/ust-app.Tpo .deps/ust-app.Po
--- main.o ---
cc: note: diagnostic msg:
********************
  • Loading branch information
pkubaj committed Feb 9, 2020
1 parent 7a75ac9 commit 7daf7d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sysutils/lttng-tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ INSTALL_TARGET= install-strip

OPTIONS_DEFINE= DOCS

.include <bsd.port.pre.mk>

.if ${ARCH} == powerpc64
USE_GCC= yes
.endif

post-install:
${INSTALL_MAN} ${WRKSRC}/doc/man/*.1 ${STAGEDIR}${MANPREFIX}/man/man1/
${INSTALL_MAN} ${WRKSRC}/doc/man/*.3 ${STAGEDIR}${MANPREFIX}/man/man3/
${INSTALL_MAN} ${WRKSRC}/doc/man/*.8 ${STAGEDIR}${MANPREFIX}/man/man8/

.include <bsd.port.mk>
.include <bsd.port.post.mk>

0 comments on commit 7daf7d7

Please sign in to comment.