Ticket #3001 (assigned defect)

Opened 9 months ago

Last modified 9 months ago

sage ignores custom environment variables

Reported by: dfdeshom Assigned to: mabshoff (accepted)
Priority: critical Milestone: sage-3.4
Component: build Keywords:
Cc:

Description

In sage-spkg "gcc -v" is used, instead of "${CC-gcc} -v". Easy fix:

---------------------------------------------------------------
--- a/sage-spkg Mon Apr 21 01:43:53 2008 -0700
+++ b/sage-spkg Tue Apr 22 12:37:48 2008 -0300
@@ -241,8 +241,8 @@

 echo "****************************************************"
 echo "GCC Version"
-echo "gcc -v"
-gcc -v
+echo "${CC-gcc} -v"
+${CC-gcc} -v
 if [ $? -ne 0 ]; then
   echo "Unable to determine gcc version."
 fi
---------------------------------------------------------------

In sage-env, tests if CC is gcc, which means "CC=gcc-4.3" might not work exactly the same as if gcc is a symlink to gcc-4.3, for instance:

if [ "$SAGE64" = "yes" -a CC = "gcc" ]; then
  CFLAGS="$CFLAGS -m64"
fi

Change History

04/26/2008 03:46:04 AM changed by mabshoff

  • status changed from new to assigned.

04/26/2008 03:50:37 AM changed by mabshoff

After thinking about this a little more: ${CC-gcc} is gcc specific and we can no longer assume that we are compiling with gcc in the first place. Hence I would like to suggest that we use CC and CXX in those places and make sure in sage-env that they are set.

Cheers,

Michael