[80160] trunk/dports/lang
jeremyhu at macports.org
jeremyhu at macports.org
Tue Jul 5 10:06:51 PDT 2011
Revision: 80160
http://trac.macports.org/changeset/80160
Author: jeremyhu at macports.org
Date: 2011-07-05 10:06:49 -0700 (Tue, 05 Jul 2011)
Log Message:
-----------
gcc*: Misc build fixes for darwin11 or clang
gcc40 and gcc42 bail out on darwin11 like they do on darwin10.
gcc41 doesn't build for me on SL with any compiler, so I didn't mess with it.
gcc43 and gcc44 seem to work well with clang or on darwin11.
Maintainer ack via email
Modified Paths:
--------------
trunk/dports/lang/gcc40/Portfile
trunk/dports/lang/gcc42/Portfile
trunk/dports/lang/gcc43/Portfile
trunk/dports/lang/gcc44/Portfile
Modified: trunk/dports/lang/gcc40/Portfile
===================================================================
--- trunk/dports/lang/gcc40/Portfile 2011-07-05 16:53:52 UTC (rev 80159)
+++ trunk/dports/lang/gcc40/Portfile 2011-07-05 17:06:49 UTC (rev 80160)
@@ -91,6 +91,12 @@
}
}
+platform darwin 11 {
+ pre-fetch {
+ return -code error "$name does not build on Lion."
+ }
+}
+
livecheck.type regex
livecheck.url http://gcc.gnu.org/gcc-4.0/
livecheck.regex GCC (4\\.0\\.\[0-9\])
Modified: trunk/dports/lang/gcc42/Portfile
===================================================================
--- trunk/dports/lang/gcc42/Portfile 2011-07-05 16:53:52 UTC (rev 80159)
+++ trunk/dports/lang/gcc42/Portfile 2011-07-05 17:06:49 UTC (rev 80160)
@@ -61,7 +61,7 @@
platform darwin {
if {${os.major} >= 10} {
pre-fetch {
- ui_error "$name does not build on Snow Leopard."
+ ui_error "$name does not build on Snow Leopard or later."
error "unsupported platform"
}
}
Modified: trunk/dports/lang/gcc43/Portfile
===================================================================
--- trunk/dports/lang/gcc43/Portfile 2011-07-05 16:53:52 UTC (rev 80159)
+++ trunk/dports/lang/gcc43/Portfile 2011-07-05 17:06:49 UTC (rev 80160)
@@ -98,6 +98,20 @@
RANLIB_FOR_TARGET=/usr/bin/ranlib \
STRIP_FOR_TARGET=/usr/bin/strip
+# STAGE1_CFLAGS="-O2 -fkeep-inline-functions" : from configure.ac
+# BOOT_CFLAGS="-O2 -g" : from Makefile.tpl
+# -std=gnu89 : for building with compilers that default to c99
+# -D_FORTIFY_SOURCE=0 : The built compiler might not understand newer builtins
+# exposed in libc headers for fortified string functions.
+# Yes, we need to set both BOOT_CFLAGS and STAGE1_CFLAGS
+# because STAGE1_CFLAGS is used with xgcc for libgcc
+if {${configure.compiler} == "clang"} {
+ # -O1 in STAGE1_CFLAGS : <rdar://problem/9720596>
+ build.args-append BOOT_CFLAGS="-O2 -g -D_FORTIFY_SOURCE=0" STAGE1_CFLAGS="-O1 -fkeep-inline-functions -D_FORTIFY_SOURCE=0 -std=gnu89"
+} else {
+ build.args-append BOOT_CFLAGS="-O2 -g -D_FORTIFY_SOURCE=0" STAGE1_CFLAGS="-O2 -fkeep-inline-functions -D_FORTIFY_SOURCE=0 -std=gnu89"
+}
+
use_parallel_build yes
destroot.target install install-info-host
Modified: trunk/dports/lang/gcc44/Portfile
===================================================================
--- trunk/dports/lang/gcc44/Portfile 2011-07-05 16:53:52 UTC (rev 80159)
+++ trunk/dports/lang/gcc44/Portfile 2011-07-05 17:06:49 UTC (rev 80160)
@@ -100,6 +100,15 @@
build.target bootstrap
use_parallel_build yes
+# STAGE1_CFLAGS="-O2 -fkeep-inline-functions" : from configure.ac
+# BOOT_CFLAGS="-O2 -g" : from Makefile.tpl
+# -std=gnu89 : for building with clang
+# -D_FORTIFY_SOURCE=0 : The built compiler might not understand newer builtins
+# exposed in libc headers for fortified string functions.
+# Yes, we need to set both BOOT_CFLAGS and STAGE1_CFLAGS
+# because STAGE1_CFLAGS is used with xgcc for libgcc
+build.args-append BOOT_CFLAGS="-O2 -g -D_FORTIFY_SOURCE=0" STAGE1_CFLAGS="-O2 -fkeep-inline-functions -D_FORTIFY_SOURCE=0 -std=gnu89"
+
destroot.target install install-info-host
post-destroot {
@@ -122,6 +131,10 @@
configure.args-append --enable-fully-dynamic-string
}
+platform darwin 11 {
+ configure.args-append --enable-fully-dynamic-string
+}
+
# odcctools currently do not compile for x64 - move to variant for the time being
variant odcctools \
description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110705/2233af12/attachment.html>
More information about the macports-changes
mailing list