GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

build 919 Bytes
Newer Older
1 2
#!/bin/bash
[% c("var/set_default_env") -%]
3
distdir=/var/tmp/dist/binutils
4 5 6 7 8 9 10 11
[% IF c("var/linux") %]
  # Config options for hardening-wrapper
  export DEB_BUILD_HARDENING=1
  export DEB_BUILD_HARDENING_STACKPROTECTOR=1
  export DEB_BUILD_HARDENING_FORTIFY=1
  export DEB_BUILD_HARDENING_FORMAT=1
  export DEB_BUILD_HARDENING_PIE=1
[% END %]
boklm's avatar
boklm committed
12
tar xf [% project %]-[% c("version") %].tar.xz
13 14
cd [% project %]-[% c("version") %]
./configure --prefix=$distdir [% c('var/configure_opt') %]
15
make -j[% c("buildconf/num_procs") %]
16
make install
17 18

[% IF c("var/linux") %]
boklm's avatar
boklm committed
19 20 21 22 23 24 25
  # Make sure gold is used with the hardening wrapper for full RELRO, see #13031.
  cd $distdir/bin
  rm ld
  cp /usr/bin/hardened-ld ./
  mv ld.gold ld.gold.real
  ln -sf hardened-ld ld.gold
  ln -sf ld.gold ld
26 27
[% END %]

28 29 30 31 32
cd /var/tmp/dist
[% c('tar', {
        tar_src => [ project ],
        tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
        }) %]