[57658] trunk/dports/lang

jmr at macports.org jmr at macports.org
Mon Sep 14 09:45:15 PDT 2009


Revision: 57658
          http://trac.macports.org/changeset/57658
Author:   jmr at macports.org
Date:     2009-09-14 09:45:14 -0700 (Mon, 14 Sep 2009)
Log Message:
-----------
gcc4{0,1,2,3,4,5}: enforce build_arch by passing --build=foo to configure instead of with cflags (#20838 etc.)

Modified Paths:
--------------
    trunk/dports/lang/gcc40/Portfile
    trunk/dports/lang/gcc41/Portfile
    trunk/dports/lang/gcc42/Portfile
    trunk/dports/lang/gcc43/Portfile
    trunk/dports/lang/gcc44/Portfile
    trunk/dports/lang/gcc45/Portfile

Modified: trunk/dports/lang/gcc40/Portfile
===================================================================
--- trunk/dports/lang/gcc40/Portfile	2009-09-14 16:40:41 UTC (rev 57657)
+++ trunk/dports/lang/gcc40/Portfile	2009-09-14 16:45:14 UTC (rev 57658)
@@ -50,19 +50,10 @@
 
 # the generated compiler doesn't accept -arch
 if {[info exists build_arch] && ${os.platform} == "darwin"} {
-    if {(${os.arch} == "i386" && $build_arch == "i386") || (${os.arch} == "powerpc" && $build_arch == "ppc")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}"
-    } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}"
-    } else {
-        pre-fetch {
-            return -code error "Cannot build $name for $build_arch"
-        }
-    }
-    configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
     configure.cc_archflags
     configure.cxx_archflags
     configure.objc_archflags
+    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
 }
 
 configure.cmd	${workpath}/gcc-${version}/configure

Modified: trunk/dports/lang/gcc41/Portfile
===================================================================
--- trunk/dports/lang/gcc41/Portfile	2009-09-14 16:40:41 UTC (rev 57657)
+++ trunk/dports/lang/gcc41/Portfile	2009-09-14 16:45:14 UTC (rev 57658)
@@ -54,19 +54,10 @@
 
 # the generated compiler doesn't accept -arch
 if {[info exists build_arch] && ${os.platform} == "darwin"} {
-    if {(${os.arch} == "i386" && $build_arch == "i386") || (${os.arch} == "powerpc" && $build_arch == "ppc")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}"
-    } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}"
-    } else {
-        pre-fetch {
-            return -code error "Cannot build $name for $build_arch"
-        }
-    }
-    configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
     configure.cc_archflags
     configure.cxx_archflags
     configure.objc_archflags
+    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
 }
 
 configure.cmd	../gcc-${version}/configure

Modified: trunk/dports/lang/gcc42/Portfile
===================================================================
--- trunk/dports/lang/gcc42/Portfile	2009-09-14 16:40:41 UTC (rev 57657)
+++ trunk/dports/lang/gcc42/Portfile	2009-09-14 16:45:14 UTC (rev 57658)
@@ -53,19 +53,10 @@
 
 # the generated compiler doesn't accept -arch
 if {[info exists build_arch] && ${os.platform} == "darwin"} {
-    if {(${os.arch} == "i386" && $build_arch == "i386") || (${os.arch} == "powerpc" && $build_arch == "ppc")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}"
-    } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}"
-    } else {
-        pre-fetch {
-            return -code error "Cannot build $name for $build_arch"
-        }
-    }
-    configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
     configure.cc_archflags
     configure.cxx_archflags
     configure.objc_archflags
+    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
 }
 
 pre-configure {

Modified: trunk/dports/lang/gcc43/Portfile
===================================================================
--- trunk/dports/lang/gcc43/Portfile	2009-09-14 16:40:41 UTC (rev 57657)
+++ trunk/dports/lang/gcc43/Portfile	2009-09-14 16:45:14 UTC (rev 57658)
@@ -50,19 +50,10 @@
 
 # the generated compiler doesn't accept -arch
 if {[info exists build_arch] && ${os.platform} == "darwin"} {
-    if {(${os.arch} == "i386" && $build_arch == "i386") || (${os.arch} == "powerpc" && $build_arch == "ppc")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}"
-    } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}"
-    } else {
-        pre-fetch {
-            return -code error "Cannot build $name for $build_arch"
-        }
-    }
-    configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
     configure.cc_archflags
     configure.cxx_archflags
     configure.objc_archflags
+    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
 }
 
 configure.cmd   ../gcc-${version}/configure

Modified: trunk/dports/lang/gcc44/Portfile
===================================================================
--- trunk/dports/lang/gcc44/Portfile	2009-09-14 16:40:41 UTC (rev 57657)
+++ trunk/dports/lang/gcc44/Portfile	2009-09-14 16:45:14 UTC (rev 57658)
@@ -46,19 +46,10 @@
 
 # the generated compiler doesn't accept -arch
 if {[info exists build_arch] && ${os.platform} == "darwin"} {
-    if {(${os.arch} == "i386" && $build_arch == "i386") || (${osarch} == "powerpc" && $build_arch == "ppc")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}"
-    } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}"
-    } else {
-        pre-fetch {
-            return -code error "Cannot build $name for $build_arch"
-        }
-    }
-    configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
     configure.cc_archflags
     configure.cxx_archflags
     configure.objc_archflags
+    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
 }
 
 pre-configure {

Modified: trunk/dports/lang/gcc45/Portfile
===================================================================
--- trunk/dports/lang/gcc45/Portfile	2009-09-14 16:40:41 UTC (rev 57657)
+++ trunk/dports/lang/gcc45/Portfile	2009-09-14 16:45:14 UTC (rev 57658)
@@ -45,19 +45,10 @@
 
 # the generated compiler doesn't accept -arch
 if {[info exists build_arch] && ${os.platform} == "darwin"} {
-    if {(${os.arch} == "i386" && $build_arch == "i386") || (${os.arch} == "powerpc" && $build_arch == "ppc")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m32 ${configure.cflags}"
-    } elseif {(${os.arch} == "i386" && $build_arch == "x86_64") || (${os.arch} == "powerpc" && $build_arch == "ppc64")} {
-        configure.env-append CFLAGS_FOR_TARGET="-m64 ${configure.cflags}"
-    } else {
-        pre-fetch {
-            return -code error "Cannot build $name for $build_arch"
-        }
-    }
-    configure.env-append CFLAGS_FOR_BUILD="${configure.cc_archflags} ${configure.cflags}"
     configure.cc_archflags
     configure.cxx_archflags
     configure.objc_archflags
+    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
 }
 
 pre-configure {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090914/c168db82/attachment.html>


More information about the macports-changes mailing list