Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2012 11:17:28 GMT
From:      Olivier Cochard-Labbe <olivier@cochard.me>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/165502: bsd.port.mk : Proposal patch for fixing TARGET_ARCH uses with somes ports
Message-ID:  <201202271117.q1RBHSN2057151@red.freebsd.org>
Resent-Message-ID: <201202271120.q1RBK41O002769@freefall.freebsd.org>

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

>Number:         165502
>Category:       ports
>Synopsis:       bsd.port.mk : Proposal patch for fixing TARGET_ARCH uses with somes ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 27 11:20:03 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Olivier Cochard-Labbe
>Release:        9.0
>Organization:
BSD Router Project
>Environment:
FreeBSD bigdev.bsdrp.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sat Jan  7 19:32:30 CET 2012     root@bigdev.bsdrp.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Hi,
I found multiple same problem in different ports: PR/165480, PR/147853, PR/151224.
For theses ports, setting TARGET_ARCH for build the port generate an error, here is one example:

cc -O2 -pipe -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -I/usr/local/include/fuse -DFUSE_USE_VERSION=26 -std=gnu99 -g3 -Wall -Wextra -I/usr/local/include -L/usr/local/lib amd64 -c -o extents.o extents.c
cc: amd64: No such file or directory

The patch was the same for all ports by adding this line on the Makefile:
MAKE_ENV+= TARGET_ARCH=

Why not patching bsd.port.mk for fixing the problem for all ports ?
I didn't know how many ports are affected by this problem.
>How-To-Repeat:

>Fix:
Applying the patch attached to Mk/bsd.port.mk.

Patch attached with submission follows:

--- Mk/bsd.port.mk.orig	2012-02-27 11:46:48.000000000 +0100
+++ Mk/bsd.port.mk	2012-02-27 11:47:38.000000000 +0100
@@ -2205,6 +2205,7 @@
 			LDFLAGS="${LDFLAGS}" \
 			CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
 			MANPREFIX="${MANPREFIX}"
+MAKE_ENV+=		TARGET_ARCH=
 
 # Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher.
 # gcc 4.x enable strict aliasing optimization with -O2 which is known to break


>Release-Note:
>Audit-Trail:
>Unformatted:



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