On Thu, Sep 3, 2026 at 1:50 AM Oleksiy Obitotskyy -X (oobitots -
GLOBALLOGIC INC at Cisco) via Grub-devel <[email protected]> wrote:

> Sorry for the delay.
>

Hi Oleksiy

Things have changed in the project, and this mailing list is no longer
"active". In summary, we moved to GitLab for MR and issue tracking.

Please create an account on gitlab (and ask it to verify it) and report
this issue as indicated at [1]

[1] https://gitlab.freedesktop.org/gnu-grub/grub/-/blob/master/CONTRIBUTING


> I'm return back to this issue.
>
> Here is the problem:
>
>    - clang with -mretpoline generates weak __llvm_retpoline_* symbols in
>    every GRUB unit/module
>    - dependency generator (genmoddep.awk) incorrectly treats these common
>    symbols as duplicate module-owned symbols
>
>
> ```
> ...
> | mv syminfo.lst.new syminfo.lst
> | cat syminfo.lst | sort | gawk -f ../../grub-2.12/grub-core/genmoddep.awk
> > moddep.lst || (rm -f moddep.lst; exit 1)
> | __llvm_retpoline_eax in adler32 is duplicated in acpi
> | __llvm_retpoline_ecx in adler32 is duplicated in acpi
> | __llvm_retpoline_edi in adler32 is duplicated in acpi
> | __llvm_retpoline_edx in adler32 is duplicated in acpi
> | __llvm_retpoline_eax in affs is duplicated in adler32
> | __llvm_retpoline_ecx in affs is duplicated in adler32
> | __llvm_retpoline_edi in affs is duplicated in adler32
> | __llvm_retpoline_edx in affs is duplicated in adler32
> | __llvm_retpoline_eax in afs is duplicated in affs
> | __llvm_retpoline_ecx in afs is duplicated in affs
> | __llvm_retpoline_edi in afs is duplicated in affs
> | __llvm_retpoline_edx in afs is duplicated in affs
> ...
> | __llvm_retpoline_eax in zstd is duplicated in zfsinfo
> | __llvm_retpoline_ecx in zstd is duplicated in zfsinfo
> | __llvm_retpoline_edi in zstd is duplicated in zfsinfo
> | __llvm_retpoline_edx in zstd is duplicated in zfsinfo
> | make[3]: *** [Makefile:51201: moddep.lst] Error 1
> ```
>
> Regards,
> Oleksiy
>
>
> ------------------------------
> *From:* Daniel Kiper <[email protected]>
> *Sent:* Thursday, February 22, 2024 16:21
> *To:* Oleksiy Obitotskyi -X (oobitots - GLOBALLOGIC INC at Cisco) <
> [email protected]>
> *Cc:* [email protected] <[email protected]>
> *Subject:* Re: Failed to build with "-mretpoline"
>
> 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
> _______________________________________________
> Grub-devel mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
  • ... Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) via Grub-devel
    • ... Leo Sandoval via Grub-devel

Reply via email to