Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2009 18:22:45 GMT
From:      Rikiya YONEMOTO <fbsd-send-pr-200903@lackaday.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/132783: ports/Mk/bsd.port.mk: ${ARCH} misuse for "--build" option of GNU configure
Message-ID:  <200903181822.n2IIMjI3027544@www.freebsd.org>
Resent-Message-ID: <200903181830.n2IIU6xn010199@freefall.freebsd.org>

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

>Number:         132783
>Category:       ports
>Synopsis:       ports/Mk/bsd.port.mk: ${ARCH} misuse for "--build" option of GNU configure
>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:   Wed Mar 18 18:30:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Rikiya YONEMOTO
>Release:        
>Organization:
>Environment:
$FreeBSD: ports/Mk/bsd.port.mk,v 1.612 2009/03/05 17:56:23 skv Exp $
>Description:
1. CONFIGURE_TARGET is used as "--build=${CONFIGURE_TARGET}"
  not for "--host="/"--target=" in different than the name.
2. Disregarding CONFIGURE_TARGET is used for "--build",
  CONFIGURE_TARGET is defined as "${ARCH}-portbld-freebsd${OSREL}".
  It should be "${MACHINE_ARCH}-portbld-freebsd${OSREL}" for "--build=".
  in acording to ARCH description in bsd.port.mk.
3. Specifying machine field ("portbld") only for "--build=" can be problem.


1-2:
 This can cause problem if anyone try to build some packages (including 
but not limited to: lang/gcc43) on cross with defining ARCH as target
(e.g. building "packages for FreeBSD/sun4v" on FreeBSD/amd64 box).

3:
  build="i386-portbld-freebsd6.4" (bsd.port.mk specified)
   and
  host="i386-unknown-freebsd6.4" (configure decided)
  can be considered as cross on comparison like:
    if test "${build}" = "${host}"; then
     echo "It is native"
    else
     echo "It is cross"
    fi
  This was the case happened on ports/lang/gcc33. See PR:ports/132379.

>How-To-Repeat:

>Fix:
This would be a design issue of Ports, so, approach decision should be 
decided by Ports Management Team, I guess. Atleast not by me.
Here just an approach example(not sure)(also as a part of problem description):
..
CONFIGURE_BUILD?=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_BUILD:=${CONFIGURE_BUILD:S/--build=//}
CONFIGURE_HOST?=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_HOST:=${CONFIGURE_BUILD:S/--host=//}
CONFIGURE_TARGET?=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_TARGET:=${CONFIGURE_BUILD:S/--target=//}
..
# Even for configures generated by autoconf-2.13 ?
  _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --build=${CONFIGURE_BUILD} --host=${CONFIGURE_HOST} --target=${CONFIGURE_TARGET}" ;\
..


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



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