Hi, for cross compilation toolchains I like to use "/usr/$target/lib" as libdir (using the --with-sysroot=/usr/$target option for ./configure). This works fine for all targets I tested so far, except for avr. On avr this fails, as avr-ld expects the ldscripts folder in /usr/lib rather than /usr/avr/lib. The patch below seems to fix the issue for me.
Kind regards, Marian --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -50,7 +50,7 @@ # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. -scriptdir = $(tooldir)/lib +scriptdir = $(libdir) EMUL = @EMUL@ EMULATION_OFILES = @EMULATION_OFILES@ --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -555,7 +555,7 @@ # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. -scriptdir = $(tooldir)/lib +scriptdir = $(libdir) BASEDIR = $(srcdir)/.. BFDDIR = $(BASEDIR)/bfd INCDIR = $(BASEDIR)/include
pgp35vyIXZH_R.pgp
Description: OpenPGP digital signature