Ticket #33297: oriToGmp504.patch
File oriToGmp504.patch, 6.1 KB (added by openwiki500@…, 13 years ago) |
---|
-
Portfile
diff -rupN gmp.ori/Portfile gmp/Portfile
old new checksums md5 50c3edcb7c94 33 33 use_bzip2 yes 34 34 use_parallel_build yes 35 35 36 # See #1663437 patchfiles patch-gmp-h.in.diff38 39 # Sandy Bridge not recognized. See #28892, #3021140 patchfiles-append patch-config.guess.i7.diff41 42 36 # llvm-gcc-4.2 fails make check 43 37 if {${configure.compiler} == "llvm-gcc-4.2"} { 44 38 if {[vercmp $xcodeversion 4.1] >= 0} { … … configure.pipe no 65 59 test.run yes 66 60 test.cmd make 67 61 test.target check 68 69 post-destroot {70 # For the upgrade 4.3.2 -> 5.0.1 (r63519), do not force all packages which depend on GMP to be rebuilt.71 ln -s libgmp.dylib ${destroot}${prefix}/lib/libgmp.3.dylib72 }73 74 if {![variant_isset universal]} {75 if {${build_arch} == "x86_64"} {76 configure.env ABI=6477 # fails to correctly detect some x86_64 models78 pre-configure {79 set build_triplet [split [exec /usr/bin/env CC=${configure.cc} ${worksrcpath}/config.guess] -]80 set build_cpu [lindex $build_triplet 0]81 if {$build_cpu != "core2" && $build_cpu != "corei"} {82 ui_warn "No processor dependent assembly code being used. gmp might be slower."83 configure.args-append --build=x86_64-[join [lrange $build_triplet 1 end] -]84 }85 }86 } elseif {${build_arch} == "ppc64"} {87 configure.env ABI=mode6488 } else {89 configure.env ABI=3290 }91 } else {92 # Keep configure.cflags and configure.cxxflags empty.93 set merger_arch_flag no94 95 array set merger_configure_env {96 ppc ABI=3297 i386 ABI=3298 ppc64 ABI=mode6499 x86_64 ABI=64100 }101 102 # Since CFLAGS and CXXFLAGS must be empty, append -arch ... to CC and CXX.103 merger_arch_compiler yes104 105 # -arch i386 on causes the test suite to fail, so override muniversal_get_arch_flag in muniversal portgroup106 # Only append -arch ... to compiler if cross compiling.107 # i386 code is generated by setting ABI=32108 proc muniversal_get_arch_flag {arch {fortran ""}} {109 global os.arch110 111 if { ${os.arch}=="i386" && (${arch}=="i386" || ${arch}=="x86_64") } {112 set archf ""113 } elseif { ${os.arch}=="powerpc" && (${arch}=="ppc" && ${arch}=="ppc64") } {114 set archf ""115 } else {116 set archf "-arch ${arch}"117 }118 return ${archf}119 }120 121 # universal_archs_to_use might not be set before pre-fetch.122 pre-destroot {123 global merger_dont_diff merger_configure_env124 125 # PortGroup muniversal has difficulty merging three files.126 if { [llength ${universal_archs_to_use}] == 3 } {127 set merger_dont_diff "${prefix}/include/gmp.h"128 }129 }130 131 # For cross-compiling, set C compiler and pre-processor.132 if { ${os.arch}=="i386" } {133 if { ${os.major} >= 10 } {134 lappend merger_configure_env(ppc) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}135 }136 lappend merger_configure_env(ppc64) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}137 } else {138 lappend merger_configure_env(i386) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}139 lappend merger_configure_env(x86_64) CC_FOR_BUILD=${configure.cc} CPP_FOR_BUILD=${configure.cpp}140 }141 }142 143 platform powerpc {144 # See #9053145 patchfiles-append patch-config.guess.diff146 } -
files/patch-config.guess.diff
diff -rupN gmp.ori/files/patch-config.guess.diff gmp/files/patch-config.guess.diff
old new 1 --- config.guess.orig 2009-05-12 08:12:12.000000000 +02002 +++ config.guess 2009-05-21 10:24:48.000000000 +02003 @@ -355,6 +355,7 @@4 unsigned (*fun)();5 unsigned pvr;6 7 + return 0;8 /* a separate "fun" variable is necessary for gcc 2.95.2 on MacOS,9 it gets a compiler error on a combined cast and call */10 fun = (unsigned (*)()) getpvr.a; -
files/patch-config.guess.i7.diff
diff -rupN gmp.ori/files/patch-config.guess.i7.diff gmp/files/patch-config.guess.i7.diff
old new 1 --- config.guess.orig 2010-02-06 05:43:13.000000000 -07002 +++ config.guess 2011-04-10 09:11:34.000000000 -07003 @@ -742,6 +742,7 @@4 else if (model == 0x25) modelstr = "corei"; /* WSM Clarkdale/Arrandale */5 else if (model == 0x26) modelstr = "atom"; /* Lincroft */6 else if (model == 0x27) modelstr = "atom"; /* Saltwell */7 + else if (model == 0x2a) modelstr = "corei"; /* SB */8 else if (model == 0x2c) modelstr = "corei"; /* WSM Gulftown */9 else if (model == 0x2e) modelstr = "corei"; /* NHM Beckton */10 break; -
files/patch-gmp-h.in.diff
diff -rupN gmp.ori/files/patch-gmp-h.in.diff gmp/files/patch-gmp-h.in.diff
old new 1 --- gmp-h.in.orig 2010-01-07 13:09:02.000000000 -07002 +++ gmp-h.in 2010-01-27 19:35:31.000000000 -07003 @@ -421,13 +421,14 @@4 GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C995 inline semantics, unless -fgnu89-inline is used. */6 #ifdef __GNUC__7 -#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2)8 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)9 #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__))10 -#else11 +#define __GMP_INLINE_PROTOTYPES 112 +#elif !(defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)13 #define __GMP_EXTERN_INLINE extern __inline__14 -#endif15 #define __GMP_INLINE_PROTOTYPES 116 #endif17 +#endif18 19 /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std120 strict ANSI mode. Inlining is done even when not optimizing (ie. -O0