Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 275666
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Toolchain Maintainers <toolchain@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sven 'sleipnir' Rebhan <OdinsHorse@googlemail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
  ()

Filename Description Type Creator Created Size Actions
binutils-2.19.1-ld-sysroot.patch ld should search libs in sysroot first patch Sven 'sleipnir' Rebhan 2009-06-28 07:10 0000 1.16 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 275666 depends on: Show dependency tree
Bug 275666 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2009-06-28 07:08 0000
When cross-compiling and linking against a #4411 linker script, ld will search
the library on the host first. For an amd64 host the following test script

echo "Testing with absolute linker script (systems libz)..."
echo "int main(void) { return 0; }" > test.c
echo "GROUP ( /lib/libz.so )" > "${PWD}/libfoo-script.so"
armv4tl-softfloat-linux-gnueabi-gcc test.c -o test libfoo-script.so

will fail with

Testing with absolute linker script (systems libz)...
/lib/libz.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

because the lib (/lib/libz.so) specified in the linker script is searched on
host first. The following patch solves this problem (upstream bug
http://sourceware.org/bugzilla/show_bug.cgi?id=10340).


Reproducible: Always

------- Comment #1 From Sven 'sleipnir' Rebhan 2009-06-28 07:10:53 0000 -------
Created an attachment (id=195936) [details]
ld should search libs in sysroot first

When ld was configured with a sysroot, it should always search for libraries
with absolute filename in this sysroot first. This patch was tested on
x86_64-pc-linux-gnu without sysroot and armv4tl-softfloat-linux-gnueabi
cross-compilation with sysroot and works fine on both.

------- Comment #2 From SpanKY 2009-07-05 19:57:51 0000 -------
*** Bug 266319 has been marked as a duplicate of this bug. ***

------- Comment #3 From SpanKY 2009-07-20 09:11:49 0000 -------
patch has been added to binutils-2.19.51.0.12.  if things work out, we can also
put it into binutils-2.19.1.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug