Ticket #11757: trac_11757_m4ri_sse2.patch

File trac_11757_m4ri_sse2.patch, 1.3 KB (added by malb, 8 years ago)
  • module_list.py

    # HG changeset patch
    # User Martin Albrecht <martinralbrecht@googlemail.com>
    # Date 1317668419 -3600
    # Node ID 4b6f6f039a4d7ce9558d4c5f158013b28ccb74d2
    # Parent  81f706b3071ddc9ca9e87753ecc43ad55c8b8fdb
    #11757 use __M4RI_SIMD_CFLAGS to set msse2 and friends.
    
    diff -r 81f706b3071d -r 4b6f6f039a4d module_list.py
    a b  
    6262#########################################################
    6363
    6464import ast
    65 m4ri_have_sse2 = False
     65m4ri_extra_compile_args = []
    6666for line in open(SAGE_INC + "m4ri/m4ri_config.h"):
    67     if not line.startswith("#define __M4RI_HAVE_SSE2"):
     67    if not line.startswith("#define __M4RI_SIMD_CFLAGS"):
    6868        continue
    69     m4ri_have_sse2 = bool(ast.literal_eval(line[len("#define __M4RI_HAVE_SSE2"):].strip()))
     69    m4ri_sse2_cflags = ast.literal_eval(line[len("#define __M4RI_SIMD_CFLAGS"):].strip())
     70    m4ri_extra_compile_args = [flag.strip() for flag in m4ri_sse2_cflags.split(" ") if flag.strip()]
    7071    break
    7172
    72 if m4ri_have_sse2:
    73     m4ri_extra_compile_args = ['-msse', '-msse2']
    74 else:
    75     m4ri_extra_compile_args = []
    76 
    7773#########################################################
    7874### PolyBoRi defines
    7975#########################################################