From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jun 19 02:00:22 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3630C106564A for ; Sun, 19 Jun 2011 02:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 01FA08FC17 for ; Sun, 19 Jun 2011 02:00:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5J20Lgc073452 for ; Sun, 19 Jun 2011 02:00:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5J20LCH073450; Sun, 19 Jun 2011 02:00:21 GMT (envelope-from gnats) Resent-Date: Sun, 19 Jun 2011 02:00:21 GMT Resent-Message-Id: <201106190200.p5J20LCH073450@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Carl Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B4A8106564A for ; Sun, 19 Jun 2011 01:51:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 210FC8FC15 for ; Sun, 19 Jun 2011 01:51:44 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5J1ph5l035517 for ; Sun, 19 Jun 2011 01:51:43 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p5J1phk0035516; Sun, 19 Jun 2011 01:51:43 GMT (envelope-from nobody) Message-Id: <201106190151.p5J1phk0035516@red.freebsd.org> Date: Sun, 19 Jun 2011 01:51:43 GMT From: Carl To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/158013: devel/gmake: TARGET_ARCH variable prevents cross-compilations X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jun 2011 02:00:22 -0000 >Number: 158013 >Category: ports >Synopsis: devel/gmake: TARGET_ARCH variable prevents cross-compilations >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jun 19 02:00:21 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Carl >Release: FreeBSD-8.2-RELEASE-amd64/i386 >Organization: >Environment: FreeBSD xxxxxxxx 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Please refer to the problem reports listed below which document an issue relating to the use of gmake for building FreeBSD ports. I do not profess to fully understand what is going on, but it seems that gmake incorrectly inserts the value of a TARGET_ARCH variable in the 'cc' compile command line, thereby causing a compilation error if that variable is set (see ports/156607 for example). Although it appears that TARGET_ARCH does not serve a purpose when cross-compiling most FreeBSD ports, it is a variable that users may have set in the build environment for other reasons (eg. same environment used for cross-compiling kernel or world). The obvious workaround of ensuring that variable is unset is possible for cross-compiling most ports. However, it is completely counter-intuitive and non-obvious that a variable which is not used by a port MUST be unset in order for that port to compile. This seems a clear violation of the POLA to me. Unfortunately, not all port maintainers are willing to implement a fix in their port's Makefile. http://www.freebsd.org/cgi/query-pr.cgi?pr=147853 http://www.freebsd.org/cgi/query-pr.cgi?pr=151224 http://www.freebsd.org/cgi/query-pr.cgi?pr=156607 http://www.freebsd.org/cgi/query-pr.cgi?pr=157457 http://www.freebsd.org/cgi/query-pr.cgi?pr=157479 If the FreeBSD gmake port is referencing TARGET_ARCH in a manner that serves no useful purpose in any FreeBSD context, can that functionality be patched out of the gmake port so that users do not have to intuit the undocumented need to unset TARGET_ARCH for ports cross-built with gmake? Carl / K0802647 >How-To-Repeat: Set TARGET_ARCH in the build environment and compile the security/nmap port. >Fix: >Release-Note: >Audit-Trail: >Unformatted: