99ab0e
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
99ab0e
index 638b2a7b5a9f..79d4ecf4cb91 100644
99ab0e
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
99ab0e
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
99ab0e
@@ -763,7 +763,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>(
99ab0e
             && cmd.get_args().iter().any(|e| e.to_string_lossy() == "-no-pie")
99ab0e
         {
99ab0e
             info!("linker output: {:?}", out);
99ab0e
-            warn!("Linker does not support -no-pie command line option. Retrying without.");
99ab0e
+            info!("Linker does not support -no-pie command line option. Retrying without.");
99ab0e
             for arg in cmd.take_args() {
99ab0e
                 if arg.to_string_lossy() != "-no-pie" {
99ab0e
                     cmd.arg(arg);
99ab0e
@@ -782,7 +782,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>(
99ab0e
             && cmd.get_args().iter().any(|e| e.to_string_lossy() == "-static-pie")
99ab0e
         {
99ab0e
             info!("linker output: {:?}", out);
99ab0e
-            warn!(
99ab0e
+            info!(
99ab0e
                 "Linker does not support -static-pie command line option. Retrying with -static instead."
99ab0e
             );
99ab0e
             // Mirror `add_(pre,post)_link_objects` to replace CRT objects.
99ab0e
@@ -1507,15 +1507,14 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
892f9b
 }
892f9b
 
892f9b
 fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
892f9b
-    let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) {
99ab0e
+    // Only use PIE if explicitly specified.
86638a
+    let explicit_pic =
86638a
+        matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic | RelocModel::Pie));
892f9b
+    let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) {
892f9b
         (CrateType::Executable, _, _) if sess.is_wasi_reactor() => LinkOutputKind::WasiReactorExe,
86638a
-        (CrateType::Executable, false, RelocModel::Pic | RelocModel::Pie) => {
86638a
-            LinkOutputKind::DynamicPicExe
86638a
-        }
892f9b
+        (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe,
892f9b
         (CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe,
86638a
-        (CrateType::Executable, true, RelocModel::Pic | RelocModel::Pie) => {
86638a
-            LinkOutputKind::StaticPicExe
86638a
-        }
892f9b
+        (CrateType::Executable, true, true) => LinkOutputKind::StaticPicExe,
892f9b
         (CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe,
892f9b
         (_, true, _) => LinkOutputKind::StaticDylib,
892f9b
         (_, false, _) => LinkOutputKind::DynamicDylib,