Fixes page-faulting glibc on certain machines (XCC)
[akaros.git] / tools / compilers / gcc-glibc / binutils-2.21.1-ros.patch
1 diff -ruN binutils-2.21.1/bfd/config.bfd binutils-2.21.1-ros/bfd/config.bfd
2 --- binutils-2.21.1/bfd/config.bfd      2011-04-01 05:02:42.000000000 -0700
3 +++ binutils-2.21.1-ros/bfd/config.bfd  2013-06-07 15:54:19.380916665 -0700
4 @@ -519,6 +519,9 @@
5    i[3-7]86-*-aros*)
6      targ_defvec=bfd_elf32_i386_vec
7      ;;
8 +  i[3-7]86-*-ros*)
9 +    targ_defvec=bfd_elf32_i386_vec
10 +    ;;
11    i[3-7]86-*-chorus*)
12      targ_defvec=bfd_elf32_i386_vec
13      ;;
14 @@ -611,6 +614,11 @@
15      targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
16      want64=true
17      ;;
18 +  x86_64-*-ros*)
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"
26 diff -ruN binutils-2.21.1/config.sub binutils-2.21.1-ros/config.sub
27 --- binutils-2.21.1/config.sub  2010-06-01 10:53:40.000000000 -0700
28 +++ binutils-2.21.1-ros/config.sub      2013-06-07 15:48:57.128626160 -0700
29 @@ -1297,7 +1297,7 @@
30               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
31               | -sym* | -kopensolaris* \
32               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
33 -             | -aos* | -aros* \
34 +             | -aos* | -aros* | -ros* \
35               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
36               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
37               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
38 diff -ruN binutils-2.21.1/configure binutils-2.21.1-ros/configure
39 --- binutils-2.21.1/configure   2011-06-27 00:39:00.000000000 -0700
40 +++ binutils-2.21.1-ros/configure       2013-06-07 15:48:57.148626299 -0700
41 @@ -6701,6 +6701,10 @@
42    *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
43    *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
44  esac
45 +# Override RPATH_ENVVAR, courtesy of Gentoo.  See this thread for more info:
46 +# http://www.cygwin.com/ml/binutils/2010-02/msg00266.html
47 +# 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
48 +RPATH_ENVVAR="cant_touch_this_nah_nah_nah"
49  
50  # On systems where the dynamic library environment variable is PATH,
51  # gcc/ will put dynamic libraries into a subdirectory to avoid adding
52 diff -ruN binutils-2.21.1/gas/configure.tgt binutils-2.21.1-ros/gas/configure.tgt
53 --- binutils-2.21.1/gas/configure.tgt   2011-04-01 05:02:42.000000000 -0700
54 +++ binutils-2.21.1-ros/gas/configure.tgt       2013-06-07 16:00:33.913598069 -0700
55 @@ -180,6 +180,7 @@
56    i386-*-beos*)                                fmt=elf ;;
57    i386-*-coff)                         fmt=coff ;;
58    i386-*-elf)                          fmt=elf ;;
59 +  i386-*-ros)                          fmt=elf ;;
60    i386-*-kaos*)                                fmt=elf ;;
61    i386-*-bsd*)                         fmt=aout em=386bsd ;;
62    i386-*-netbsd0.8)                    fmt=aout em=386bsd ;;
63 diff -ruN binutils-2.21.1/ld/configure.tgt binutils-2.21.1-ros/ld/configure.tgt
64 --- binutils-2.21.1/ld/configure.tgt    2011-04-01 05:03:54.000000000 -0700
65 +++ binutils-2.21.1-ros/ld/configure.tgt        2013-06-07 16:02:52.954598409 -0700
66 @@ -245,6 +245,10 @@
67  x86_64-*-elf*)         targ_emul=elf_x86_64
68                         targ_extra_emuls="elf_i386 elf_l1om"
69                         ;;
70 +i[3-7]86-*-ros)        targ_emul=elf_i386 ;;
71 +x86_64-*-ros*)         targ_emul=elf_x86_64
72 +                       targ_extra_emuls="elf_i386 elf_l1om"
73 +                       ;;
74  i[3-7]86-*-kaos*)      targ_emul=elf_i386 ;;
75  i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
76                         targ_emul=i386bsd ;;