kconfig: use pkg-config for ncurses detection
[akaros.git] / tools / compilers / gcc-glibc / binutils-2.30-akaros.patch
1 diff -Naur binutils-2.30/bfd/config.bfd binutils-2.30-ros/bfd/config.bfd
2 --- binutils-2.30/bfd/config.bfd        2018-01-13 08:31:15.000000000 -0500
3 +++ binutils-2.30-ros/bfd/config.bfd    2018-06-11 11:45:58.741270411 -0400
4 @@ -661,6 +661,9 @@
5      targ_defvec=i386_elf32_vec
6      targ_selvecs=iamcu_elf32_vec
7      ;;
8 +  i[3-7]86-*-akaros*)
9 +    targ_defvec=bfd_elf32_i386_vec
10 +    ;;
11    i[3-7]86-*-chorus*)
12      targ_defvec=i386_elf32_vec
13      targ_selvecs=iamcu_elf32_vec
14 @@ -768,6 +771,11 @@
15      targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
16      want64=true
17      ;;
18 +  x86_64-*-akaros*)
19 +    targ_defvec=x86_64_elf64_vec
20 +    targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
21 +    want64=true
22 +    ;;
23    x86_64-*-dicos*)
24      targ_defvec=x86_64_elf64_vec
25      targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec"
26 diff -Naur binutils-2.30/config.sub binutils-2.30-ros/config.sub
27 --- binutils-2.30/config.sub    2018-01-13 08:31:15.000000000 -0500
28 +++ binutils-2.30-ros/config.sub        2018-06-11 11:29:03.770161541 -0400
29 @@ -1395,7 +1395,7 @@
30               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
31               | -sym* | -kopensolaris* | -plan9* \
32               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
33 -             | -aos* | -aros* | -cloudabi* | -sortix* \
34 +             | -aos* | -aros* | -akaros | -cloudabi* | -sortix* \
35               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
36               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
37               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
38 diff -Naur binutils-2.30/configure binutils-2.30-ros/configure
39 --- binutils-2.30/configure     2018-01-13 08:43:23.000000000 -0500
40 +++ binutils-2.30-ros/configure 2018-06-11 11:31:56.254682280 -0400
41 @@ -2960,7 +2960,7 @@
42        *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
43        | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
44        | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
45 -      | *-*-solaris2* | *-*-nto* | *-*-nacl*)
46 +      | *-*-solaris2* | *-*-nto* | *-*-nacl* | -akaors*)
47          case "${target}" in
48            *-*-linux*aout* | *-*-linux*oldld*)
49              ;;
50 @@ -7000,6 +7000,10 @@
51    *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
52    *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
53  esac
54 +# Override RPATH_ENVVAR, courtesy of Gentoo.  See this thread for more info:
55 +# http://www.cygwin.com/ml/binutils/2010-02/msg00266.html
56 +# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/binutils/2.20/08_all_binutils-RPATH_ENVVAR-smack.patch?view=markup&revision=1.1
57 +RPATH_ENVVAR="cant_touch_this_nah_nah_nah"
58  
59  # On systems where the dynamic library environment variable is PATH,
60  # gcc/ will put dynamic libraries into a subdirectory to avoid adding
61 diff -Naur binutils-2.30/gas/configure.tgt binutils-2.30-ros/gas/configure.tgt
62 --- binutils-2.30/gas/configure.tgt     2018-01-13 08:31:15.000000000 -0500
63 +++ binutils-2.30-ros/gas/configure.tgt 2018-06-11 11:32:59.838874182 -0400
64 @@ -226,6 +226,7 @@
65    i386-*-coff)                         fmt=coff ;;
66    i386-*-elfiamcu)                     fmt=elf arch=iamcu ;;
67    i386-*-elf*)                         fmt=elf ;;
68 +  i386-*-akaros*)                      fmt=elf ;;
69    i386-*-fuchsia*)                     fmt=elf ;;
70    i386-*-kaos*)                                fmt=elf ;;
71    i386-*-bsd*)                         fmt=aout em=386bsd ;;
72 diff -Naur binutils-2.30/ld/configure.tgt binutils-2.30-ros/ld/configure.tgt
73 --- binutils-2.30/ld/configure.tgt      2018-01-13 08:31:16.000000000 -0500
74 +++ binutils-2.30-ros/ld/configure.tgt  2018-06-11 11:35:02.359243863 -0400
75 @@ -340,6 +340,11 @@
76                         targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
77                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
78                         ;;
79 +i[3-7]86-*-akaros)     targ_emul=elf_i386 ;;
80 +x86_64-*-akaros*)      targ_emul=elf_x86_64
81 +                       targ_extra_emuls="elf_i386 elf_l1om"
82 +                       ;;
83 +
84  i[3-7]86-*-kaos*)      targ_emul=elf_i386 ;;
85  i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
86                         targ_emul=i386bsd ;;