Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2003 22:29:04 +0100 (CET)
From:      Christian Weisgerber <naddy@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/48506: multimedia/libmpeg2 mcpu build problem on alpha
Message-ID:  <200302202129.h1KLT4o9082852@kemoauc.mips.inka.de>

next in thread | raw e-mail | index | archive | help

>Number:         48506
>Category:       ports
>Synopsis:       multimedia/libmpeg2 mcpu build problem on alpha
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 20 14:20:11 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Christian Weisgerber
>Release:        FreeBSD 5.0-CURRENT alpha
>Organization:
>Environment:
System: FreeBSD kemoauc.mips.inka.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Feb 5 13:01:08 CET 2003 naddy@kemoauc.mips.inka.de:/usr/obj/usr/src/sys/KEMOAUC alpha

>Description:

On alpha, multimedia/libmpeg2 passes -Wa,-mev6 to the compiler in
order to be able to build MVI code.  However, if -mcpu=XXX is passed
in CFLAGS (e.g. from setting CPUTYPE in /etc/mk.conf), it will
override the CPU type.  If that CPU model does not support MVI, the
build will fail:

cc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include -pipe -mcpu=ev56 -Wall -fomit-frame-pointer -Wa,-mev6 -MT idct_alpha.lo -MD -MP -MF .deps/idct_alpha.Tpo -c idct_alpha.c -o .libs/idct_alpha.lo
../include/alpha_asm.h:69: warning: `WORD_VEC' defined but not used
{standard input}: Assembler messages:
{standard input}:969: Error: opcode `maxsw4' not supported for target ev56
{standard input}:975: Error: opcode `minsw4' not supported for target ev56
{standard input}:981: Error: opcode `pkwb' not supported for target ev56
[...]

Whether MVI code is actually used is chosen at run time.  This is
strictly a build time issue.

>How-To-Repeat:

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/multimedia/libmpeg2/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	14 Jan 2003 15:54:22 -0000	1.9
+++ Makefile	20 Feb 2003 21:14:58 -0000
@@ -39,6 +39,12 @@
 CONFIGURE_ARGS+=	--disable-sdl
 .endif
 
+# We must be able to build EV6 code; actual CPU-type optimizations
+# are chosen at runtime.
+.if ${MACHINE_ARCH} == "alpha"
+CFLAGS:=	${CFLAGS:N-mcpu=*}
+.endif
+
 pre-everything::
 	@${ECHO_MSG} "====>"
 .ifndef(WITH_SDL)
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




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