#21064: Enable NTL's '-march=native' more cautiously
-------------------------------------+-------------------------------------
       Reporter:  leif               |        Owner:  leif
           Type:  defect             |       Status:  needs_review
       Priority:  blocker            |    Milestone:  sage-7.3
      Component:  packages:          |   Resolution:
  standard                           |
       Keywords:  assembler shlx     |    Merged in:
  mulx                               |
        Authors:  Leif Leonhardy     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/leif/enable_NTL_native_more_safely|  
41ea5daf35f02a6e53bd62a08a423a472edbb2d4
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by leif):

 Replying to [comment:16 jdemeyer]:
 > Replying to [comment:14 leif]:
 > > And I fail to see where it's "fragile"
 >
 > The part where you are checking version numbers in strings. This
 `2.2[2-9]*|2.3*)` for example is a very wrong way to test for a version
 number >= 2.22.

 Show me a system where GAS 2.3 is used (and Sage at least partially
 builds)...

 (Fixed that though.)

 \\

 > But even if you fix that, you still have to "parse" the output of `as
 --version` correctly.

 If it contains `LLVM`, it's LLVM's `as`, certainly not GAS at least, and
 completely sufficient ''here''.

 If you instead meant to refer to `as -v`,
 {{{
 #!sh
         GAS_VERSION=$( ${AS:-as} -v </dev/null -o /dev/null 2>&1 \
             | sed  -n '/GNU assembler/s/^.* \([12]\.[^ ][^ ]*\).*$/\1/p' )
 }}}
 works for all versions I encountered in this context (namely, Sage).  This
 is `spkg-install`, not `configure.ac`.  (Note that GAS doesn't support
 anything like `-dumpversion`, and distro packagers mess up what vanilla
 GAS gives.)

 \\

 And, again repeating myself, I'm not going to mess with Darwin and Xcode
 versions here, that belongs elsewhere.  (You may have noticed that I do
 not even check whether we're on Darwin if GAS is 1.38 or LLVM's assembler
 is present, because that's far beyond what we need here.  This ticket
 works around a fall-out of other bugs in Sage:  Not properly checking /
 requiring Xcode versions, and installing a GCC which may not fit, hence
 break, the other parts of the toolchain -- that's why I'm voting for
 offering an adequate binutils Sage package.)

--
Ticket URL: <https://trac.sagemath.org/ticket/21064#comment:19>
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.

Reply via email to