#16149: sage-env exports empty CXXFLAGS
------------------------+---------------------------------------
   Reporter:  leif      |            Owner:
       Type:  defect    |           Status:  new
   Priority:  critical  |        Milestone:  sage-6.2
  Component:  scripts   |         Keywords:  CFLAGS MPIR C++ ABI
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+---------------------------------------
 That happens if `CFLAGS` are empty (or not exported at all, which
 presumably is the most frequent case) and `CXXFLAGS` aren't either:

 {{{
 #!sh
 if [ "$CXXFLAGS" = "" ]; then
     export CXXFLAGS="$CFLAGS"
 fi
 }}}

 Unintentionally having exported but empty `CXXFLAGS` breaks '''at least'''
 MPIR, because it assumes the user had intentionally set them, so leaves
 them as they are (empty that is), not passing potentially import
 architecture and ABI flags to the C++ compiler (e.g. `-m...` flags to
 `g++`).

 The solution is of course simple:  Don't (set and) export `CXXFLAGS` if
 `CFLAGS` aren't exported either.  Not sure if setting `CXXFLAGS` to
 `CFLAGS` in case the latter are non-empty (or empty but exported) is
 desirable at all.

--
Ticket URL: <http://trac.sagemath.org/ticket/16149>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to