patches/binutils/2.20.1a/120-sh-targets.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Oct 16 20:57:44 2012 +0200 (2012-10-16)
changeset 3079 37831a33e07e
parent 2088 4f21ba5f8e91
permissions -rw-r--r--
kernel/linux: fix using custom location

Currently, extract and patch are skipped as thus:
- using a custom directory of pre-installed headers
- a correctly named directory already exists

Otherwise, extract and patch are done.

The current second condition is wrong, because it allows the following
sequence to happen:
- a non-custom kernel is used
- a previous build only partially extracted the non-custom sources
- that p[revious build broke during extraction (eg. incomplete tarball...)
- a subsequent build will find a properly named directory, and will
thus skip extract and patch, which is wrong

Fix that by following the conditions in this table:

Type | Extract | Patch
----------------------+---------+-------
Pre-installed headers | N | N
custom directory | N | N
custom tarball | Y | N
mainstream tarball | Y | Y

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: David Holsgrove <david.holsgrove@xilinx.com>
yann@2088
     1
yann@2088
     2
yann@2088
     3
diff -durN binutils-2.20.1.orig/configure binutils-2.20.1/configure
yann@2088
     4
--- binutils-2.20.1.orig/configure	2010-08-17 19:32:05.000000000 +0200
yann@2088
     5
+++ binutils-2.20.1/configure	2010-08-17 19:32:07.000000000 +0200
fr@1621
     6
@@ -3054,7 +3054,7 @@
yann@1614
     7
   am33_2.0-*-linux*)
yann@1614
     8
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
     9
     ;;
yann@1614
    10
-  sh-*-linux*)
yann@1614
    11
+  sh*-*-linux*)
yann@1614
    12
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
fr@1621
    13
     ;;
yann@1614
    14
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
fr@1621
    15
@@ -3390,7 +3390,7 @@
yann@1614
    16
   romp-*-*)
yann@1614
    17
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1614
    18
     ;;
yann@1614
    19
-  sh-*-* | sh64-*-*)
yann@1614
    20
+  sh*-*-* | sh64-*-*)
yann@1614
    21
     case "${host}" in
yann@1614
    22
       i[3456789]86-*-vsta) ;; # don't add gprof back in
yann@1614
    23
       i[3456789]86-*-go32*) ;; # don't add gprof back in
yann@2088
    24
diff -durN binutils-2.20.1.orig/configure.ac binutils-2.20.1/configure.ac
yann@2088
    25
--- binutils-2.20.1.orig/configure.ac	2010-03-03 15:19:08.000000000 +0100
yann@2088
    26
+++ binutils-2.20.1/configure.ac	2010-08-17 19:32:07.000000000 +0200
yann@2088
    27
@@ -541,7 +541,7 @@
yann@1614
    28
   am33_2.0-*-linux*)
yann@1614
    29
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
    30
     ;;
yann@1614
    31
-  sh-*-linux*)
yann@1614
    32
+  sh*-*-linux*)
yann@1614
    33
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1614
    34
     ;;    
yann@1614
    35
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
yann@2088
    36
@@ -877,7 +877,7 @@
yann@1614
    37
   romp-*-*)
yann@1614
    38
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1614
    39
     ;;
yann@1614
    40
-  sh-*-* | sh64-*-*)
yann@1614
    41
+  sh*-*-* | sh64-*-*)
yann@1614
    42
     case "${host}" in
yann@1614
    43
       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
yann@1614
    44
       i[[3456789]]86-*-go32*) ;; # don't add gprof back in