grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Failed to build with "-mretpoline"


From: Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco)
Subject: Failed to build with "-mretpoline"
Date: Fri, 9 Feb 2024 10:48:24 +0000

Hi,

We are bulding grub with clang that use -mretpoline option. This leads to symbols __llvm_retpoline_[eax/ecx/edx, etc.] generated into binaries. And caused  duplicates error during moddep.lst creation.
I'm not sure if this fix will be a bit project specific?

diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk
index 2474363..f859854 100644
--- a/grub-core/genmoddep.awk
+++ b/grub-core/genmoddep.awk
@@ -18,7 +18,7 @@ BEGIN {
{
if ($1 == "defined") {
- if ($3 !~ /^\.refptr\./ && $3 in symtab) {
+ if ($3 !~ /__llvm_retpoline_.*/ && $3 !~ /^\.refptr\./ && $3 in symtab) {
printf "%s in %s is duplicated in %s\n", $3, $2, symtab[$3] >"/dev/stderr";
error++;
}

Regards,
Oleksiy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]