Ticket #20635: gcc.macports.patch

File gcc.macports.patch, 956 bytes (added by skymoo (Adam Mercer), 15 years ago)

patch from rob

  • Portfile

    old new  
    4646
    4747# the generated compiler doesn't accept -arch
    4848if {[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     }
     49    configure.env-append CFLAGS_FOR_TARGET="${configure.cflags}"
    5850    configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
    5951    configure.cc_archflags
    6052    configure.cxx_archflags