8ccc83bc2374b99dc7226865dab39700e9d2e0e4
[akaros.git] / tools / compilers / gcc-glibc / binutils-2.24-akaros.patch
1 diff -ur binutils-2.24/bfd/config.bfd binutils-2.24-ros/bfd/config.bfd
2 --- binutils-2.24/bfd/config.bfd        2013-11-04 10:33:37.000000000 -0500
3 +++ binutils-2.24-ros/bfd/config.bfd    2015-03-13 19:04:52.880987644 -0400
4 @@ -538,6 +538,9 @@
5    i[3-7]86-*-aros*)
6      targ_defvec=bfd_elf32_i386_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=bfd_elf32_i386_vec
13      ;;
14 @@ -637,6 +640,11 @@
15      targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
16      want64=true
17      ;;
18 +  x86_64-*-akaros*)
19 +    targ_defvec=bfd_elf64_x86_64_vec
20 +    targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec"
21 +    want64=true
22 +    ;;
23    x86_64-*-dicos*)
24      targ_defvec=bfd_elf64_x86_64_vec
25      targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec"
26 diff -ur binutils-2.24/config.sub binutils-2.24-ros/config.sub
27 --- binutils-2.24/config.sub    2013-11-26 06:37:33.000000000 -0500
28 +++ binutils-2.24-ros/config.sub        2015-03-13 19:04:52.884987755 -0400
29 @@ -1356,7 +1356,7 @@
30               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
31               | -sym* | -kopensolaris* | -plan9* \
32               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
33 -             | -aos* | -aros* \
34 +             | -aos* | -aros* | -akaros* \
35               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
36               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
37               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
38 diff -ur binutils-2.24/configure binutils-2.24-ros/configure
39 --- binutils-2.24/configure     2013-11-08 05:13:48.000000000 -0500
40 +++ binutils-2.24-ros/configure 2015-03-13 19:06:34.523764718 -0400
41 @@ -2953,7 +2953,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* | *-*-akaros*)
47          case "${target}" in
48            *-*-linux*aout* | *-*-linux*oldld*)
49              ;;
50 @@ -7027,6 +7027,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 -ur binutils-2.24/gas/configure.tgt binutils-2.24-ros/gas/configure.tgt
62 --- binutils-2.24/gas/configure.tgt     2013-11-04 10:33:37.000000000 -0500
63 +++ binutils-2.24-ros/gas/configure.tgt 2015-03-13 19:04:52.888987865 -0400
64 @@ -206,6 +206,7 @@
65    i386-*-beos*)                                fmt=elf ;;
66    i386-*-coff)                         fmt=coff ;;
67    i386-*-elf)                          fmt=elf ;;
68 +  i386-*-akaros)                       fmt=elf ;;
69    i386-*-kaos*)                                fmt=elf ;;
70    i386-*-bsd*)                         fmt=aout em=386bsd ;;
71    i386-*-nacl*)                                fmt=elf em=nacl
72 diff -ur binutils-2.24/ld/configure.tgt binutils-2.24-ros/ld/configure.tgt
73 --- binutils-2.24/ld/configure.tgt      2013-11-26 06:37:33.000000000 -0500
74 +++ binutils-2.24-ros/ld/configure.tgt  2015-03-13 19:04:52.888987865 -0400
75 @@ -284,6 +284,10 @@
76                         targ_extra_libpath="elf_i386 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  i[3-7]86-*-kaos*)      targ_emul=elf_i386 ;;
84  i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
85                         targ_emul=i386bsd ;;