summaryrefslogtreecommitdiff
path: root/patches/README
blob: 0ed3a9f3b20c744b8cfa9576c28512876d546669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/sh

# If you don't use rpm, you can use this file to apply additional Linux
# patches. At the top level of the binutils source tree, do
#
# /bin/sh patches/README
#
# You may have to do
#
# cd bfd
# make headers
#
# if the build fails.

dir=`dirname $0`
clean=$1

patches="
	binutils-lto-mixed.patch
	binutils-lto-mixed-test.patch
	binutils-lto-mixed-plugin.patch
	binutils-pr12639.patch
	binutils-secondary.patch
	binutils-pr21128.patch
	binutils-pr21129.patch
	binutils-x86-gpoff.patch
0001-ld-Add-z-textonly-option-to-ELF-linker.patch
0002-ld-Add-TEXT_SEGMENT_ALIGN-TEXT_SEGMENT_-RELRO_-END.patch
0003-ld-Create-a-new-LOAD-segment-for-text-only-LOAD-segm.patch
0004-ld-ppc-spu-Also-set-expld.textseg.phase-to-exp_seg_n.patch
0005-ld-Add-tests-for-z-textonly-and-z-notextonly.patch
0006-x86-64-Add-tests-for-z-textonly-z-max-page-size-0x10.patch
"

for p in $patches
do
  if [ ! -n "$clean" ]
  then
    suffix=$(echo $p | sed -e "s/.*-\([^-]\+\).patch/\1/")
    backup="-b --suffix .$suffix"
  fi
  patch --follow-symlinks -E -p1 $backup < $dir/$p || exit 1
done
find -name "*.orig" | xargs rm -fv
find -name "*.gmo" | xargs rm -fv