Allow our linker warnings regarding misuse of libc functions to be
authoranton <anton@openbsd.org>
Mon, 5 Aug 2024 06:11:42 +0000 (06:11 +0000)
committeranton <anton@openbsd.org>
Mon, 5 Aug 2024 06:11:42 +0000 (06:11 +0000)
elevated to errors using the -Wl,--fatal-warnings option.

ok robert@

gnu/llvm/lld/ELF/Relocations.cpp

index 9bdbad2..255fb28 100644 (file)
@@ -798,8 +798,8 @@ static void reportGNUWarning(Symbol &sym, InputSectionBase &sec,
     // report first occurance only
     sym.gwarn = false;
     if (!gnuWarning.empty())
-      message(sec.getSrcMsg(sym, offset) + "(" + sec.getObjMsg(offset) +
-              "): warning: " + gnuWarning);
+      warn(sec.getSrcMsg(sym, offset) + "(" + sec.getObjMsg(offset) +
+           "): warning: " + gnuWarning);
   }
 }