[MacPorts] #41622: fftw-3: enable avx instructions

MacPorts noreply at macports.org
Sun Dec 1 19:20:12 PST 2013


#41622: fftw-3: enable avx instructions
--------------------------+----------------------
  Reporter:  nicos@…      |      Owner:  ram@…
      Type:  enhancement  |     Status:  reopened
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch
      Port:  fftw-3       |
--------------------------+----------------------

Comment (by ram@…):

 I think the following is now correct?

 {{{
 --- a/math/fftw-3/Portfile
 +++ b/math/fftw-3/Portfile
 @@ -52,7 +52,7 @@ configure.cflags-append \
      -fomit-frame-pointer \
      -fstrict-aliasing

 -if { ![string compare ${configure.compiler} "clang"] } {
 +if { [string match *clang* ${configure.compiler}] } {
      set is_clang    1
  } else {
      set is_clang    0
 @@ -97,11 +97,20 @@ platform powerpc {
  subport fftw-3-single {
      configure.args-append --enable-float

 -    array set merger_configure_args {
 -        ppc    "--enable-fma --enable-altivec"
 -        ppc64  "--enable-fma --enable-altivec"
 -        i386   "--enable-sse"
 -        x86_64 "--enable-sse"
 +    if { $is_clang == 1 } {
 +        array set merger_configure_args {
 +            ppc    "--enable-fma --enable-altivec"
 +            ppc64  "--enable-fma --enable-altivec"
 +            i386   "--enable-sse --enable-avx"
 +            x86_64 "--enable-sse --enable-avx"
 +        }
 +    } else {
 +        array set merger_configure_args {
 +            ppc    "--enable-fma --enable-altivec"
 +            ppc64  "--enable-fma --enable-altivec"
 +            i386   "--enable-sse"
 +            x86_64 "--enable-sse"
 +        }
      }

      depends_lib port:fftw-3
 @@ -110,6 +119,9 @@ subport fftw-3-single {
          if {![variant_isset universal]} {
              configure.args-delete --enable-sse2
              configure.args-append --enable-sse
 +            if { $is_clang == 1 } {
 +                configure.args-append --enable-avx
 +            }
          }
      }
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/41622#comment:6>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list