Ticket #20838: Portfile-config_guess-fix.diff
File Portfile-config_guess-fix.diff, 1.7 KB (added by howarth@…, 15 years ago) |
---|
-
Portfile
old new 3 3 PortSystem 1.0 4 4 5 5 name gcc44 6 epoch 16 epoch 2 7 7 version 4.4.1 8 8 platforms darwin 9 9 categories lang … … 42 42 43 43 set major 4.4 44 44 45 patchfiles gcc44-config.guess.diff 45 46 worksrcdir build 46 47 # the generated compiler doesn't accept -arch 48 if {[info exists build_arch] && ${os.platform} == "darwin"} { 49 if {(${os.arch} == "i386" && $build_arch == "i386") || (${os.arch} == "powerpc" && $build_arch == "ppc")} { 50 configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}" 51 } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} { 52 configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}" 53 } else { 54 pre-fetch { 55 return -code error "Cannot build $name for $build_arch" 56 } 57 } 58 configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}" 59 configure.cc_archflags 60 configure.cxx_archflags 61 configure.objc_archflags 47 pre-patch { 48 file mkdir ${worksrcpath} 62 49 } 50 patch.dir ${workpath}/gcc-${version} 51 52 configure.env-append CFLAGS_FOR_BUILD="${configure.cflags}" 53 configure.cc_archflags 54 configure.cxx_archflags 55 configure.objc_archflags 63 56 64 57 pre-configure { 65 58 file mkdir ${worksrcpath} … … 77 70 --program-suffix=-mp-${major} \ 78 71 --with-gxx-include-dir=${prefix}/include/${name}/c++/ \ 79 72 --with-gmp=${prefix} \ 80 --with-mpfr=${prefix} 73 --with-mpfr=${prefix} 81 74 # do NOT use MacPorts binutils -- they do not work 82 75 configure.env-append AR_FOR_TARGET=/usr/bin/ar \ 83 76 AS_FOR_TARGET=/usr/bin/as \