X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=debian%2Fpatches%2F127_x86_64_i386_biarch.dpatch;fp=debian%2Fpatches%2F127_x86_64_i386_biarch.dpatch;h=f08223a909f1723690b1331e6d71e467e18f3933;hp=0000000000000000000000000000000000000000;hb=47f73751c91775676bb03af53e83c7f49dfda44f;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/debian/patches/127_x86_64_i386_biarch.dpatch b/debian/patches/127_x86_64_i386_biarch.dpatch new file mode 100755 index 0000000..f08223a --- /dev/null +++ b/debian/patches/127_x86_64_i386_biarch.dpatch @@ -0,0 +1,42 @@ +#!/bin/sh -e +## 127_x86_64_i386_biarch.dpatch +## +## DP: Description: Add (/usr)/lib32 to the search paths on x86_64. +## DP: Author: Aurelien Jarno +## DP: Upstream status: Debian specific + +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@ +--- binutils/ld/emulparams/elf_i386.sh ++++ binutils/ld/emulparams/elf_i386.sh +@@ -12,3 +12,13 @@ + GENERATE_PIE_SCRIPT=yes + NO_SMALL_DATA=yes + SEPARATE_GOTPLT=12 ++ ++# Linux modify the default library search path to first include ++# a 32-bit specific directory. ++case "$target" in ++ x86_64*-linux* | i[3-7]86*-linux*) ++ case "$EMULATION_NAME" in ++ *i386*) LIBPATH_SUFFIX=32 ;; ++ esac ++ ;; ++esac