From 95b56e85a328a89d773175828591c120265eaa4a Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 9 Aug 2015 23:33:00 +0300 Subject: [PATCH] Add binutils patch. --- doc/manual/installing.rst | 12 ++++++-- ...ils-2.25.1-or1k-R_PCREL-pcrel_offset.patch | 29 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 misc/binutils-2.25.1-or1k-R_PCREL-pcrel_offset.patch diff --git a/doc/manual/installing.rst b/doc/manual/installing.rst index 55400c3d3..995710427 100644 --- a/doc/manual/installing.rst +++ b/doc/manual/installing.rst @@ -81,6 +81,11 @@ and the ARTIQ kernels. $ mkdir ~/artiq-dev +* Clone ARTIQ repository: :: + + $ cd ~/artiq-dev + $ git clone --recursive https://github.com/m-labs/artiq + * Install OpenRISC binutils (or1k-linux-...): :: $ cd ~/artiq-dev @@ -88,8 +93,11 @@ and the ARTIQ kernels. $ tar xvf binutils-2.25.1.tar.bz2 $ rm binutils-2.25.1.tar.bz2 - $ mkdir binutils-2.25.1/build - $ cd binutils-2.25.1/build + $ cd binutils-2.25.1 + $ patch -p1 <~/artiq-dev/misc/binutils-2.25.1-or1k-R_PCREL-pcrel_offset.patch + + $ mkdir build + $ cd build $ ../configure --target=or1k-linux --prefix=/usr/local $ make -j4 $ sudo make install diff --git a/misc/binutils-2.25.1-or1k-R_PCREL-pcrel_offset.patch b/misc/binutils-2.25.1-or1k-R_PCREL-pcrel_offset.patch new file mode 100644 index 000000000..22bdc3d12 --- /dev/null +++ b/misc/binutils-2.25.1-or1k-R_PCREL-pcrel_offset.patch @@ -0,0 +1,29 @@ +--- a/bfd/elf32-or1k.c 2015-08-02 15:45:34.275922535 +0300 ++++ b/bfd/elf32-or1k.c 2015-08-02 15:45:36.635931622 +0300 +@@ -199,7 +199,7 @@ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ +- FALSE), /* pcrel_offset */ ++ TRUE), /* pcrel_offset */ + + HOWTO (R_OR1K_16_PCREL, + 0, /* rightshift */ +@@ -213,7 +213,7 @@ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xffff, /* dst_mask */ +- FALSE), /* pcrel_offset */ ++ TRUE), /* pcrel_offset */ + + HOWTO (R_OR1K_8_PCREL, + 0, /* rightshift */ +@@ -227,7 +227,7 @@ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xff, /* dst_mask */ +- FALSE), /* pcrel_offset */ ++ TRUE), /* pcrel_offset */ + + HOWTO (R_OR1K_GOTPC_HI16, /* Type. */ + 16, /* Rightshift. */ \ No newline at end of file