Unverified Commit 2b3a3553 authored by boklm's avatar boklm
Browse files

Bug 26165: make it possible to use gcc:var/setup without hardening wrapper

This allows us to use it to setup the gcc host compiler for the Windows
build in projects/firefox/build.
parent 0bfae091
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -2,16 +2,10 @@
[% c("var/setarch") -%]
[% c("var/set_default_env") -%]
[% IF c("var/windows") -%]
  mkdir -p /var/tmp/dist
  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/gcc') %]
  hgccdir=/var/tmp/dist/gcc
  [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc') }) %]
  # We need a link to our GCC, otherwise the system cc gets used which points to
  # /usr/bin/gcc.
  ln -s gcc $hgccdir/bin/cc
  # Make sure our GCC (as host compiler) get used. We do that before
  # compiler setup so that mingw is first in the PATH.
  export LD_LIBRARY_PATH=$hgccdir/lib64
  export PATH=$hgccdir/bin:$PATH
  ln -s gcc /var/tmp/dist/gcc/bin/cc
[% END -%]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
distdir=/var/tmp/dist/[% project %]
+20 −16
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ var:
    export LD_LIBRARY_PATH=/var/tmp/dist/gcc/lib64
    [% END -%]

    [% IF c("hardened_gcc") -%]
      # Config options for hardening-wrapper
      export DEB_BUILD_HARDENING=1
      export DEB_BUILD_HARDENING_STACKPROTECTOR=1
@@ -35,6 +36,7 @@ var:
      ln -sf hardened-cc c++
      ln -sf hardened-cc g++
      popd
    [% END -%]

targets:
  windows:
@@ -43,6 +45,8 @@ targets:
      arch_deps:
        - libc6-dev
        - zlib1g-dev
  linux:
    hardened_gcc: 1
  linux-i686:
    var:
      configure_opt: --enable-multilib --enable-languages=c,c++ --with-system-zlib