View | Details | Raw Unified | Return to bug 244813
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 92-98 Link Here
92
EXTRA_PATCHES+=	${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX}
92
EXTRA_PATCHES+=	${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX}
93
.endif
93
.endif
94
94
95
.if ${ARCH} == powerpc64 && ${PPC_ABI} == ELFv1
95
.if ${ARCH} == powerpc64
96
# The bootstrap is hardcoded to use gcc9
96
# The bootstrap is hardcoded to use gcc9
97
# but we can build with a newer or older compiler as provided by USE_GCC=yes
97
# but we can build with a newer or older compiler as provided by USE_GCC=yes
98
BUILD_DEPENDS+=	gcc9:lang/gcc9
98
BUILD_DEPENDS+=	gcc9:lang/gcc9
(-)files/powerpc64-elfv2/patch-src_bootstrap_native.rs (+13 lines)
Line 0 Link Here
1
--- src/bootstrap/native.rs.orig	2019-11-04 15:45:21 UTC
2
+++ src/bootstrap/native.rs
3
@@ -241,6 +241,10 @@ impl Step for Llvm {
4
             }
5
         }
6
 
7
+        if target == "powerpc64-unknown-freebsd" {
8
+            cfg.define("CMAKE_EXE_LINKER_FLAGS", "-Wl,-rpath=/usr/local/lib/%CC% -L/usr/local/lib/%CC%");
9
+        }
10
+
11
         // http://llvm.org/docs/HowToCrossCompileLLVM.html
12
         if target != builder.config.build && !emscripten {
13
             builder.ensure(Llvm {
(-)files/powerpc64-elfv2/patch-src_librustc__llvm_build.rs (+18 lines)
Line 0 Link Here
1
--- src/librustc_llvm/build.rs.orig	2019-12-16 15:38:05 UTC
2
+++ src/librustc_llvm/build.rs
3
@@ -273,7 +273,14 @@ fn main() {
4
     };
5
 
6
     // C++ runtime library
7
-    if !target.contains("msvc") {
8
+    if target == "powerpc64-unknown-freebsd" {
9
+        if is_crossed {
10
+            println!("cargo:rustc-link-search=native=%WRKDIR%/usr/local/lib/%CC%");
11
+        } else {
12
+            println!("cargo:rustc-link-search=native=/usr/local/lib/%CC%");
13
+        }
14
+        println!("cargo:rustc-link-lib=static=stdc++");
15
+    } else if !target.contains("msvc") {
16
         if let Some(s) = llvm_static_stdcpp {
17
             assert!(!cxxflags.contains("stdlib=libc++"));
18
             let path = PathBuf::from(s);

Return to bug 244813