This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

configure munges $ORIGIN in LDFLAGS


Using a shell script to build binutils-2.19.1, LDFLAGS assignment looks like this:

        -Wl,-rpath,/path/to/bootstrap/lib -Wl,-rpath,/path/to/bootstrap/lib64
        -Wl,-rpath,'$$ORIGIN/../lib' -Wl,-rpath,'$$ORIGIN/../lib64'
        -Wl,-rpath,'$$ORIGIN/../../lib' -Wl,-rpath,'$$ORIGIN/../../lib64'
        -Wl,-rpath,/path/to/bootstrap/glibc/lib64
        -Wl,-rpath,/path/to/bootstrap/glibc/lib -L/path/to/lib -L/path/to/lib64
        -L/path/to/bootstrap/glibc/lib
        -Wl,--dynamic-linker,/path/to/bootstrap/glibc/lib/ld-linux-x86-64.so.2
        -Wl,-z,origin -Wl,--enable-new-dtags

in the main Makefile, LDFLAGS and LDFLAGS_FOR_BUILD are as expected:

        -Wl,-rpath,/path/to/bootstrap/lib -Wl,-rpath,/path/to/bootstrap/lib64
        -Wl,-rpath,'$$ORIGIN/../lib' -Wl,-rpath,'$$ORIGIN/../lib64'
        -Wl,-rpath,'$$ORIGIN/../../lib' -Wl,-rpath,'$$ORIGIN/../../lib64'
        -Wl,-rpath,/path/to/bootstrap/glibc/lib64
        -Wl,-rpath,/path/to/bootstrap/glibc/lib -L/path/to/lib -L/path/to/lib64
        -L/path/to/bootstrap/glibc/lib
        -Wl,--dynamic-linker,/path/to/bootstrap/glibc/lib/ld-linux-x86-64.so.2
        -Wl,-z,origin -Wl,--enable-new-dtags

However, in binutils/Makefile, $$ORIGIN gets swallowed:

        LDFLAGS = -Wl,-rpath,/path/to/bootstrap/lib
        -Wl,-rpath,/path/to/bootstrap/lib64 -Wl,-rpath,'/../lib'
        -Wl,-rpath,'/../lib64' -Wl,-rpath,'/../../lib'
        -Wl,-rpath,'/../../lib64' -Wl,-rpath,/path/to/bootstrap/glibc/lib64
        -Wl,-rpath,/path/to/bootstrap/glibc/lib -L/path/to/lib -L/path/to/lib64
        -L/path/to/bootstrap/glibc/lib
        -Wl,--dynamic-linker,/path/to/bootstrap/glibc/lib/ld-linux-x86-64.so.2
        -Wl,-z,origin -Wl,--enable-new-dtags

Causing the build to fail, since executables don't get the right paths.
Apparently, the top Makefile needs to requote arguments before invoking
binutils/configure.  Could someone more familiar with the scripts give me a
clue where to look to make this
happen?

-- 
Yorick





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]