Subject: pkg/33769: multimedia/mjpegtools fails to build under amd64 (includes fix)
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 06/19/2006 19:55:00
>Number:         33769
>Category:       pkg
>Synopsis:       multimedia/mjpegtools fails to build under amd64 (includes fix)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 19 19:55:00 +0000 2006
>Release:        NetBSD 3.99.21
System: NetBSD 3.99.21 NetBSD 3.99.21 (ATLAS) #0: Tue Jun 13 23:23:19 CEST 2006 amd64
Architecture: x86_64
Machine: amd64
	multimedia/mjpegtools fails to build under current/amd64 because of 
assembler errors due to a wrong CPU detection. mjpegtools assumes that on an
amd64 platform __LP64___ is defined, which turns out not to be the case. 
There appears to be some confusion as to whether code should check for
__LP64__ or _LP64.
	try to build multimedia/mjpegtools on a (current ?) amd64
The pragmatic approach is to check for either __LP64__ or _LP64, hoping that
at least one of these is set.


--- utils/cpu_accel.c.orig	2005-03-31 23:20:51.000000000 +0200
+++ utils/cpu_accel.c
@@ -117,7 +117,7 @@ static int x86_accel (void)
 	/* Slightly weirdified cpuid that preserves the ebx and edi required
 	   by gcc for PIC offset table and frame pointer */
-#ifdef __LP64__
+#if defined(__LP64__) || defined(_LP64)
 #  define REG_b "rbx"
 #  define REG_S "rsi"