~ubuntu-branches/debian/experimental/binutils/experimental

« back to all changes in this revision

Viewing changes to debian/patches/129_ld_mulitarch_dirs.patch

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-08-21 15:31:05 UTC
  • Revision ID: package-import@ubuntu.com-20120821153105-5juxviz613aznd87
Tags: 2.22.90.20120816-2
* Some refactoring of debian/rules based on patches from Marcin:
* Introduce DEB_TARGET_* macros to unify native and cross builds.
* Build the control file as the first step for cross builds.
* Try again building without --disable-werror.
* Refactor stripping of binaries into a `strip_package' macro.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 fi
7
7
 
8
8
 LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
9
 
+if [ -n "$DEB_HOST_MULTIARCH" ]; then
 
9
+if [ -n "$DEB_TARGET_MULTIARCH" ]; then
10
10
+    temp_dirs=' '
11
11
+    for dir in `echo ${LIB_PATH} | sed -e 's/:/ /g'`; do
12
12
+       case "$dir" in
13
13
+           ${tool_lib}*|*/${target_alias}/*)
14
14
+               ;;
15
15
+           */lib)
16
 
+               if [ -n "$DEB_HOST_MULTIARCH32" ]; then
 
16
+               if [ -n "$DEB_TARGET_MULTIARCH32" ]; then
17
17
+                   case $EMULATION_NAME in
18
18
+                       elf_i386|elf32*)
19
 
+                           temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH32 ";;
 
19
+                           temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH32 ";;
20
20
+                       *)
21
 
+                           temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH "
 
21
+                           temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH "
22
22
+                   esac
23
 
+               elif [ -n "$DEB_HOST_MULTIARCH64" ]; then
 
23
+               elif [ -n "$DEB_TARGET_MULTIARCH64" ]; then
24
24
+                   case $EMULATION_NAME in
25
25
+                       elf*_64|elf64*)
26
 
+                           temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH64 ";;
 
26
+                           temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH64 ";;
27
27
+                       *)
28
 
+                           temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH "
 
28
+                           temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH "
29
29
+                   esac
30
30
+               else
31
 
+                   temp_dirs="${temp_dirs}${dir}/$DEB_HOST_MULTIARCH "
 
31
+                   temp_dirs="${temp_dirs}${dir}/$DEB_TARGET_MULTIARCH "
32
32
+               fi
33
33
+               ;;
34
34
+           */lib32)
35
 
+               if [ -n "$DEB_HOST_MULTIARCH32" ]; then
 
35
+               if [ -n "$DEB_TARGET_MULTIARCH32" ]; then
36
36
+                   dir2=$(echo $dir | sed "s,32$,,")
37
 
+                   temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH32 "
 
37
+                   temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH32 "
38
38
+               fi
39
39
+               ;;
40
40
+           */lib64)
42
42
+                   powerpc64-*-*|s390x-*-*|sparc64-*-*|x86_64-*-linux*)
43
43
+                       #dir=$(echo $dir | sed "s,64$,,")
44
44
+                       dir2=$(echo $dir | sed "s,64$,,")
45
 
+                       temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH "
 
45
+                       temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH "
46
46
+                       ;;
47
47
+                   *)
48
 
+                       if [ -n "$DEB_HOST_MULTIARCH64" ]; then
 
48
+                       if [ -n "$DEB_TARGET_MULTIARCH64" ]; then
49
49
+                           dir2=$(echo $dir | sed "s,64$,,")
50
 
+                           temp_dirs="${temp_dirs}${dir2}/$DEB_HOST_MULTIARCH64 "
 
50
+                           temp_dirs="${temp_dirs}${dir2}/$DEB_TARGET_MULTIARCH64 "
51
51
+                       fi
52
52
+                       ;;
53
53
+               esac