sysutils/i7z fails to compile with clang due to unsupported options. The port does not depend on gcc however and is compiled with clang by default.
Auto-assigned to maintainer zont@FreeBSD.org
Created attachment 147664 [details] Add dependency on GCC. Add dependency on GCC. Clang 3.4 doesn't know about the CFLAGS, hence build will fail without it (and no package will be available).
I tested i7z built by clang without that specific CFLAGS, so I'd suggest the following patch: Index: sysutils/i7z/Makefile =================================================================== --- sysutils/i7z/Makefile (revision 369297) +++ sysutils/i7z/Makefile (working copy) @@ -19,7 +19,9 @@ # Disable scheduling flags as they cause segfaults since they are enabled at # default FreeBSD optimization levels (-O2, -O3, -Os) +.if ${COMPILER_TYPE} == gcc CFLAGS+= -fno-schedule-insns2 -fno-schedule-insns -fno-caller-saves +.endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
Coredumps for me.
(Please see the comments right on top of that ifclause)
Interesting. What hardware do you use? What is your FreeBSD and Clang version?
I get a crash if I compile it with clang (without the unsupported gcc options) as well. I'm on the latest CURRENT with base clang (3.4.1).
Let's turn off Clang optimization then. How do you like this one? Index: sysutils/i7z/Makefile =================================================================== --- sysutils/i7z/Makefile (revision 369297) +++ sysutils/i7z/Makefile (working copy) @@ -17,9 +17,15 @@ ONLY_FOR_ARCHS= i386 amd64 +.include <bsd.port.pre.mk> + +.if ${COMPILER_TYPE} == clang +CFLAGS+= -O0 +.elif ${COMPILER_TYPE} == gcc # Disable scheduling flags as they cause segfaults since they are enabled at # default FreeBSD optimization levels (-O2, -O3, -Os) CFLAGS+= -fno-schedule-insns2 -fno-schedule-insns -fno-caller-saves +.endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
Looks good to me, works and does not require gcc, so best of both worlds. I tested with -O1 and it still crashes, so it looks like -O0 is indeed necessary.
That seems like a good fix, is it going to go in? It's been some time and port is still broken.
Fixed in ports/199186