[Numpy-svn] r4478 - branches/numpy.scons/numpy/distutils/scons/core

numpy-svn@scip... numpy-svn@scip...
Tue Nov 20 23:20:22 CST 2007


Author: cdavid
Date: 2007-11-20 23:20:17 -0600 (Tue, 20 Nov 2007)
New Revision: 4478

Modified:
   branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
Log:
Adding -fPIC for shared object fortran code

Modified: branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-20 14:26:44 UTC (rev 4477)
+++ branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-21 05:20:17 UTC (rev 4478)
@@ -115,7 +115,8 @@
 
 def GetNumpyEnvironment(args):
     env = _GetNumpyEnvironment(args)
-    env.AppendUnique(CFLAGS  = env['NUMPY_WARN_CFLAGS'] + env['NUMPY_OPTIM_CFLAGS'] +\
+    env.AppendUnique(CFLAGS  = env['NUMPY_WARN_CFLAGS'] +\
+                               env['NUMPY_OPTIM_CFLAGS'] +\
                                env['NUMPY_DEBUG_SYMBOL_CFLAGS'] +\
                                env['NUMPY_EXTRA_CFLAGS'] +\
                                env['NUMPY_THREAD_CFLAGS'])
@@ -123,9 +124,6 @@
     return env
 
 def initialize_cc(env, path_list):
-    # XXX: how to handle tools which are not in standard location ? Is adding
-    # the full path of the compiler enough ? (I am sure some compilers also
-    # need LD_LIBRARY_SHARED and other variables to be set, too....)
     from SCons.Tool import Tool, FindTool
 
     if len(env['cc_opt']) > 0:
@@ -186,7 +184,9 @@
     env['F77'] = env['_FORTRAND']
 
     if is_f77_gnu(env['F77']):
-        env.AppendUnique(SHF77FLAGS = '-fno-second-underscore')
+        # XXX: this has nothing to do here !
+        env.AppendUnique(SHF77FLAGS = ['-fno-second-underscore'])
+        env.AppendUnique(SHF77FLAGS = ['-fPIC'])
 
 def _GetNumpyEnvironment(args):
     """Call this with args = ARGUMENTS."""
@@ -263,17 +263,11 @@
 
     # t = Tool('npyctpl', 
     #          toolpath = [os.path.dirname(numpy.distutils.scons.tools.__file__)])
-    # try:
-    #     t(env)
-    # except Exception, e:
-    #     pass
+    # t(env)
 
     # t = Tool('npyftpl', 
     #          toolpath = [os.path.dirname(numpy.distutils.scons.tools.__file__)])
-    # try:
-    #     t(env)
-    # except Exception, e:
-    #     pass
+    # t(env)
 
     finalize_env(env)
 



More information about the Numpy-svn mailing list