CFLAGS are not taken into account properly

CFLAGS are not taken into account properly

Post by Toon Knape » Thu, 18 May 2006 16:40:40


To configure python on a Solaris 9 box with sunstudio11 installed and to
compile it in 64bit, I execute following:

<code>
export CC=cc
export CFLAGS="-xarch=v9"
export CXX=CC
export CXXFLAGS="-xarch=v9"
export F77=f77
export FFLAGS="-xarch=v9"
export LDFLAGS="-xarch=v9"
./configure
</code>


When doing 'make' afterwards, the '-xarch=v9' option is not on the
command-line however? Should'nt the CFLAGS be propagated to the Makefile
that is generated by configure? Or is there any other way to do this?

Thanks in advance,

toon
 
 
 

CFLAGS are not taken into account properly

Post by skip » Thu, 18 May 2006 20:34:28


Toon> To configure python on a Solaris 9 box with sunstudio11 installed
Toon> and to compile it in 64bit, I execute following:

Toon> <code>
Toon> export CC=cc
Toon> export CFLAGS="-xarch=v9"
Toon> export CXX=CC
Toon> export CXXFLAGS="-xarch=v9"
Toon> export F77=f77
Toon> export FFLAGS="-xarch=v9"
Toon> export LDFLAGS="-xarch=v9"
Toon> ./configure
Toon> </code>

Toon> When doing 'make' afterwards, the '-xarch=v9' option is not on the
Toon> command-line however? Should'nt the CFLAGS be propagated to the
Toon> Makefile that is generated by configure? Or is there any other way
Toon> to do this?

I agree, the Python configure/Makefile combination doesn't conform very well
to current GNU style in this regard. Try setting EXTRA_CFLAGS instead of
CFLAGS.

Skip

 
 
 

CFLAGS are not taken into account properly

Post by Toon Knape » Thu, 18 May 2006 21:39:14


Thanks.

But some other (but 'similar') functionality is broken. Now I succeeded
in compiling python. But when using distutils (e.g. when installing
numarray using the setup.py), python will compile the files using the
'-xarch=v9' option but drops this option when linking dynamic libraries
(although I defined LDFLAGS="-xarch=v9" before configuring python).
Additionally python adds the option '-xcode=pic32' to the
compile-command which will compile my numarray in 32bit instead of 64bit
(while python itself is in 64bit)

toon
 
 
 

CFLAGS are not taken into account properly

Post by Toon Knape » Thu, 18 May 2006 21:39:14


Thanks.

But some other (but 'similar') functionality is broken. Now I succeeded
in compiling python. But when using distutils (e.g. when installing
numarray using the setup.py), python will compile the files using the
'-xarch=v9' option but drops this option when linking dynamic libraries
(although I defined LDFLAGS="-xarch=v9" before configuring python).
Additionally python adds the option '-xcode=pic32' to the
compile-command which will compile my numarray in 32bit instead of 64bit
(while python itself is in 64bit)

toon
 
 
 

CFLAGS are not taken into account properly

Post by skip » Fri, 19 May 2006 01:06:03


Toon> But some other (but 'similar') functionality is broken. Now I
Toon> succeeded in compiling python. But when using distutils (e.g. when
Toon> installing numarray using the setup.py), python will compile the
Toon> files using the '-xarch=v9' option but drops this option when
Toon> linking dynamic libraries (although I defined LDFLAGS="-xarch=v9"
Toon> before configuring python). Additionally python adds the option
Toon> '-xcode=pic32' to the compile-command which will compile my
Toon> numarray in 32bit instead of 64bit (while python itself is in
Toon> 64bit)

That seems like a bug in distutils. Can you submit a help ticket?

Skip
 
 
 

CFLAGS are not taken into account properly

Post by Toon Knape » Sat, 20 May 2006 22:06:24


Done