--- rustc-1.48.0-src/compiler/rustc_llvm/src/lib.rs
+++ rustc-1.48.0-src/compiler/rustc_llvm/src/lib.rs
@@ -170,3 +170,10 @@
                  LLVMInitializeWebAssemblyTargetMC,
                  LLVMInitializeWebAssemblyAsmPrinter);
 }
+
+#[link(name = "ffi")]
+extern {}
+#[link(name = "z")]
+extern {}
+#[link(name = "ncursesw")]
+extern {}
