[70476] trunk/dports/lang/llvm-gcc42
mfeiri at macports.org
mfeiri at macports.org
Tue Aug 10 14:05:22 PDT 2010
Revision: 70476
http://trac.macports.org/changeset/70476
Author: mfeiri at macports.org
Date: 2010-08-10 14:05:21 -0700 (Tue, 10 Aug 2010)
Log Message:
-----------
update to 2.7, add llvm-gfortran and LTO, introduce libgcc_s variant and support for gcc_select, fix #20889 #20890 #21059 and #24046
Modified Paths:
--------------
trunk/dports/lang/llvm-gcc42/Portfile
Added Paths:
-----------
trunk/dports/lang/llvm-gcc42/files/
trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42
Modified: trunk/dports/lang/llvm-gcc42/Portfile
===================================================================
--- trunk/dports/lang/llvm-gcc42/Portfile 2010-08-10 20:53:45 UTC (rev 70475)
+++ trunk/dports/lang/llvm-gcc42/Portfile 2010-08-10 21:05:21 UTC (rev 70476)
@@ -2,87 +2,119 @@
PortSystem 1.0
-set major 4.2
-
name llvm-gcc42
-version 2.6
+version 2.7
+revision 0
categories lang
platforms darwin
-maintainers erickt openmaintainer
-description llvm is a next generation compiler infrastructure
-long_description llvm brings tools to work on the llvm intermediate \
- language incl. a C and C++ frontend.
+license GPLv2+
+maintainers erickt mfeiri
+description llvm-gcc42 is a gcc compiler frontend for llvm
+long_description llvm-gcc42 integrates the LLVM optimizers and code \
+ generator with the GCC 4.2 parser. This allows LLVM to \
+ compile languages supported by the GCC compiler \
+ frontends, and provides high-fidelity drop-in \
+ compatibility with version 4.2 of GCC.
homepage http://llvm.org/
-master_sites http://llvm.org/releases/${version}/
+master_sites ${homepage}releases/${version}/
-distname llvm-gcc-${major}-${version}.source
+distname llvm-gcc-4.2-${version}.source
+extract.suffix .tgz
-checksums md5 4e8c5a1035701c231dbfc7e2af2d7571 \
- sha1 60670d550be09a57d315efa259d2b19955f6fa79 \
- rmd160 08d7ffadb88e3abdcc971372f737e4ddf8f991c6
+checksums md5 c5033005ceac1988b7cdc908445090f0 \
+ sha1 aaf466efa41e95014d51a2f8a60ad3b7771c1829 \
+ rmd160 523edd94ece00caaaa3ff2399f3c0b044b50f432
-depends_lib port:llvm
+# gmp and mpfr are not universal
+universal_variant no
+depends_lib port:llvm port:gmp port:mpfr port:libiconv
+
worksrcdir build
-pre-patch {
- file mkdir ${workpath}/build
+post-extract {
+ file mkdir ${worksrcpath}
}
# 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
+ if {${build_arch} == "i386" } {
+ configure.pre_args-append --host=i686-apple-darwin${os.major}
+ } else {
+ configure.pre_args-append --host=${build_arch}-apple-darwin${os.major}
+ }
}
-configure.cmd ../llvm-gcc${major}-${version}.source/configure
-
-configure.args-append --enable-llvm=${prefix}/lib/llvm/obj \
- --enable-languages=c,c++,objc,obj-c++ \
+configure.cmd ../llvm-gcc-4.2-${version}.source/configure
+configure.args --enable-llvm=${prefix}/lib/llvm/obj \
+ --enable-languages=c,c++,objc,obj-c++,fortran \
+ --libdir=${prefix}/lib/${name} \
+ --includedir=${prefix}/include/${name} \
+ --infodir=${prefix}/share/info \
--mandir=${prefix}/share/man \
- --infodir=${prefix}/share/info \
+ --with-local-prefix=${prefix} \
+ --with-system-zlib \
+ --disable-nls \
--program-prefix=llvm- \
- --program-suffix=-${major}
+ --program-suffix=-4.2 \
+ --with-gxx-include-dir=/usr/include/c++/4.2.1 \
+ --with-gmp=${prefix} \
+ --with-mpfr=${prefix} \
+ --with-slibdir=/usr/lib \
+ --with-build-time-tools=/usr/bin
+build.target bootstrap
+
+destroot.target install install-info-host
+
post-destroot {
- file delete -force ${destroot}/${prefix}/share/man/man7
- file delete -force ${destroot}/${prefix}/share/info
- file delete -force ${destroot}/${prefix}/bin/gccld
- file delete -force ${destroot}/${prefix}/bin/gccas
-}
+ system "cd ${destroot}${prefix}/bin/ && ln -s llvm-gcc-4.2 llvm-gcc"
+ system "cd ${destroot}${prefix}/bin/ && ln -s llvm-g++-4.2 llvm-g++"
-platform darwin {
- post-extract {
- system "rm -rf ${workpath}/llvm-gcc${major}-${version}.source/libstdc++-v3"
- }
+ # dont install slibs outside of ${prefix}
+ foreach f [glob -nocomplain ${destroot}/usr/lib/*] {
+ file rename $f ${destroot}${prefix}/lib/${name}/
+ }
- configure.args-append --with-gxx-include-dir=/usr/include/c++/4.0.0
+ file delete -force ${destroot}${prefix}/share/man/man7 \
+ ${destroot}${prefix}/share/info
+
+ # install/copy ffitarget.h only if we have it
+ if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
+ file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
+ }
+ xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
+ xinstall -m 444 ${filespath}/mp-llvm-gcc42 ${destroot}${prefix}/etc/select/gcc/
}
-platform darwin powerpc {
- set triple powerpc-apple-darwin${os.major}
+platform darwin 9 {
+ configure.args-delete --with-gxx-include-dir=/usr/include/c++/4.2.1
+ configure.args-append --with-gxx-include-dir=/usr/include/c++/4.0.0
+}
- configure.env-append TRIPLE=${triple}
- configure.post_args --build=${triple} --host=${triple} --target=${triple}
+platform darwin {
+ depends_run-append port:ld64
+ post-destroot {
+ if {${build_arch} == "i386" } {
+ file mkdir ${destroot}${prefix}/lib/llvm-gcc42/i686-apple-darwin${os.major}/4.2.1
+ ln -s ../../../../bin/ld ${destroot}${prefix}/lib/llvm-gcc42/i686-apple-darwin${os.major}/4.2.1/ld
+ } else {
+ file mkdir ${destroot}${prefix}/lib/llvm-gcc42/${build_arch}-apple-darwin${os.major}/4.2.1
+ ln -s ../../../../bin/ld ${destroot}${prefix}/lib/llvm-gcc42/${build_arch}-apple-darwin${os.major}/4.2.1/ld
+ }
+ }
}
-platform darwin i386 {
- set triple i686-apple-darwin${os.major}
-
- configure.env-append TRIPLE=${triple} \
- TARGETOPTIONS="--with-arch=nocona --with-tune=generic"
- configure.post_args --build=${triple} --host=${triple} --target=${triple}
+variant libgcc_s \
+ description "Install and use the libgcc_s libraries provided by gcc instead of those provided by the system. \
+ This introduces a linker dependency in all binaries built for 10.4 and 10.5 targets using this compiler." {
+ configure.args-delete --with-slibdir=/usr/lib
}
+livecheck.type regex
+livecheck.url ${homepage}releases/
+livecheck.regex {'(\d+(?:\.\d+)*)'}
Added: trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42
===================================================================
--- trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42 (rev 0)
+++ trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42 2010-08-10 21:05:21 UTC (rev 70476)
@@ -0,0 +1,7 @@
+bin/llvm-gcc-4.2
+bin/llvm-cpp-4.2
+bin/llvm-c++-4.2
+bin/llvm-g++-4.2
+-
+bin/llvm-gcov-4.2
+bin/llvm-gfortran-4.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100810/a9d15d19/attachment.html>
More information about the macports-changes
mailing list