Skip to content

Commit 32c1f90

Browse files
committed
lang/rust: Disable static linking against libstdc++
- According to the PR below and due to some llvm-tools and bootstrap untangling, the default was made to link statically against libstdc++, although it can be opted-out: rust-lang/rust#94832 - Our static libstdc++ is not compiled with -fPIC apparently (dunno why) so it's not possible to do the static linking against it when other libraries are compiled with -fPIC. There is probably more to it though. Pointed-out-by: jynelson (rust's discord)
1 parent 120b746 commit 32c1f90

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ports/lang/rust/diffs/Makefile.diff

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- Makefile.orig 2022-01-20 00:07:08 UTC
1+
--- Makefile.orig 2022-07-26 22:50:42 UTC
22
+++ Makefile
3-
@@ -92,10 +92,6 @@ _CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${AR
3+
@@ -105,10 +105,6 @@ SHEBANG_FILES= compiler/rustc_codegen_c
44

55
.include <bsd.port.pre.mk>
66

@@ -11,3 +11,11 @@
1111
.if ${ARCH} == powerpc
1212
# bfd to link rustc_driver; lld currently can't
1313
BUILD_DEPENDS+= ld.bfd:devel/binutils
14+
@@ -229,6 +225,7 @@ do-configure:
15+
@${ECHO_CMD} 'ccache=false' >> ${WRKSRC}/config.toml
16+
.endif
17+
@${ECHO_CMD} 'ninja=true' >> ${WRKSRC}/config.toml
18+
+ @${ECHO_CMD} 'static-libstdcpp=false' >> ${WRKSRC}/config.toml
19+
.if ${ARCH} == powerpc
20+
# Rust doesn't call the system compiler with the full version of the target.
21+
# This makes powerpc miscompile due to the secure-plt ABI change.

0 commit comments

Comments
 (0)