public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/105305] New: ARM32: gcc does not pass all library directories to linker
@ 2022-04-19  6:01 rui314 at gmail dot com
  2022-04-19  6:11 ` [Bug target/105305] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rui314 at gmail dot com @ 2022-04-19  6:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105305

            Bug ID: 105305
           Summary: ARM32: gcc does not pass all library directories to
                    linker
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rui314 at gmail dot com
  Target Milestone: ---

I'm the author of the mold linker (https://github.com/rui314/mold).

As far as I know, gcc always passes all library paths to the linker by -L<dir>,
but I got a bug report that that's not the case on ARM32. It is reported that
gcc does not pass some obvious paths such as `-L/usr` or `-L/usr/lib`. The code
to explicitly exclude "obvious" directories is here:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/gcc.cc;h=bb07cc244e30fbeccc701816db888f497d65eb08;hb=refs/heads/master#l7931

mold and LLVM lld don't have the notion of the default search paths for the
sake of build reproducibility. They guarantee that as long as you pass the
exact same command line options and input files, the linkers behave exactly the
same regardless of the host machine (in LLD, that's guaranteed even across Unix
and Windows.) That helps us a lot when we do cross compilation.

So, can gcc pass all library paths to the linker on ARM32?

https://github.com/rui314/mold/issues/336

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-03  4:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19  6:01 [Bug c/105305] New: ARM32: gcc does not pass all library directories to linker rui314 at gmail dot com
2022-04-19  6:11 ` [Bug target/105305] " pinskia at gcc dot gnu.org
2022-11-03  4:11 ` pinskia at gcc dot gnu.org
2022-11-03  4:25 ` rui314 at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).