[101497] trunk/dports/lang/llvm-gcc42
jeremyhu at macports.org
jeremyhu at macports.org
Fri Jan 11 14:40:42 PST 2013
Revision: 101497
https://trac.macports.org/changeset/101497
Author: jeremyhu at macports.org
Date: 2013-01-11 14:40:41 -0800 (Fri, 11 Jan 2013)
Log Message:
-----------
llvm-gcc42: Update to Apple version 2336.11
Modified Paths:
--------------
trunk/dports/lang/llvm-gcc42/Portfile
trunk/dports/lang/llvm-gcc42/files/build_gcc
trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42
Added Paths:
-----------
trunk/dports/lang/llvm-gcc42/files/driverdriver-armcheck.patch
trunk/dports/lang/llvm-gcc42/files/driverdriver-num_infiles.patch
trunk/dports/lang/llvm-gcc42/files/incpath.patch
trunk/dports/lang/llvm-gcc42/files/werror-local-alloc.patch
Modified: trunk/dports/lang/llvm-gcc42/Portfile
===================================================================
--- trunk/dports/lang/llvm-gcc42/Portfile 2013-01-11 22:40:10 UTC (rev 101496)
+++ trunk/dports/lang/llvm-gcc42/Portfile 2013-01-11 22:40:41 UTC (rev 101497)
@@ -1,10 +1,11 @@
# $Id$
PortSystem 1.0
+PortGroup select 1.0
name llvm-gcc42
-version 2.9
-revision 4
+version 2336.11
+set gcc_version 4.2.1
categories lang
platforms darwin
license GPL-2+
@@ -16,139 +17,169 @@
frontends, and provides high-fidelity drop-in \
compatibility with version 4.2 of GCC.
-homepage http://llvm.org/
-master_sites ${homepage}releases/${version}/
+homepage http://opensource.apple.com/
+master_sites http://opensource.apple.com/tarballs/llvmgcc42/
-distname llvm-gcc-4.2-${version}.source
-extract.suffix .tgz
+distname llvmgcc42-${version}
-checksums md5 1a3951880d17f676d36b9edfdea8a727 \
- sha1 6576576750c9b2afb42838851d51be0b91b12f3e \
- rmd160 2f4329a5437b214595b66dc4e005ef1f9fea55a2
+checksums md5 046629f7b3ce59bcb32b5116d29c27cd \
+ sha1 97b82b328780d1b4f261301dc084bb256172ee2a \
+ rmd160 90e496dc075ebd3daa088f818e52e7ecbb4a182e
-universal_variant no
+depends_lib port:ld64 port:cctools
+depends_run port:gcc_select
+depends_skip_archcheck ld64 cctools
-depends_lib port:llvm-${version} port:gmp port:mpfr port:libiconv
+use_configure no
+variant universal {}
-worksrcdir build
+supported_archs i386 x86_64
+select.group gcc
+select.file ${filespath}/mp-llvm-gcc42
+
+set srcroot ${worksrcpath}
+set objroot ${workpath}/objroot
+set symroot ${workpath}/symroot
+
+# werror-*.patch : Fix compilation errors when building for x86_64
+# incpath.patch : Don't prepend the -isysroot option argument to the compiler's own search paths
+# driverdriver-num_infiles.patch : Fix linking with no input files (ie all static archives passed with -l...)
+# driverdriver-armcheck.patch : Build fix for the driverdriver when arm support is not available (eg: Tiger)
+
+patchfiles-append \
+ werror-local-alloc.patch \
+ incpath.patch \
+ driverdriver-num_infiles.patch \
+ driverdriver-armcheck.patch
+
post-extract {
- file mkdir ${worksrcpath}
+ file copy -force ${filespath}/build_gcc ${worksrcpath}
}
-# the generated compiler doesn't accept -arch
-configure.cc_archflags
-configure.cxx_archflags
-configure.objc_archflags
-configure.ld_archflags
+post-patch {
+ # Install documentation in a MacPorts location
+ #reinplace "/^HTMLDIR=/ s:=.*$:=\"${prefix}/share/doc/${name}/html\":" ${worksrcpath}/build_gcc
-configure.cmd ../${distname}/configure
-configure.args --enable-llvm=${prefix}/libexec/llvm-${version} \
- --enable-languages=c,c++,objc,obj-c++,fortran \
- --libdir=${prefix}/lib/${name} \
- --includedir=${prefix}/include/${name} \
- --infodir=${prefix}/share/info \
- --mandir=${prefix}/share/man \
- --with-local-prefix=${prefix} \
- --with-system-zlib \
- --disable-nls \
- --program-prefix=llvm- \
- --program-suffix=-4.2 \
- --with-gmp=${prefix} \
- --with-mpfr=${prefix} \
- --with-build-time-tools=/usr/bin
+ # arch returns i386 even when we want x86_64
+ reinplace "/^BUILD=/ s:arch:echo ${build_arch}:" ${worksrcpath}/build_gcc
-build.target bootstrap
+ # This is set to isysroot/Developer/SDKs/MacOSX10.5.sdk mmacosx-version-min=10.5
+ # which is not always right. Our CFLAGS should take care of this instead
+ reinplace "/^MULTILIB_EXTRA_OPTS/d" ${worksrcpath}/gcc/config/rs6000/t-darwin
-destroot.target install install-info-host
+ # Brand our compiler
+ reinplace "/VERSUFFIX/s/)\"/) (MacPorts ${name} ${version}_${revision}${portvariants})\"/" \
+ ${worksrcpath}/gcc/version.c
+ reinplace "/bug_report_url/s|http:.*>|https://trac.macports.org/newticket>|" \
+ ${worksrcpath}/gcc/version.c
-# gcc-4.2 doesn't build with -std=gnu99 (clang's default), so do this for now
-if {${configure.compiler} == "clang"} {
- configure.compiler llvm-gcc-4.2
-}
+ if {${build_arch} == "ppc"} {
+ reinplace "/^PPC_SYSROOT=/ s:=.*$:=/:" ${worksrcpath}/build_gcc
+ } elseif {[file exists ${developer_dir}/SDKs/MacOSX10.5.sdk]} {
+ reinplace "/^PPC_SYSROOT=/ s:=.*$:=${developer_dir}/SDKs/MacOSX10.5.sdk:" ${worksrcpath}/build_gcc
+ } elseif {[file exists ${developer_dir}/SDKs/MacOSX10.4u.sdk]} {
+ reinplace "/^PPC_SYSROOT=/ s:=.*$:=${developer_dir}/SDKs/MacOSX10.4u.sdk:" ${worksrcpath}/build_gcc
+ } elseif {[file exists ${developer_dir}/SDKs/MacOSX10.3.9.sdk]} {
+ reinplace "/^PPC_SYSROOT=/ s:=.*$:=${developer_dir}/SDKs/MacOSX10.3.9.sdk:" ${worksrcpath}/build_gcc
+ }
-# gcc-4.0 produces a bad x86_64 slice, and Leopard's gcc-4.2 doesn't build this properly,
-# so use MacPorts-provided apple-gcc-4.2 to build us on 10.[45]
-if {${configure.compiler} == "gcc-4.0" ||
- (${configure.compiler} == "gcc-4.2" && ${os.major} < 10)} {
- depends_build-append port:apple-gcc42
- configure.compiler apple-gcc-4.2
+ if {${os.major} < 9} {
+ reinplace "/vproc.h/d" ${worksrcpath}/gcc/libgcov.c
+ }
+
+ # Disable -Werror for our bootstrap gcc
+ if {[string match "*clang*" ${configure.compiler}]} {
+ reinplace "s:--enable-werror : :" ${worksrcpath}/build_gcc
+ }
}
-# STAGE1_CFLAGS="-O2 -fkeep-inline-functions" : from configure.ac
-# BOOT_CFLAGS="-O2 -g" : from Makefile.tpl
-# -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"
+compiler.cpath /usr/include
+compiler.library_path /usr/lib
-post-destroot {
- 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++"
+# TODO: Better use of MacPorts dependencies
+build.env \
+ LANGUAGES="c,c++,objc,obj-c++" \
+ LIBRARY_PATH="/usr/lib" \
+ CPATH="/usr/include" \
+ PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
+ LANGUAGES="c,c++,objc,obj-c++" \
+ AR_FOR_TARGET=${prefix}/bin/ar \
+ AS_FOR_TARGET=${prefix}/bin/as \
+ LD_FOR_TARGET=${prefix}/bin/ld \
+ NM_FOR_TARGET=${prefix}/bin/nm \
+ OBJDUMP_FOR_TARGET=${prefix}/bin/objdump \
+ RANLIB_FOR_TARGET=${prefix}/bin/ranlib \
+ STRIP_FOR_TARGET=${prefix}/bin/strip \
+ DSYMUTIL_FOR_HOST=${prefix}/bin/dsymutil \
+ RANLIB_FOR_HOST=${prefix}/bin/ranlib \
+ STRIP_FOR_HOST=${prefix}/bin/strip \
+ OTOOL=${prefix}/bin/otool \
+ OTOOL64=${prefix}/bin/otool
- file delete -force ${destroot}${prefix}/share/man/man7 \
- ${destroot}${prefix}/share/info
+build.args-append \
+ CC="${configure.cc} -pipe -std=gnu89" \
+ CXX="${configure.cxx} -pipe" \
+ PREFIX="${prefix}" \
+ SRCROOT="${srcroot}" \
+ OBJROOT="${objroot}" \
+ SYMROOT="${symroot}" \
+ DSTROOT="${destroot}" \
+ RC_NONARCH_CFLAGS="-pipe -std=gnu89" \
+ RC_OS="macos" \
+ RC_ARCHS="[get_canonical_archs]" \
+ RC_ProjectSourceVersion="[lindex [split ${version} .] 0]" \
+ RC_ProjectSourceSubversion="[lindex [split ${version} .] 1]"
- # 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/
+set build_targets {}
+
+if {${os.major} > 8 || ${os.arch} == "i386"} {
+ lappend build_targets i386
}
-platform darwin {
- depends_run-append port:ld64
-
- post-extract {
- system "rm -rf ${worksrcpath}/libstdc++-v3"
+# Support for PPC was dropped in Darwin 11 (Mac OS X 10.7)
+if {${os.major} < 11} {
+ if {[file exists ${developer_dir}/SDKs/MacOSX10.3.9.sdk] ||
+ [file exists ${developer_dir}/SDKs/MacOSX10.4u.sdk] ||
+ [file exists ${developer_dir}/SDKs/MacOSX10.5.sdk] ||
+ ${build_arch} == "ppc"} {
+ lappend build_targets ppc
}
+}
- post-patch {
- if {${os.major} < 9} {
- reinplace "/vproc.h/d" ${workpath}/${distname}/gcc/libgcov.c
- }
- }
+build.args-append \
+ TARGETS="${build_targets}"
- 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}
- }
+# Yes, use "install" ... the build system does make/install in one go
+# TODO: split the build_gcc script into two to better match MacPorts
+build.target install
+destroot {}
+post-destroot {
+ if {[string match "*i386*" ${build_targets}]} {
+ delete ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/as
+ ln -s ../../../../../bin/as ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/as
+ delete ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/ld
+ ln -s ../../../../../bin/ld ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/ld
+ delete ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/dsymutil
- if {${os.major} < 10} {
- configure.args-append --with-gxx-include-dir=/usr/include/c++/4.0.0
- } else {
- configure.args-append --with-gxx-include-dir=/usr/include/c++/4.2.1
+ # http://trac.macports.org/ticket/35770
+ delete ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
+ ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
}
- configure.args-append --with-slibdir=/usr/lib
+ if {[string match "*ppc*" ${build_targets}]} {
+ delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/as
+ ln -s ../../../../../bin/as ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/as
+ delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/ld
+ ln -s ../../../../../bin/ld ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/ld
+ delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/dsymutil
- post-destroot {
- if {${build_arch} == "i386" } {
- file mkdir ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/4.2.1
- ln -s ../../../../bin/ld ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/ld
-
- # http://trac.macports.org/ticket/35770
- delete ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/libstdc++.dylib
- ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/libstdc++.dylib
- } else {
- file mkdir ${destroot}${prefix}/lib/${name}/gcc/${build_arch}-apple-darwin${os.major}/4.2.1
- ln -s ../../../../bin/ld ${destroot}${prefix}/lib/${name}/gcc/${build_arch}-apple-darwin${os.major}/4.2.1/ld
-
- # http://trac.macports.org/ticket/35770
- delete ${destroot}${prefix}/lib/${name}/gcc/${build_arch}-apple-darwin${os.major}/4.2.1/libstdc++.dylib
- ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/${build_arch}-apple-darwin${os.major}/4.2.1/libstdc++.dylib
- }
-
- # dont install slibs outside of ${prefix}
- foreach f [glob -nocomplain ${destroot}/usr/lib/*] {
- file rename $f ${destroot}${prefix}/lib/${name}/
- }
+ # http://trac.macports.org/ticket/35770
+ delete ${destroot}${prefix}/lib/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
+ ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
}
}
-livecheck.type regex
-livecheck.url ${homepage}releases/
-livecheck.regex {'(\d+\.\d+)'}
+livecheck.type regex
+livecheck.url [lindex ${master_sites} 0]
+livecheck.regex llvmgcc42-(\\d+(?:\\.\\d+)*)\\.tar
Modified: trunk/dports/lang/llvm-gcc42/files/build_gcc
===================================================================
--- trunk/dports/lang/llvm-gcc42/files/build_gcc 2013-01-11 22:40:10 UTC (rev 101496)
+++ trunk/dports/lang/llvm-gcc42/files/build_gcc 2013-01-11 22:40:41 UTC (rev 101497)
@@ -178,8 +178,9 @@
# APPLE LOCAL end ARM
# LLVM LOCAL begin
-# If the user has CC set in their environment unset it now
-unset CC
+RANLIB=${RANLIB_FOR_HOST-ranlib}
+STRIP=${STRIP_FOR_HOST-strip}
+DSYMUTIL=${DSYMUTIL_FOR_HOST-dsymutil}
# LLVM LOCAL end
########################################
@@ -197,7 +198,7 @@
# LLVM LOCAL: The following line was commented out; uncomment it.
rm -rf $SRC_DIR/libstdc++-v3 || exit 1
# Clean out old specs files
-rm -f /usr/lib/gcc/*/4.0.0/specs
+#rm -f /usr/lib/gcc/*/4.0.0/specs
# These are the configure and build flags that are used.
# LLVM LOCAL begin
@@ -211,8 +212,13 @@
--prefix=$DEST_ROOT \
--mandir=\${prefix}/share/man \
--enable-languages=$LANGUAGES \
+ --libexecdir=$DEST_ROOT/libexec/llvm-gcc42 \
+ --libdir=$DEST_ROOT/lib/llvm-gcc42 \
+ --includedir=$DEST_ROOT/include/llvm-gcc42 \
--program-prefix=llvm- \
- --program-transform-name=/^[cg][^.-]*$/s/$/-$MAJ_VERS/ \
+ --program-suffix=-$MAJ_VERS \
+ --with-system-zlib \
+ --disable-nls \
--with-slibdir=/usr/lib \
--build=$BUILD-apple-darwin$DARWIN_VERS"
@@ -247,6 +253,22 @@
fi
done
+BUILD_JAVA=0
+for lang in `echo $LANGUAGES | sed 's/,/ /g'`; do
+ if [ $lang = "java" ]; then
+ BUILD_JAVA=1
+ break
+ fi
+done
+
+BUILD_FORTRAN=0
+for lang in `echo $LANGUAGES | sed 's/,/ /g'`; do
+ if [ $lang = "fortran" ]; then
+ BUILD_FORTRAN=1
+ break
+ fi
+done
+
# Unset this, because GCC uses this variable in its makefiles
unset LANGUAGES
@@ -288,7 +310,10 @@
# comparable to the native built libraries.
unset RC_DEBUG_OPTIONS
make $MAKEFLAGS CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
-make $MAKEFLAGS html CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
+# The version check for makeinfo is broken in all the configure scripts,
+# and building documentation which is already available online isn't worth
+# the effort in fixing it
+#make $MAKEFLAGS html CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
make $MAKEFLAGS DESTDIR=$DIR/dst-$BUILD-$BUILD install-gcc install-target \
CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
@@ -300,11 +325,14 @@
# Add the compiler we just built to the path, giving it appropriate names.
# LLVM LOCAL begin Support for non /usr $DEST_ROOT
D=$DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin
-ln -f $D/llvm-gcc $D/gcc || exit 1
+ln -f $D/llvm-gcc-$MAJ_VERS $D/gcc || exit 1
ln -f $D/gcc $D/$BUILD-apple-darwin$DARWIN_VERS-gcc || exit 1
PATH=$DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin:$PATH
# LLVM LOCAL end Support for non /usr $DEST_ROOT
+# Set CC to our bootstrap CC
+export CC=$D/gcc
+
# The cross-tools' build process expects to find certain programs
# under names like 'i386-apple-darwin$DARWIN_VERS-ar'; so make them.
# Annoyingly, ranlib changes behaviour depending on what you call it,
@@ -405,7 +433,7 @@
for t in $CROSS_TARGETS ; do
DT=$DIR/dst-$BUILD-$t
# LLVM LOCAL Support for non /usr $DEST_ROOT
- D=`echo $DT/$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS`
+ D=`echo $DT/$DEST_ROOT/lib/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS`
mv $D/static/libgcc.a $D/libgcc_static.a || exit 1
mv $D/kext/libgcc.a $D/libcc_kext.a || exit 1
rm -r $D/static $D/kext || exit 1
@@ -441,6 +469,12 @@
else
T_CONFIGFLAGS="$T_CONFIGFLAGS $NON_ARM_CONFIGFLAGS"
fi
+
+ # http://trac.macports.org/ticket/31603
+ if [ $h = "i686" ] && [ $BUILD = "x86_64" ] ; then
+ T_CONFIGFLAGS="$T_CONFIGFLAGS --build=$h-apple-darwin$DARWIN_VERS"
+ fi
+
$SRC_DIR/configure $T_CONFIGFLAGS || exit 1
# APPLE LOCAL end ARM ARM_CONFIGFLAGS
fi
@@ -504,13 +538,13 @@
rm -rf .$DEST_ROOT/share/man/man7
# libexec
-cd $DIR/dst-$BUILD-$BUILD$DEST_ROOT/libexec/gcc/$BUILD-apple-darwin$DARWIN_VERS/$VERS \
+cd $DIR/dst-$BUILD-$BUILD$DEST_ROOT/libexec/llvm-gcc42/gcc/$BUILD-apple-darwin$DARWIN_VERS/$VERS \
|| exit 1
LIBEXEC_FILES=`find . -type f -print || exit 1`
LIBEXEC_DIRS=`find . -type d -print || exit 1`
cd $DEST_DIR || exit 1
for t in $TARGETS ; do
- DL=$DEST_ROOT/libexec/gcc/$t-apple-darwin$DARWIN_VERS/$VERS
+ DL=$DEST_ROOT/libexec/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS
for d in $LIBEXEC_DIRS ; do
mkdir -p .$DL/$d || exit 1
done
@@ -531,33 +565,35 @@
# bin
# The native drivers ('native' is different in different architectures).
-# LLVM LOCAL begin
+BIN_FILES=`ls $DIR/dst-$BUILD-$BUILD$DEST_ROOT/bin | grep '^[^-]*-apple-[0-9.]*$' \
+ | grep -v gccbug | grep -v gcov || exit 1`
mkdir .$DEST_ROOT/bin
-cpp_files=`ls $DIR/dst-*$DEST_ROOT/bin/{llvm-cpp,cpp-$MAJ_VERS} 2>/dev/null`
-lipo -output .$DEST_ROOT/bin/llvm-cpp-$MAJ_VERS -create $cpp_files || exit 1
-# LLVM LOCAL end
-
+for f in $BIN_FILES ; do
+ lipo -output .$DEST_ROOT/bin/$f -create $DIR/dst-*$DEST_ROOT/bin/$f || exit 1
+done
# gcov, which is special only because it gets built multiple times and lipo
# will complain if we try to add two architectures into the same output.
TARG0=`echo $TARGETS | cut -d ' ' -f 1`
-lipo -output .$DEST_ROOT/bin/gcov-$MAJ_VERS -create \
+lipo -output .$DEST_ROOT/bin/llvm-gcov-$MAJ_VERS -create \
$DIR/dst-*-$TARG0$DEST_ROOT/bin/*gcov* || exit 1
# The fully-named drivers, which have the same target on every host.
for t in $TARGETS ; do
# LLVM LOCAL build_gcc bug with non-/usr $DEST_ROOT
lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS -create \
- $DIR/dst-*-$t/$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gcc-$VERS || exit 1
+ $DIR/dst-*-$t/$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-gcc-$MAJ_VERS || exit 1
+ lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-llvm-cpp-$MAJ_VERS -create \
+ $DIR/dst-*-$t$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-cpp-$MAJ_VERS || exit 1
# LLVM LOCAL build_gcc bug with non-/usr $DEST_ROOT
lipo -output .$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS -create \
- $DIR/dst-*-$t/$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-*g++* || exit 1
+ $DIR/dst-*-$t/$DEST_ROOT/bin/$t-apple-darwin$DARWIN_VERS-g++* || exit 1
done
# lib
-mkdir -p .$DEST_ROOT/lib/gcc || exit 1
+mkdir -p .$DEST_ROOT/lib/llvm-gcc42/gcc || exit 1
for t in $TARGETS ; do
# LLVM LOCAL build_gcc bug with non-/usr $DEST_ROOT
- cp -Rp $DIR/dst-$BUILD-$t/$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS \
- .$DEST_ROOT/lib/gcc || exit 1
+ cp -Rp $DIR/dst-$BUILD-$t/$DEST_ROOT/lib/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS \
+ .$DEST_ROOT/lib/llvm-gcc42/gcc || exit 1
done
# APPLE LOCAL begin native compiler support
@@ -569,20 +605,20 @@
for t in $LIBGOMP_TARGETS ; do
for h in $LIBGOMP_HOSTS ; do
if [ $h = $t ] ; then
- cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/libgomp.a \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1
- cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/libgomp.spec \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1
+ cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/llvm-gcc42/libgomp.a \
+ .$DEST_ROOT/lib/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1
+ cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/llvm-gcc42/libgomp.spec \
+ .$DEST_ROOT/lib/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1
if [ $h = 'powerpc' ] ; then
- cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/ppc64/libgomp.a \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
- cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/ppc64/libgomp.spec \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
+ cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/llvm-gcc42/ppc64/libgomp.a \
+ .$DEST_ROOT/lib/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
+ cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/llvm-gcc42/ppc64/libgomp.spec \
+ .$DEST_ROOT/lib/llvm-gcc42/v$t-apple-darwin$DARWIN_VERS/$VERS/ppc64/
elif [ $h = 'i686' ] ; then
- cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/x86_64/libgomp.a \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1
- cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/x86_64/libgomp.spec \
- .$DEST_ROOT/lib/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1
+ cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/llvm-gcc42/x86_64/libgomp.a \
+ .$DEST_ROOT/lib/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1
+ cp -p $DIR/dst-$h-$t$DEST_ROOT/lib/llvm-gcc42/x86_64/libgomp.spec \
+ .$DEST_ROOT/lib/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/x86_64/ || exit 1
fi
fi
done
@@ -593,7 +629,7 @@
# include
-HEADERPATH=$DEST_ROOT/include/gcc/darwin/$MAJ_VERS
+HEADERPATH=$DEST_ROOT/include/gcc/darwin/llvm-gcc42
mkdir -p .$HEADERPATH || exit 1
# Some headers are installed from more-hdrs/. They all share
@@ -608,9 +644,9 @@
if [ ! -f /usr/include/$h -o -L /usr/include/$h ] ; then
cp -R $h $DEST_DIR$HEADERPATH/$h || exit 1
for t in $TARGETS ; do
- THEADERPATH=$DEST_DIR$DEST_ROOT/lib/gcc/${t}-apple-darwin$DARWIN_VERS/$VERS/include
+ THEADERPATH=$DEST_DIR$DEST_ROOT/lib/llvm-gcc42/gcc/${t}-apple-darwin$DARWIN_VERS/$VERS/include
[ -f $THEADERPATH/$h ] || \
- ln -s ../../../../../include/gcc/darwin/$MAJ_VERS/$h $THEADERPATH/$h || \
+ ln -s ../../../../../include/gcc/darwin/llvm-gcc42/$h $THEADERPATH/$h || \
exit 1
done
fi
@@ -620,40 +656,40 @@
MDIR=$DEST_DIR$DEST_ROOT/share/man/man1
if [ $BUILD_CXX -eq 1 ]; then
# LLVM LOCAL
- ln -f $MDIR/llvm-g++.1 $MDIR/llvm-c++.1 || exit 1
+ ln -f $MDIR/llvm-g++-4.2.1 $MDIR/llvm-c++-4.2.1 || exit 1
fi
for t in $TARGETS ; do
# LLVM LOCAL begin
- ln -f $MDIR/llvm-gcc.1 $MDIR/$t-apple-darwin$DARWIN_VERS-llvm-gcc.1 \
+ ln -f $MDIR/llvm-gcc-4.2.1 $MDIR/$t-apple-darwin$DARWIN_VERS-llvm-gcc-4.2.1 \
|| exit 1
if [ $BUILD_CXX -eq 1 ]; then
- ln -f $MDIR/llvm-g++.1 $MDIR/$t-apple-darwin$DARWIN_VERS-llvm-g++.1 \
+ ln -f $MDIR/llvm-g++-4.2.1 $MDIR/$t-apple-darwin$DARWIN_VERS-llvm-g++-4.2.1 \
|| exit 1
fi
# LLVM LOCAL end
done
# LLVM LOCAL begin
-if [ "x$RC_ProjectName" = "xllvmgcc42_Embedded" ]; then
-MAN1_DIR=${DEST_DIR}${ARM_PLATFORM}/Developer/usr/share/man/man1
-else
-MAN1_DIR=$DEST_DIR$DEST_ROOT/../share/man/man1
-fi
-mkdir -p ${MAN1_DIR}
-for i in gcc.1 g++.1 cpp.1 gcov.1 ; do
- cp $DIR/obj-$BUILD-$BUILD/gcc/doc/$i ${MAN1_DIR}/$i
-done
-cp $ORIG_SRC_DIR/gcc/doc/llvm-gcc.1 ${MAN1_DIR}/llvm-gcc.1
-# llvm-g++ manpage is a dup of llvm-gcc manpage
-cp $ORIG_SRC_DIR/gcc/doc/llvm-gcc.1 ${MAN1_DIR}/llvm-g++.1
-# Compress manpages
-gzip -f $MDIR/* ${MAN1_DIR}/*
-# LLVM LOCAL end
+#if [ "x$RC_ProjectName" = "xllvmgcc42_Embedded" ]; then
+#MAN1_DIR=${DEST_DIR}${ARM_PLATFORM}/Developer/usr/share/man/man1
+#else
+#MAN1_DIR=$DEST_DIR$DEST_ROOT/../share/man/man1
+#fi
+#mkdir -p ${MAN1_DIR}
+#for i in gcc.1 g++.1 cpp.1 gcov.1 ; do
+# cp $DIR/obj-$BUILD-$BUILD/gcc/doc/$i ${MAN1_DIR}/$i
+#done
+#cp $ORIG_SRC_DIR/gcc/doc/llvm-gcc.1 ${MAN1_DIR}/llvm-gcc.1
+## llvm-g++ manpage is a dup of llvm-gcc manpage
+#cp $ORIG_SRC_DIR/gcc/doc/llvm-gcc.1 ${MAN1_DIR}/llvm-g++.1
+## Compress manpages
+#gzip -f $MDIR/* ${MAN1_DIR}/*
+## LLVM LOCAL end
# Build driver-driver using fully-named drivers
for h in $HOSTS ; do
# LLVM LOCAL begin
- $h-apple-darwin$DARWIN_VERS-gcc \
+ $DIR/dst-$BUILD-$h$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gcc-$VERS \
$ORIG_SRC_DIR/driverdriver.c \
-DPDN="\"-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS\"" \
-DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
@@ -663,8 +699,18 @@
-L$DIR/obj-$h-$BUILD/libiberty/ \
-o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-gcc-$MAJ_VERS || exit 1
+ $DIR/dst-$BUILD-$h$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gcc-$VERS \
+ $ORIG_SRC_DIR/driverdriver.c \
+ -DPDN="\"-apple-darwin$DARWIN_VERS-llvm-cpp-$MAJ_VERS\"" \
+ -DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
+ -I $ORIG_SRC_DIR/gcc -I $ORIG_SRC_DIR/gcc/config \
+ -liberty -L$DIR/dst-$BUILD-$h$DEST_ROOT/lib/ \
+ -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \
+ -L$DIR/obj-$h-$BUILD/libiberty/ \
+ -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-cpp-$MAJ_VERS || exit 1
+
if [ $BUILD_CXX -eq 1 ]; then
- $h-apple-darwin$DARWIN_VERS-gcc \
+ $DIR/dst-$BUILD-$h$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gcc-$VERS \
$ORIG_SRC_DIR/driverdriver.c \
-DPDN="\"-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS\"" \
-DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
@@ -674,6 +720,30 @@
-L$DIR/obj-$h-$BUILD/libiberty/ \
-o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-g++-$MAJ_VERS || exit 1
fi
+
+ if [ $BUILD_JAVA -eq 1 ]; then
+ $DIR/dst-$BUILD-$h$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gcc-$VERS \
+ $ORIG_SRC_DIR/driverdriver.c \
+ -DPDN="\"-apple-darwin$DARWIN_VERS-llvm-gcj-$MAJ_VERS\"" \
+ -DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
+ -I $ORIG_SRC_DIR/gcc -I $ORIG_SRC_DIR/gcc/config \
+ -liberty -L$DIR/dst-$BUILD-$h$DEST_ROOT/lib/ \
+ -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \
+ -L$DIR/obj-$h-$BUILD/libiberty/ \
+ -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-gcj-$MAJ_VERS || exit 1
+ fi
+
+ if [ $BUILD_FORTRAN -eq 1 ]; then
+ $DIR/dst-$BUILD-$h$DEST_ROOT/bin/$h-apple-darwin$DARWIN_VERS-gcc-$VERS \
+ $ORIG_SRC_DIR/driverdriver.c \
+ -DPDN="\"-apple-darwin$DARWIN_VERS-llvm-gfortran-$MAJ_VERS\"" \
+ -DIL="\"$DEST_ROOT/bin/\"" -I $ORIG_SRC_DIR/include \
+ -I $ORIG_SRC_DIR/gcc -I $ORIG_SRC_DIR/gcc/config \
+ -liberty -L$DIR/dst-$BUILD-$h$DEST_ROOT/lib/ \
+ -L$DIR/dst-$BUILD-$h$DEST_ROOT/$h-apple-darwin$DARWIN_VERS/lib/ \
+ -L$DIR/obj-$h-$BUILD/libiberty/ \
+ -o $DEST_DIR/$DEST_ROOT/bin/tmp-$h-llvm-gfortran-$MAJ_VERS || exit 1
+ fi
# LLVM LOCAL end
done
@@ -682,12 +752,28 @@
$DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-gcc-$MAJ_VERS || exit 1
rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-gcc-$MAJ_VERS || exit 1
+lipo -output $DEST_DIR/$DEST_ROOT/bin/llvm-cpp-$MAJ_VERS -create \
+ $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-cpp-$MAJ_VERS || exit 1
+rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-cpp-$MAJ_VERS || exit 1
+
if [ $BUILD_CXX -eq 1 ]; then
lipo -output $DEST_DIR/$DEST_ROOT/bin/llvm-g++-$MAJ_VERS -create \
$DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-g++-$MAJ_VERS || exit 1
ln -f $DEST_DIR/$DEST_ROOT/bin/llvm-g++-$MAJ_VERS $DEST_DIR/$DEST_ROOT/bin/llvm-c++-$MAJ_VERS || exit 1
rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-llvm-g++-$MAJ_VERS || exit 1
fi
+
+if [ $BUILD_JAVA -eq 1 ]; then
+ lipo -output $DEST_DIR/$DEST_ROOT/bin/llvm-gcj-$MAJ_VERS -create \
+ $DEST_DIR/$DEST_ROOT/bin/tmp-*-gcj-$MAJ_VERS || exit 1
+ rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-gcj-$MAJ_VERS || exit 1
+fi
+
+if [ $BUILD_FORTRAN -eq 1 ]; then
+ lipo -output $DEST_DIR/$DEST_ROOT/bin/llvm-gfortran-$MAJ_VERS -create \
+ $DEST_DIR/$DEST_ROOT/bin/tmp-*-gfortran-$MAJ_VERS || exit 1
+ rm $DEST_DIR/$DEST_ROOT/bin/tmp-*-gfortran-$MAJ_VERS || exit 1
+fi
# LLVM LOCAL end
########################################
@@ -700,7 +786,7 @@
# Generate .dSYM files
find $DEST_DIR -perm -0111 \! -name fixinc.sh \
- \! -name mkheaders -type f -print | xargs -n 1 -P ${SYSCTL} dsymutil
+ \! -name mkheaders -type f -print | xargs -n 1 ${DSYMUTIL}
# Save .dSYM files and .a archives
cd $DEST_DIR || exit 1
@@ -719,15 +805,16 @@
find $DEST_DIR -perm -0111 \! -path '*DWARF*' \! -name \*.dylib \
\! -name fixinc.sh \! -name mkheaders \! -name libstdc++.dylib \
-type f -print \
- | xargs strip || exit 1
+ | xargs ${STRIP} || exit 1
# LLVM LOCAL begin - Strip with -Sx instead of -SX
+ # Ignore errors from this next one due to possible issues on Tiger
find $DEST_DIR \! -path '*DWARF*' \( -name \*.a -or -name \*.dylib \) \
\! -name libgcc_s.10.*.dylib \! -name libstdc++.dylib -type f \
-print \
- | xargs strip -SX || exit 1
+ | xargs ${STRIP} -SX
# LLVM LOCAL end - Strip with -Sx instead of -SX
find $DEST_DIR \! -path '*DWARF*' -name \*.a -type f -print \
- | xargs ranlib || exit 1
+ | xargs ${RANLIB} || exit 1
# LLVM LOCAL end - don't strip dSYM objects
fi
@@ -735,32 +822,32 @@
# Set up the llvm-gcc/llvm-g++ symlinks.
# LLVM_BIN_DIR - This is the place where llvm-gcc/llvm-g++ symlinks get installed.
-LLVM_BIN_DIR=$DEST_ROOT/../bin
+#LLVM_BIN_DIR=$DEST_ROOT/../bin
+#
+#mkdir -p $DEST_DIR$LLVM_BIN_DIR
+#cd $DEST_DIR$LLVM_BIN_DIR
+#ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-gcc-$MAJ_VERS llvm-gcc-$MAJ_VERS || exit 1
+#ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-g++-$MAJ_VERS llvm-g++-$MAJ_VERS || exit 1
+#ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-cpp-$MAJ_VERS llvm-cpp-$MAJ_VERS || exit 1
+#ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-gcc-$MAJ_VERS llvm-gcc || exit 1
+#ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-g++-$MAJ_VERS llvm-g++ || exit 1
-mkdir -p $DEST_DIR$LLVM_BIN_DIR
-cd $DEST_DIR$LLVM_BIN_DIR
-ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-gcc-$MAJ_VERS llvm-gcc-$MAJ_VERS || exit 1
-ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-g++-$MAJ_VERS llvm-g++-$MAJ_VERS || exit 1
-ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-cpp-$MAJ_VERS llvm-cpp-$MAJ_VERS || exit 1
-ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-gcc-$MAJ_VERS llvm-gcc || exit 1
-ln -s -f ../llvm-gcc-$MAJ_VERS/bin/llvm-g++-$MAJ_VERS llvm-g++ || exit 1
-
# FIXME: This is a hack to get things working.
-for t in $TARGETS ; do
- ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS $t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS || exit 1
- ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS $t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS || exit 1
-done
+#for t in $TARGETS ; do
+# ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS $t-apple-darwin$DARWIN_VERS-llvm-gcc-$MAJ_VERS || exit 1
+# ln -s -f ../llvm-gcc-$MAJ_VERS/bin/$t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS $t-apple-darwin$DARWIN_VERS-llvm-g++-$MAJ_VERS || exit 1
+#done
-# Copy one of the libllvmgcc.dylib's up to libexec/gcc.
-cp $DEST_DIR/$DEST_ROOT/libexec/gcc/$BUILD-apple-darwin$DARWIN_VERS/$VERS/libllvmgcc.dylib \
- $DEST_DIR/$DEST_ROOT/libexec/gcc/
+# Copy one of the libllvmgcc.dylib's up to libexec/llvm-gcc42.
+#cp $DEST_DIR/$DEST_ROOT/libexec/llvm-gcc42/gcc/$BUILD-apple-darwin$DARWIN_VERS/$VERS/libllvmgcc.dylib \
+# $DEST_DIR/$DEST_ROOT/libexec/llvm-gcc42/gcc/ || exit 1
# Replace the installed ones with symlinks to the common one.
-for t in $TARGETS ; do
- cd $DEST_DIR/$DEST_ROOT/libexec/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/
- rm libllvmgcc.dylib
- ln -s ../../libllvmgcc.dylib
-done
+#for t in $TARGETS ; do
+# cd $DEST_DIR/$DEST_ROOT/libexec/llvm-gcc42/gcc/$t-apple-darwin$DARWIN_VERS/$VERS/ || exit 1
+# rm libllvmgcc.dylib || exit 1
+# ln -s ../../libllvmgcc.dylib || exit 1
+#done
# Remove unwind.h from the install directory for > 10.6
if [ $DARWIN_VERS -gt 10 ]; then
Added: trunk/dports/lang/llvm-gcc42/files/driverdriver-armcheck.patch
===================================================================
--- trunk/dports/lang/llvm-gcc42/files/driverdriver-armcheck.patch (rev 0)
+++ trunk/dports/lang/llvm-gcc42/files/driverdriver-armcheck.patch 2013-01-11 22:40:41 UTC (rev 101497)
@@ -0,0 +1,33 @@
+--- driverdriver.c.orig 2011-04-25 21:09:34.000000000 -0700
++++ driverdriver.c 2013-01-11 01:14:57.000000000 -0800
+@@ -123,12 +123,14 @@ struct arch_config_guess_map arch_config
+ {"ppc", "powerpc"},
+ {"ppc64", "powerpc"},
+ {"x86_64", "i686"},
++#ifdef CPU_TYPE_ARM
+ {"arm", "arm"},
+ {"armv4t", "arm"},
+ {"armv5", "arm"},
+ {"xscale", "arm"},
+ {"armv6", "arm"},
+ {"armv7", "arm"},
++#endif
+ {NULL, NULL}
+ };
+
+@@ -772,6 +774,7 @@ add_arch_options (int index, const char
+ current_argv[arch_index] = "-march=pentium2";
+ else if (!strcmp (arches[index], "x86_64"))
+ current_argv[arch_index] = "-m64";
++#ifdef CPU_TYPE_ARM
+ else if (!strcmp (arches[index], "arm"))
+ current_argv[arch_index] = "-march=armv4t";
+ else if (!strcmp (arches[index], "armv4t"))
+@@ -784,6 +787,7 @@ add_arch_options (int index, const char
+ current_argv[arch_index] = "-march=armv6k";
+ else if (!strcmp (arches[index], "armv7"))
+ current_argv[arch_index] = "-march=armv7a";
++#endif
+ else
+ count = 0;
+
Added: trunk/dports/lang/llvm-gcc42/files/driverdriver-num_infiles.patch
===================================================================
--- trunk/dports/lang/llvm-gcc42/files/driverdriver-num_infiles.patch (rev 0)
+++ trunk/dports/lang/llvm-gcc42/files/driverdriver-num_infiles.patch 2013-01-11 22:40:41 UTC (rev 101497)
@@ -0,0 +1,11 @@
+--- driverdriver.c.orig 2012-03-30 15:23:03.000000000 -0700
++++ driverdriver.c 2012-03-30 15:43:40.000000000 -0700
+@@ -1599,7 +1599,7 @@ main (int argc, const char **argv)
+
+ /* If more than one input files are supplied but only one output filename
+ is present then IMA will be used. */
+- if (num_infiles > 1 && !compile_only_request)
++ if (num_infiles != 1 && !compile_only_request)
+ ima_is_used = 1;
+
+ /* Linker wants to know this in case of multiple -arch. */
Added: trunk/dports/lang/llvm-gcc42/files/incpath.patch
===================================================================
--- trunk/dports/lang/llvm-gcc42/files/incpath.patch (rev 0)
+++ trunk/dports/lang/llvm-gcc42/files/incpath.patch 2013-01-11 22:40:41 UTC (rev 101497)
@@ -0,0 +1,11 @@
+--- gcc/c-incpath.c.orig 2009-02-14 20:17:54.000000000 -0800
++++ gcc/c-incpath.c 2013-01-11 01:23:23.000000000 -0800
+@@ -179,7 +179,7 @@ add_standard_paths (const char *sysroot,
+ char *str;
+
+ /* Should this directory start with the sysroot? */
+- if (sysroot && p->add_sysroot)
++ if (sysroot && p->add_sysroot && strstr(p->fname, "llvm-gcc42") == NULL)
+ /* LLVM LOCAL begin sysroot */
+ #ifdef ENABLE_LLVM
+ str = TARGET_BUILD_SYSROOT_PATH(sysroot, p->fname);
Modified: trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42
===================================================================
--- trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42 2013-01-11 22:40:10 UTC (rev 101496)
+++ trunk/dports/lang/llvm-gcc42/files/mp-llvm-gcc42 2013-01-11 22:40:41 UTC (rev 101497)
@@ -3,5 +3,5 @@
bin/llvm-c++-4.2
bin/llvm-g++-4.2
-
-bin/llvm-gcov-4.2
-bin/llvm-gfortran-4.2
+-
+-
Added: trunk/dports/lang/llvm-gcc42/files/werror-local-alloc.patch
===================================================================
--- trunk/dports/lang/llvm-gcc42/files/werror-local-alloc.patch (rev 0)
+++ trunk/dports/lang/llvm-gcc42/files/werror-local-alloc.patch 2013-01-11 22:40:41 UTC (rev 101497)
@@ -0,0 +1,23 @@
+--- gcc/local-alloc.c.orig 2010-01-08 11:32:10.000000000 -0800
++++ gcc/local-alloc.c 2013-01-11 01:18:55.000000000 -0800
+@@ -899,7 +899,7 @@ update_equiv_regs (void)
+ /* APPLE LOCAL begin 5695218 */
+ if (reg_inheritance_matrix)
+ {
+- int dstregno;
++ long dstregno;
+ if (REG_P (dest))
+ {
+ dstregno = REGNO (dest);
+@@ -2676,9 +2676,9 @@ static int
+ reg_inheritance_1 (rtx *px, void *data)
+ {
+ rtx x = *px;
+- unsigned int srcregno, dstregno;
++ unsigned long srcregno, dstregno;
+
+- dstregno = (int)data;
++ dstregno = (long)data;
+ #ifdef TARGET_386
+ /*
+ Ugly special case: When moving a DI/SI/mode constant into an FP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130111/4e3b3677/attachment-0001.html>
More information about the macports-changes
mailing list