#20926: C++11 workarounds
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner:
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-7.3
Component: packages: | Resolution:
standard |
Keywords: gcc6 c++11 c++14 | Merged in:
Authors: Volker Braun | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vbraun/c__11_workarounds | 86e6a4b21cb4a51c2aa9ed8d01b62239b8fdbd13
Dependencies: #20927 #20741 | Stopgaps:
#20738 |
-------------------------------------+-------------------------------------
Comment (by leif):
Replying to [comment:35 leif]:
> [comment:21 As mentioned], I'd prefer if we only mess with optimization
flags when necessary (i.e., only disable some in Singular's `spkg-install`
if `$CXX` is really GCC 6.x).
P.S.: There should be a `2>/dev/null` in {{{`$CXX -dumpversion`}}}, and
while I don't mind re-exporting CXXFLAGS, I'd move their modification a
bit up (to not mix it with changes to`MAKE`):
{{{
#!diff
diff --git a/build/pkgs/singular/spkg-install b/build/pkgs/singular/spkg-
install
index 0b21be7..024b1e1 100755
--- a/build/pkgs/singular/spkg-install
+++ b/build/pkgs/singular/spkg-install
@@ -73,10 +73,18 @@ export CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"
export CXXFLAGS="$CXXFLAGS -fPIC"
export CFLAGS="$CFLAGS -fPIC"
+# Workaround for GCC6: https://trac.sagemath.org/ticket/20926
+case `$CXX -dumpversion 2>/dev/null` in
+ 6|6.*)
+ export CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks -fno-
strict-overflow"
+ ;;
+esac
+
# Singular does not respect LDFLAGS; Ugly hack:
# Used on Linux and Darwin (see singular-3.1.7-use_cxx_for_linking.patch)
export CXX="$CXX $LDFLAGS"
+
# The Sun assembler has problems with -pipe, so disable it.
# This only affects compile time, not the compiled programs/libraries.
if [ "$UNAME" = "SunOS" ]; then
@@ -88,8 +96,6 @@ fi
# parallel sometimes fails (Trac #17774)
export MAKE="$MAKE -j1"
-# Workaround for GCC6: https://trac.sagemath.org/ticket/20926
-export CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks -fno-strict-
overflow"
choose_patches()
{
}}}
--
Ticket URL: <https://trac.sagemath.org/ticket/20926#comment:36>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.