#!/bin/sh -e ## 001_ld_makefile_patch.dpatch ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Description: correct where ld scripts are installed ## DP: Author: Chris Chimelis ## DP: Upstream status: N/A ## DP: Date: ?? ## DP: Fixed by Hector Oron ## DP: corrects some typos on ld scripts to be able to build ## DP: multilib'd cross compilers. if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts patch_opts="${patch_opts:--f --no-backup-if-mismatch}" case "$1" in -patch) patch $patch_opts -p1 < $0;; -unpatch) patch $patch_opts -p1 -R < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1;; esac exit 0 @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' binutils-2.20.1~/debian/patches/001_ld_makefile_patch.dpatch binutils-2.20.1/debian/patches/001_ld_makefile_patch.dpatch --- binutils-2.20.1~/debian/patches/001_ld_makefile_patch.dpatch 2010-03-27 16:15:30.000000000 +0000 +++ binutils-2.20.1/debian/patches/001_ld_makefile_patch.dpatch 2010-03-27 16:17:09.000000000 +0000 @@ -6,6 +6,9 @@ ## DP: Author: Chris Chimelis ## DP: Upstream status: N/A ## DP: Date: ?? +## DP: Fixed by Hector Oron +## DP: corrects some typos on ld scripts to be able to build +## DP: multilib'd cross compilers. if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' binutils-2.20.1~/ld/Makefile.am binutils-2.20.1/ld/Makefile.am --- binutils-2.20.1~/ld/Makefile.am 2010-02-22 08:07:01.000000000 +0000 +++ binutils-2.20.1/ld/Makefile.am 2010-03-27 16:18:36.000000000 +0000 @@ -24,7 +24,11 @@ # 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 = `if [ "@host@" = "@target@" ] ; then \ + echo '$(libdir)'; \ + else \ + echo '$(tooldir)/lib'; \ + fi` EMUL = @EMUL@ EMULATION_OFILES = @EMULATION_OFILES@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' binutils-2.20.1~/ld/Makefile.in binutils-2.20.1/ld/Makefile.in --- binutils-2.20.1~/ld/Makefile.in 2010-03-03 14:06:21.000000000 +0000 +++ binutils-2.20.1/ld/Makefile.in 2010-03-27 16:19:59.000000000 +0000 @@ -333,7 +333,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 @@ -1887,6 +1887,7 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldmain.c' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \ +@am__fastdepCC_FALSE@ -DSCRIPTDIR='"'$(scriptdir)'"' \ @am__fastdepCC_FALSE@ -DBINDIR='"$(bindir)"' -DTOOLBINDIR='"$(tooldir)/bin"' \ @am__fastdepCC_FALSE@ -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \ @am__fastdepCC_FALSE@ $(srcdir)/ldmain.c