Ticket #41554: Portfile-gsl-optimize.diff
File Portfile-gsl-optimize.diff, 3.1 KB (added by NicosPavlov, 11 years ago) |
---|
-
Portfile
old new 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 88 configure.cflags-append "-ftree-vectorize -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] } { 94 configure.cflags-append "-march=native" 95 } elseif { [variant_isset gcc43] } { 90 96 configure.cflags-append "-march=native" 91 } elseif { [variant_isset gcc44] || [variant_isset gcc45] || [variant_isset gcc46] || [variant_isset gcc47] } { 97 } elseif { [variant_isset gcc44] || [variant_isset gcc45] || [variant_isset gcc46] || 98 [variant_isset gcc47] || [variant_isset gcc48] } { 92 99 # Currently, gcc cannot compile AVX instructions on OSX 93 100 configure.cflags-append "-march=native -mno-avx" 101 } else { 102 #Default compiler. Check if clang is new enough 103 if { [string match "clang" ${configure.compiler}] && 104 [vercmp $xcodeversion 5.0] >= 0 } { 105 configure.cflags-append "-march=native" 106 } else { 107 configure.cflags-append "-march=native -mnoavx" 108 } 94 109 } 95 110 } 96 111 }