Ticket #41554: Portfile-gsl-optimize-2.diff
File Portfile-gsl-optimize-2.diff, 3.2 KB (added by daitakahashi, 11 years ago) |
---|
-
Portfile
56 56 } 57 57 } 58 58 59 variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 description "Use GCC 4.3 for compilation of GSL" {59 variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 mpclang33 description "Use GCC 4.3 for compilation of GSL" { 60 60 configure.compiler macports-gcc-4.3 61 61 } 62 62 63 variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 gcc48 description "Use GCC 4.4 for compilation of GSL" {63 variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 gcc48 mpclang33 description "Use GCC 4.4 for compilation of GSL" { 64 64 configure.compiler macports-gcc-4.4 65 65 } 66 66 67 variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 gcc48 description "Use GCC 4.5 for compilation of GSL" {67 variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 gcc48 mpclang33 description "Use GCC 4.5 for compilation of GSL" { 68 68 configure.compiler macports-gcc-4.5 69 69 } 70 70 71 variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 gcc48 description "Use GCC 4.6 for compilation of GSL" {71 variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 gcc48 mpclang33 description "Use GCC 4.6 for compilation of GSL" { 72 72 configure.compiler macports-gcc-4.6 73 73 } 74 74 75 variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 gcc48 description "Use GCC 4.7 for compilation of GSL" {75 variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 gcc48 mpclang33 description "Use GCC 4.7 for compilation of GSL" { 76 76 configure.compiler macports-gcc-4.7 77 77 } 78 78 79 variant gcc48 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 description "Use GCC 4.8 for compilation of GSL" {79 variant gcc48 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 mpclang33 description "Use GCC 4.8 for compilation of GSL" { 80 80 configure.compiler macports-gcc-4.8 81 81 } 82 82 83 variant mpclang33 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 description "Use clang 3.3 for compilation of GSL" { 84 configure.compiler macports-clang-3.3 85 } 86 83 87 variant optimize description "Provide further optimization options (depending on compiler used)" { 84 configure.cflags-append "- ftree-vectorize -O3"88 configure.cflags-append "-O3" 85 89 } 86 90 87 91 platform darwin i386 { 88 92 if { [variant_isset optimize] } { 89 if { [variant_isset gcc43] } {93 if { [variant_isset mpclang33] } { 90 94 configure.cflags-append "-march=native" 91 } elseif { [variant_isset gcc44] || [variant_isset gcc45] || [variant_isset gcc46] || [variant_isset gcc47] } { 95 } elseif { [variant_isset gcc43] } { 96 configure.cflags-append "-ftree-vectorize -march=native" 97 } elseif { [variant_isset gcc44] || [variant_isset gcc45] || 98 [variant_isset gcc46] || [variant_isset gcc47] } { 92 99 # Currently, gcc cannot compile AVX instructions on OSX 93 configure.cflags-append "-march=native -mno-avx" 100 configure.cflags-append "-ftree-vectorize -march=native -mno-avx" 101 } else { 102 #Default compiler. Check if the compiler supports "native" architecture 103 if { [string match "clang" ${configure.compiler}] } { 104 configure.cflags-append "-march=native" 105 } 94 106 } 95 107 } 96 108 }