Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2012 22:03:47 +0200 (CEST)
From:      Martin Tournoij <martin@arp242.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/172859: lang/python27 -- python2.7-config --clags wrong value when using clang
Message-ID:  <20121018200347.8D4F317018@mx1.arp242.net>
Resent-Message-ID: <201210182010.q9IKA08T001925@freefall.freebsd.org>

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

>Number:         172859
>Category:       ports
>Synopsis:       lang/python27 -- python2.7-config --clags wrong value when using clang
>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:   Thu Oct 18 20:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Martin Tournoij
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
FreeBSD thinkpad 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

[~]% pkg_info | grep python
python27-2.7.3_3    An interpreted object-oriented programming language
python32-3.2.3_1    An interpreted object-oriented programming language

[~]% grep '$FreeBSD' /ports/lang/python27/Makefile
# $FreeBSD: ports/lang/python27/Makefile,v 1.195 2012/10/03 04:06:37 rm Exp $

[/ports/lang/python32]% cat /etc/make.conf
WRKDIRPREFIX=/usr/obj/

WITH_LCD_FILTERING=yes
WITHOUT_GCONF=yes
NOPORTDOCS=yes

.ifndef (NO_CLANG)
.if !defined(CC) || ${CC} == "cc"
CC=clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif

NO_WERROR=
WERROR=
NO_FSCHG=
.endif

# added by use.perl 2012-10-17 19:43:29
PERL_VERSION=5.14.2


>Description:
If I use clang to build python2.7, I get the following output from
python2.7-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 -O2 -pipe -fno-strict-aliasing

Note the `-OPT:Olimit=0'

If I use GCC4.2 from the base I don't have this:

-I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -DNDEBUG -O2 -pipe -fno-strict-aliasing

I built the port twice with clang. Got the same results.

This is problematic, because all ports using python2.7-config to get their
CFLAGS won't build.

I would guess this line is the culpritm but I didn't investigate:
CONFIGURE_ENV+= OPT="${CFLAGS} ${_PTH_CPPFLAGS}"

Note this problem does not seem to exist with Python 3.2

>How-To-Repeat:
	
>Fix:

	


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



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