[124996] trunk/dports/math/gsl/Portfile

dtakahashi at macports.org dtakahashi at macports.org
Tue Sep 2 03:41:55 PDT 2014


Revision: 124996
          https://trac.macports.org/changeset/124996
Author:   dtakahashi at macports.org
Date:     2014-09-02 03:41:55 -0700 (Tue, 02 Sep 2014)
Log Message:
-----------
gsl: migrate to the compiler portgroup, cope with Haswell instructions

Modified Paths:
--------------
    trunk/dports/math/gsl/Portfile

Modified: trunk/dports/math/gsl/Portfile
===================================================================
--- trunk/dports/math/gsl/Portfile	2014-09-02 09:42:09 UTC (rev 124995)
+++ trunk/dports/math/gsl/Portfile	2014-09-02 10:41:55 UTC (rev 124996)
@@ -2,6 +2,7 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           compilers 1.0
 
 name                gsl
 conflicts           gsl-devel
@@ -37,6 +38,9 @@
     system "install-info ${prefix}/share/info/gsl-ref.info ${prefix}/share/info/dir"
 }
 
+compilers.choose    cc
+compilers.setup     -dragonegg -clang30 -clang31 -clang32
+
 variant doc description "Install PDF and HTML documentation" {
     depends_build   port:ghostscript bin:latex:texlive
     post-destroot   {
@@ -56,61 +60,27 @@
     }
 }
 
-variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 mpclang33 mpclang34 mpclang35 description "Use GCC 4.3 for compilation of GSL" {
-    configure.compiler          macports-gcc-4.3
-}
-
-variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 gcc48 mpclang33 mpclang34 mpclang35 description "Use GCC 4.4 for compilation of GSL" {
-    configure.compiler          macports-gcc-4.4
-}
-
-variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 gcc48 mpclang33 mpclang34 mpclang35 description "Use GCC 4.5 for compilation of GSL" {
-    configure.compiler          macports-gcc-4.5
-}
-
-variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 gcc48 mpclang33 mpclang34 mpclang35 description "Use GCC 4.6 for compilation of GSL" {
-    configure.compiler          macports-gcc-4.6
-}
-
-variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 gcc48 mpclang33 mpclang34 mpclang35 description "Use GCC 4.7 for compilation of GSL" {
-    configure.compiler          macports-gcc-4.7
-}
-
-variant gcc48 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 mpclang33 mpclang34 mpclang35 description "Use GCC 4.8 for compilation of GSL" {
-    configure.compiler          macports-gcc-4.8
-}
-
-variant mpclang33 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 mpclang34 mpclang35 description "Use clang 3.3 for compilation of GSL" {
-    configure.compiler          macports-clang-3.3
-}
-
-variant mpclang34 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 mpclang33 mpclang35 description "Use clang 3.4 for compilation of GSL" {
-    configure.compiler          macports-clang-3.4
-}
-
-variant mpclang35 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 mpclang33 mpclang34 description "Use clang 3.5 for compilation of GSL" {
-    configure.compiler          macports-clang-3.5
-}
-
 variant optimize description "Provide further optimization options (depending on compiler used)" {
     configure.optflags-append   -O3
 }
 
 platform darwin i386 {
     if { [variant_isset optimize] } {
-        if { [variant_isset mpclang33] || [variant_isset mpclang34] ||
-             [variant_isset mpclang35] } {
+        if { [clang_variant_isset] } {
             configure.optflags  -march=native
-        } elseif { [variant_isset gcc43] } {
-            configure.optflags  -ftree-vectorize -march=native
-        } elseif { [variant_isset gcc44] || [variant_isset gcc45] ||
-                   [variant_isset gcc46] || [variant_isset gcc47] || 
-                   [variant_isset gcc48] } {
-            # Currently, gcc cannot compile AVX instructions on OSX
+        } elseif { [gcc_variant_isset] } {
             configure.optflags  -ftree-vectorize -march=native -mno-avx
+            if { ! ([variant_isset gcc44] ||
+                    [variant_isset gcc45] ||
+                    [variant_isset gcc46]) } {
+                ## Haswell's new instruction sets need to be disabled,
+                ## because these instructions are not recognized by
+                ## cctools' assembler
+                configure.optflags-append -mno-avx2 -mno-bmi -mno-bmi2 
+            }
         } else {
             #Default compiler. Check if the compiler supports "native" architecture
-            if { [string match "clang" ${configure.compiler}] } {
+            if { [string match "clang" ${configure.cc}] } {
                 configure.optflags  -march=native
             }
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140902/d40673c8/attachment.html>


More information about the macports-changes mailing list