Bug 10047 - [Regression] ld-new -m XXX no longer works
Summary: [Regression] ld-new -m XXX no longer works
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.20
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-08 19:16 UTC by H.J. Lu
Modified: 2009-04-11 14:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2009-04-08 19:16:14 UTC
When binutils is configured with -enable-targets=all, "./ld-new -m elf64_sparc"
used to work without installation. Now on Linux/x86-64, I got

[hjl@gnu-6 ld]$ file x.o
x.o: ELF 64-bit MSB relocatable, SPARC V9, relaxed memory ordering, version 1
(SYSV), not stripped
[hjl@gnu-6 ld]$ ./ld-new  -m elf64_sparc x.o
./ld-new: cannot open linker script file ldscripts/elf64_sparc.xc: No such file
or directory
[hjl@gnu-6 ld]$ 

I think it is caused by

http://sourceware.org/ml/binutils/2009-04/msg00112.html
Comment 1 cvs-commit@gcc.gnu.org 2009-04-11 14:07:11 UTC
Subject: Bug 10047

CVSROOT:	/cvs/src
Module name:	src
Changes by:	hjl@sourceware.org	2009-04-11 14:06:56

Modified files:
	ld             : ChangeLog ldfile.c 

Log message:
	2009-04-11  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR ld/10047
	* ldfile.c (ldfile_find_command_file): First try raw name.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/ChangeLog.diff?cvsroot=src&r1=1.1965&r2=1.1966
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/ldfile.c.diff?cvsroot=src&r1=1.49&r2=1.50

Comment 2 H.J. Lu 2009-04-11 14:08:17 UTC
Fixed.
Comment 3 cvs-commit@gcc.gnu.org 2009-04-14 03:17:35 UTC
Subject: Bug 10047

CVSROOT:	/cvs/src
Module name:	src
Changes by:	amodra@sourceware.org	2009-04-14 03:17:21

Modified files:
	ld             : ChangeLog ldfile.c 

Log message:
	PR ld/10047
	* ldfile.c (find_scripts_dir): Use make_relative_prefix to find
	ldscripts in build tree.  Don't repeat search for ../lib/ldscripts.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/ChangeLog.diff?cvsroot=src&r1=1.1967&r2=1.1968
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/ldfile.c.diff?cvsroot=src&r1=1.51&r2=1.52