From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Oct 13 18:50:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A39DF751 for ; Sun, 13 Oct 2013 18:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 803B621A9 for ; Sun, 13 Oct 2013 18:50:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9DIo0xh011970 for ; Sun, 13 Oct 2013 18:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9DIo0Dn011969; Sun, 13 Oct 2013 18:50:00 GMT (envelope-from gnats) Resent-Date: Sun, 13 Oct 2013 18:50:00 GMT Resent-Message-Id: <201310131850.r9DIo0Dn011969@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, Pawel Pekala Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DA21B65B for ; Sun, 13 Oct 2013 18:46:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B87D1219B for ; Sun, 13 Oct 2013 18:46:09 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9DIk9o8093454 for ; Sun, 13 Oct 2013 18:46:09 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9DIk9hs093451; Sun, 13 Oct 2013 18:46:09 GMT (envelope-from nobody) Message-Id: <201310131846.r9DIk9hs093451@oldred.freebsd.org> Date: Sun, 13 Oct 2013 18:46:09 GMT From: Pawel Pekala To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/182952: [PATCH] lang/python wrong cflags in python-config on systems where cc = clang X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 18:50:00 -0000 >Number: 182952 >Category: ports >Synopsis: [PATCH] lang/python wrong cflags in python-config on systems where cc = clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Oct 13 18:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Pawel Pekala >Release: 10.0-CURRENT >Organization: >Environment: FreeBSD blaviken.slowicza.org 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #0 r256150M: Tue Oct 8 17:10:26 CEST 2013 corn@blaviken.slowicza.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: This issue affects FreeBSD 10 with clang as primary compiler (cc). When compiling python configure script wrongly detects that system compiler supports -OPT:Olimit=0 flag: checking whether cc accepts -fno-strict-aliasing... yes checking whether cc accepts -OPT:Olimit=0... yes clang seems to ignore this flags and configure script comes to bad conclusion. This breaks consumers using python-config scripts to get python cflags: [corn:~]> python-config --cflags -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -OPT:Olimit=0 -O2 -pipe -fno-strict-aliasing -DNDEBUG Olimit is there, while clang will be happy to ignore it, gcc will fail. I discovered this trying to build print/lilypond. Upstream bug: http://bugs.python.org/issue877121 lang/python32 and lang/python33 appears to be unaffected by this >How-To-Repeat: >Fix: Patch attached with submission follows: Index: python26/Makefile =================================================================== --- python26/Makefile (wersja 330122) +++ python26/Makefile (kopia robocza) @@ -3,7 +3,7 @@ PORTNAME= python26 PORTVERSION= 2.6.8 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -20,7 +20,7 @@ PATCH_WRKSRC= ${PYTHON_WRKSRC} GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure # must be relative -CONFIGURE_ENV= SVNVERSION="echo freebsd" +CONFIGURE_ENV= SVNVERSION="echo freebsd" ac_cv_opt_olimit_ok=no MAKE_ENV= VPATH="${PYTHON_WRKSRC}" USE_LDCONFIG= yes INSTALL_TARGET= altinstall Index: python27/Makefile =================================================================== --- python27/Makefile (wersja 330122) +++ python27/Makefile (kopia robocza) @@ -3,7 +3,7 @@ PORTNAME= python27 PORTVERSION= 2.7.5 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -17,7 +17,7 @@ PATCH_WRKSRC= ${PYTHON_WRKSRC} GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure # must be relative -CONFIGURE_ENV= SVNVERSION="echo freebsd" +CONFIGURE_ENV= SVNVERSION="echo freebsd" ac_cv_opt_olimit_ok=no MAKE_ENV= VPATH="${PYTHON_WRKSRC}" USE_LDCONFIG= yes INSTALL_TARGET= altinstall Index: python31/Makefile =================================================================== --- python31/Makefile (wersja 330122) +++ python31/Makefile (kopia robocza) @@ -2,7 +2,7 @@ PORTNAME= python31 PORTVERSION= 3.1.5 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -19,7 +19,7 @@ PATCH_WRKSRC= ${PYTHON_WRKSRC} GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure # must be relative -CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" +CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" ac_cv_opt_olimit_ok=no MAKE_ENV= VPATH="${PYTHON_WRKSRC}" USE_LDCONFIG= yes INSTALL_TARGET= altinstall >Release-Note: >Audit-Trail: >Unformatted: