grub-devel
[Top][All Lists]
Advanced

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

Re: Failed to build with "-mretpoline"


From: Daniel Kiper
Subject: Re: Failed to build with "-mretpoline"
Date: Thu, 22 Feb 2024 16:21:08 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Hi,

On Fri, Feb 09, 2024 at 10:48:24AM +0000, Oleksiy Obitotskyi -X (oobitots - 
GLOBALLOGIC INC at Cisco) via Grub-devel wrote:
> 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++;
> }

Could you explain why do you use -mretpoline to compile GRUB?
What is your use case?

Daniel



reply via email to

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