From owner-freebsd-python@FreeBSD.ORG Wed Jun 6 19:48:35 2012 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CEFF106566B; Wed, 6 Jun 2012 19:48:35 +0000 (UTC) (envelope-from mail@sysfault.org) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.31.37]) by mx1.freebsd.org (Postfix) with ESMTP id 0F2A88FC16; Wed, 6 Jun 2012 19:48:35 +0000 (UTC) Received: from [89.182.81.21] (helo=medusa.sysfault.org) by smtprelay03.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1ScMDT-0005qG-TR; Wed, 06 Jun 2012 21:48:28 +0200 Received: from [127.0.0.1] (helo=medusa.sysfault.org) by medusa.sysfault.org with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ScMFK-000KzI-RC; Wed, 06 Jun 2012 21:50:22 +0200 Received: (from marcus@localhost) by medusa.sysfault.org (8.14.5/8.14.5/Submit) id q56JoMlq080679; Wed, 6 Jun 2012 21:50:22 +0200 (CEST) (envelope-from marcus) Date: Wed, 6 Jun 2012 21:50:22 +0200 (CEST) Message-Id: <201206061950.q56JoMlq080679@medusa.sysfault.org> To: FreeBSD-gnats-submit@freebsd.org From: Marcus von Appen X-send-pr-version: 3.113 X-GNATS-Notify: X-Df-Sender: OTM2OTM0 Cc: freebsd-python@freebsd.org Subject: [PATCH]: lang/python26+ must not set OPT X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcus von Appen List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 19:48:35 -0000 >Submitter-Id: current-users >Originator: Marcus von Appen >Organization: >Confidential: no >Synopsis: [PATCH]: lang/python26+ must not set OPT >Severity: non-critical >Priority: medium >Category: ports >Class: sw-bug >Release: FreeBSD 9.0-STABLE amd64 >Environment: System: FreeBSD medusa.sysfault.org 9.0-STABLE FreeBSD 9.0-STABLE #0: Mon May 14 15:08:44 CEST 2012 root@medusa.sysfault.org:/usr/obj/usr/src/sys/MEDUSA amd64 >Description: Python 2.6 and newer implicitly uses the environment's CFLAGS settings for the build of all binaries and modules. The CFLAGS are stored in ${LOCALBASE}/lib/pythonX.X*/config*/Makefile and picked up by distutils for building extension modules. Assigning CFLAGS to OPTS in CONFIGURE_ENV leads to the following issues: * not fully debug clean, since -DNDEBUG is not propagated, although OPT= is a user option, but not a full debug build either * duplicate CFLAGS for extension module, complicating CFLAGS debugging for users * OPT is not for CFLAGS lang/python25- use OPT and other environment variables to influence the build for the target platform, so for the time being OPT needs to receive ${CFLAGS} on those. >How-To-Repeat: Build any of lang/python26+ # sed -n -e '/^CFLAGS=/p' -e '/^OPT=/p' \ /usr/local/lib/pythonX.X/config/Makefile OPT= -DNDEBUG -O2 -fno-strict-aliasing -pipe -march=nocona CFLAGS= $(BASECFLAGS) -O2 -fno-strict-aliasing -pipe -march=nocona $(OPT) $(EXTRA_CFLAGS) >Fix: Index: python26/Makefile =================================================================== RCS file: /home/pcvs/ports/lang/python26/Makefile,v retrieving revision 1.185 diff -u -r1.185 Makefile --- python26/Makefile 31 May 2012 15:17:32 -0000 1.185 +++ python26/Makefile 6 Jun 2012 17:00:00 -0000 @@ -21,7 +21,7 @@ PATCH_WRKSRC= ${PYTHON_WRKSRC} GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure # must be relative -CONFIGURE_ENV= OPT="${CFLAGS}" SVNVERSION="echo freebsd" +CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" MAKE_ENV= VPATH="${PYTHON_WRKSRC}" USE_LDCONFIG= yes MAKE_JOBS_SAFE= yes Index: python27/Makefile =================================================================== RCS file: /home/pcvs/ports/lang/python27/Makefile,v retrieving revision 1.188 diff -u -r1.188 Makefile --- python27/Makefile 31 May 2012 15:17:32 -0000 1.188 +++ python27/Makefile 6 Jun 2012 17:00:00 -0000 @@ -21,7 +21,7 @@ PATCH_WRKSRC= ${PYTHON_WRKSRC} GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure # must be relative -CONFIGURE_ENV= OPT="${CFLAGS}" SVNVERSION="echo freebsd" +CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" MAKE_ENV= VPATH="${PYTHON_WRKSRC}" USE_LDCONFIG= yes MAKE_JOBS_SAFE= yes Index: python31/Makefile =================================================================== RCS file: /home/pcvs/ports/lang/python31/Makefile,v retrieving revision 1.182 diff -u -r1.182 Makefile --- python31/Makefile 31 May 2012 10:13:55 -0000 1.182 +++ python31/Makefile 6 Jun 2012 17:00:00 -0000 @@ -21,7 +21,7 @@ PATCH_WRKSRC= ${PYTHON_WRKSRC} GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure # must be relative -CONFIGURE_ENV= OPT="${CFLAGS}" SVNVERSION="echo freebsd" +CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" MAKE_ENV= VPATH="${PYTHON_WRKSRC}" MAKE_JOBS_SAFE= yes USE_LDCONFIG= yes Index: python32/Makefile =================================================================== RCS file: /home/pcvs/ports/lang/python32/Makefile,v retrieving revision 1.186 diff -u -r1.186 Makefile --- python32/Makefile 31 May 2012 10:13:55 -0000 1.186 +++ python32/Makefile 6 Jun 2012 17:00:00 -0000 @@ -21,7 +21,7 @@ PATCH_WRKSRC= ${PYTHON_WRKSRC} GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure # must be relative -CONFIGURE_ENV= OPT="${CFLAGS}" SVNVERSION="echo freebsd" +CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" MAKE_ENV= VPATH="${PYTHON_WRKSRC}" MAKE_JOBS_SAFE= yes USE_LDCONFIG= yes