From nobody@FreeBSD.org  Tue Oct  5 10:02:08 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3EB331065670
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Oct 2010 10:02:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D3FB8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  5 Oct 2010 10:02:08 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o95A27aF021338
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 5 Oct 2010 10:02:07 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o95A27xL021337;
	Tue, 5 Oct 2010 10:02:07 GMT
	(envelope-from nobody)
Message-Id: <201010051002.o95A27xL021337@www.freebsd.org>
Date: Tue, 5 Oct 2010 10:02:07 GMT
From: Olivier Cochard-Labb <olivier@cochard.me>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [multimedia/x264] setting TARGET_ARCH variable prevent to compile
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151224
>Category:       ports
>Synopsis:       multimedia/x264: setting TARGET_ARCH variable prevent to compile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    mm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 05 10:10:00 UTC 2010
>Closed-Date:    Mon Nov 22 15:48:52 UTC 2010
>Last-Modified:  Mon Feb 27 09:40:09 UTC 2012
>Originator:     Olivier Cochard-Labb
>Release:        8.1
>Organization:
BSD Media Center
>Environment:
FreeBSD d630.bsdrp.net 8.1-RELEASE FreeBSD 8.1-RELEASE #73: Sat Jul 24 10:33:11 CEST 2010     root@d630.bsdrp.net:/usr/obj/usr/src/sys/DellD630  amd64
>Description:
When using this make command line:
env TARGET_ARCH=amd64 make

or this command line:
env TARGET_ARCH=i386 make

The make process generate a bad compilation line and failed by displaying this message:

(etc...)
cc -Wshadow -O3 -ffast-math -O2 -pipe -fno-strict-aliasing -Wall -I.  -O2 -pipe -fno-strict-aliasing -fPIC -I/usr/local/include -std=gnu99 -s -fomit-frame-pointer  i386 -c -o common/mc.o common/mc.c
cc: i386: No such file or directory
gmake: *** [common/mc.o] Error 1
gmake: *** Waiting for unfinished jobs....
*** Error code 1

Stop in /usr/ports/multimedia/x264.
*** Error code 1

We can notice that the value of the variable TARGET_ARCH is put just after the "-fomit-frame-pointer" and before the "-c -o common/mc.o" options: Something missing.
>How-To-Repeat:
When using this make command line:
env TARGET_ARCH=amd64 make

or this command line:
env TARGET_ARCH=i386 make
>Fix:
Same solution than with PR/147853 (patch included)

Patch attached with submission follows:

--- Makefile.orig	2010-10-05 11:35:51.000000000 +0200
+++ Makefile	2010-10-05 11:36:24.000000000 +0200
@@ -23,6 +23,7 @@
 EXTRACT_AFTER_ARGS?=	| ${TAR} -xf - --exclude .svn
 WRKSRC=		${WRKDIR}/${DISTNAME}
 USE_GMAKE=	yes
+MAKE_ENV+=  TARGET_ARCH=
 USE_LDCONFIG=	yes
 HAS_CONFIGURE=	yes
 MAKE_JOBS_SAFE=	yes


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mm 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Oct 5 10:10:09 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151224 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/151224: commit references a PR
Date: Mon, 22 Nov 2010 15:36:36 +0000 (UTC)

 mm          2010-11-22 15:36:31 UTC
 
   FreeBSD ports repository
 
   Modified files:
     multimedia/x264      Makefile 
   Log:
   - Clear ARCH and TARGET_ARCH in configure and make environment
   
   PR:             ports/151224
   Submitted by:   Olivier Cochard-Labbé <olivier@cochard.me>
   
   Revision  Changes    Path
   1.79      +4 -7      ports/multimedia/x264/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: mm 
State-Changed-When: Mon Nov 22 15:48:50 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151224 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/151224: commit references a PR
Date: Mon, 27 Feb 2012 09:39:07 +0000 (UTC)

 ehaupt      2012-02-27 09:38:57 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/fusefs-ext4fuse Makefile 
   Log:
   Explicitly empty TARGET_ARCH to prevent build problems when cross compiling.
   
   PR:             151224
   Submitted by:   Olivier Cochard-Labb <olivier@cochard.me>
   
   Revision  Changes    Path
   1.2       +3 -0      ports/sysutils/fusefs-ext4fuse/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
