Hi,
Here an update for lang/rust port.
It provide a correction to permit to build lang/rust whereas
gcc-libs-4.9.* is installed (+ some cleanup in comments).
The problem with gcc-libs-4.9.* is the package include a
libestdc++.so.17.0 file.
The lang/rust is normally linked with libestdc++.so.16.0, but without
this patch, it could be linked with libestdc++.so.17.0 if present.
The patch disambiguate the linkage.
No REVISION bump as it don't change anything (just remove a possible
build failure).
--
Sébastien Marie
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/rust/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile 8 Apr 2015 13:02:57 -0000 1.2
+++ Makefile 15 Apr 2015 14:02:41 -0000
@@ -29,7 +29,6 @@ MAINTAINER = Sebastien Marie <semarie-o
# with portions covered by various BSD-like licenses
PERMIT_PACKAGE_CDROM = Yes
-# "make port-lib-depends-check" can help
WANTLIB-main = ${WANTLIB} c m pthread
WANTLIB-doc =
@@ -59,16 +58,18 @@ MODULES += gcc4 \
MODGCC4_LANGS = c++
MODGCC4_ARCHS = *
-#TEST_DEPENDS = ???
+# need to be keep in sync
+LIBESTDC_VERSION = 16.0
# note: VERBOSE permit to unhide Makefile processing
# RUSTFLAGS extra flags passed to rust
+# -L modgcc-libs : disambiguate libestdc++.so
# -Z print-link-args : unhide link call
# RUSTFLAGS_STAGE0 extra flags passed to stage0
# --sysroot force sysroot (due to limitation of us bootstrapper)
# RUST_LOG helper
MAKE_ENV = VERBOSE=1 \
- RUSTFLAGS="-Z print-link-args" \
+ RUSTFLAGS="-L ${WRKDIR}/modgcc-libs -Z print-link-args"
\
RUSTFLAGS_STAGE0="--sysroot
${WRKBUILD}/${TRIPLE_ARCH}/stage0" \
RUST_LOG="${RUST_LOG}"
@@ -104,6 +105,9 @@ pre-configure:
exit 1; fi
# - remove autodetected programs
+# - copy libestdc++ from MODGCC4 to specific directory
+# in order to disambiguate version linking (having multiple libestdc++
+# at build time)
# - copy snapshot in stage0 (avoid downloading a snapshot)
post-configure:
.for _v in CFG_CURLORWGET CFG_GIT CFG_CLANG CFG_VALGRIND CFG_PERF CFG_ISCC \
@@ -111,6 +115,8 @@ post-configure:
CFG_GDB_VERSION CFG_ADB
perl -pi -e 's/^${_v} .*/${_v} := /' ${WRKBUILD}/config.mk
.endfor
+ mkdir ${WRKDIR}/modgcc-libs
+ cp ${LOCALBASE}/lib/libestdc++.so.${LIBESTDC_VERSION}
${WRKDIR}/modgcc-libs
cp ${WRKDIR}/rust-stage0/bin/rustc \
${WRKBUILD}/${TRIPLE_ARCH}/stage0/bin
cp ${WRKDIR}/rust-stage0/lib/lib*.so* \