CFLAGS are not taken into account properly

T

Toon Knapen

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
 
S

skip

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
 
T

Toon Knapen

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.

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
 
T

Toon Knapen

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.

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
 
S

skip

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
 
T

Toon Knapen

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


Done
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,052
Members
48,769
Latest member
Clifft

Latest Threads

Top