public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/111084] New: Support configurable dynamic linker path
@ 2023-08-20 21:09 hdante at gmail dot com
  2023-08-20 21:13 ` [Bug driver/111084] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hdante at gmail dot com @ 2023-08-20 21:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111084
           Summary: Support configurable dynamic linker path
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hdante at gmail dot com
  Target Milestone: ---

Hello, it's not possible, currently, to set the dynamic linker root path when
building gcc. The current workaround is to modify the source code and/or spec
file, as shown, for example, by the "linux from scratch" scripts, when
compiling a toolchain rooted at /tools:

    ## Change the location of GCC's default dynamic linker to use the one
installed in /tools
    #
    # For i686/x86_64:
    for file in gcc/config/{linux,i386/linux{,64}}.h
    do
      cp -uv $file{,.orig}
      sed -e 's/\/lib\(64\)\?\(32\)\?\/ld/\/tools&/g' \
          -e 's/\/usr/\/tools/g' ${file}.orig > ${file}
      echo '
    #undef STANDARD_STARTFILE_PREFIX_1
    #undef STANDARD_STARTFILE_PREFIX_2
    #define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
    #define STANDARD_STARTFILE_PREFIX_2 ""' >> ${file}
      touch ${file}.orig
    done

(...)

    case $(uname -m) in
       i686)   # for i386
               sed -i
's/\/lib\/ld-musl-i386.so.1/\/tools\/lib\/ld-musl-i386.so.1/g' tempspecfile
               # check with sed
               grep "/tools/lib/ld-musl-i386.so.1" tempspecfile  --color=auto
               ;;

(etc.)

Can you add a configuration parameter to support changing the dynamic linker
root path ?

Thanks,

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

end of thread, other threads:[~2023-08-21  2:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-20 21:09 [Bug driver/111084] New: Support configurable dynamic linker path hdante at gmail dot com
2023-08-20 21:13 ` [Bug driver/111084] " pinskia at gcc dot gnu.org
2023-08-20 21:15 ` pinskia at gcc dot gnu.org
2023-08-20 21:36 ` hdante at gmail dot com
2023-08-21  2:15 ` xry111 at gcc dot gnu.org
2023-08-21  2:17 ` pinskia at gcc dot gnu.org
2023-08-21  2:22 ` xry111 at gcc dot gnu.org

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).