Kpdf and -march=pentium4?

Jie Gao gaoj at cpsc.ucalgary.ca
Fri Mar 25 19:11:39 PST 2005


Hi All,

I noticed that while making kdegraphics from ports, if "-march=pentium4"
is in the compiler flags, I will finally get a non-working kpdf. It compiles
fine but when I try to open a pdf file, kdpf will core dupm. But a kpdf
compiled without "-march=pentium4" will work just fine.

For this reason, should we put something in kdegraphics3's Makefile to prevent
a bad kdpf? E.g. a patch like this:

==========8<==========8<==========8<==========8<==========8<==========

--- Makefile~	Sun Mar 20 12:23:32 2005
+++ Makefile	Fri Mar 25 19:59:25 2005
@@ -73,4 +73,11 @@
 	-E -e '/^SUBDIRS/s/(kamera|kooka|kuickshow)//g' \
 		${WRKSRC}/doc/Makefile.in
 
+.if !empty(CFLAGS:M-march=pentium4)
+post-configure:
+	@${ECHO_MSG} Remove unsafe compiler flags for kpdf
+	@${FIND} ${WRKSRC}/kpdf -name Makefile \
+		-exec ${REINPLACE_CMD} 's/ -march=pentium4//g' '{}' \;
+.endif
+
 .include <bsd.port.post.mk>



More information about the freebsd-ports mailing list