This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
configure munges $ORIGIN in LDFLAGS
- From: "Poor Yorick" <org dot sourceware dot binutils at pooryorick dot com>
- To: binutils at sourceware dot org
- Date: Fri, 15 May 2009 21:58:46 +0000
- Subject: configure munges $ORIGIN in LDFLAGS
- Reply-to: "Poor Yorick" <org dot sourceware dot binutils at pooryorick dot com>
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