Date: Sun, 13 Oct 2013 18:46:09 GMT From: Pawel Pekala <pawel@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/182952: [PATCH] lang/python wrong cflags in python-config on systems where cc = clang Message-ID: <201310131846.r9DIk9hs093451@oldred.freebsd.org> Resent-Message-ID: <201310131850.r9DIo0Dn011969@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310131846.r9DIk9hs093451>