This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch main in repository builders/tor-browser-build.
The following commit(s) were added to refs/heads/main by this push: new f1348a3 Bug 31321: Add cc -> gcc link to projects/gcc f1348a3 is described below
commit f1348a366fc3d6e8943ba85a00cd49b55383aee9 Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Fri Aug 5 14:32:43 2022 +0200
Bug 31321: Add cc -> gcc link to projects/gcc
Some projects try compile C files with cc, which is a link to /usr/bin/gcc. Instead adding a link from cc to our GCC in every project that needs it, we add it to the GCC binaries. --- projects/clang/build | 3 --- projects/gcc/build | 3 +++ projects/lucetc/build | 3 --- projects/nasm/build | 3 --- projects/node/build | 3 --- projects/wasi-sysroot/build | 3 --- 6 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/projects/clang/build b/projects/clang/build index 241a7f1..94c3313 100644 --- a/projects/clang/build +++ b/projects/clang/build @@ -5,11 +5,8 @@ mkdir -p /var/tmp/dist tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %] export PATH="/var/tmp/dist/cmake/bin:$PATH" [% IF c("var/linux") %] - # We need a link to our GCC, otherwise the system cc gets used which points - # to /usr/bin/gcc. [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'), hardened_gcc => 0 }) %] - ln -s gcc /var/tmp/dist/gcc/bin/cc [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %] [% END -%] [% IF c("var/android") %] diff --git a/projects/gcc/build b/projects/gcc/build index 1b43ee1..8a0bf62 100644 --- a/projects/gcc/build +++ b/projects/gcc/build @@ -23,6 +23,9 @@ cd /var/tmp/build/[% project %]-[% c("version") %] ./configure --prefix=$distdir [% c("var/configure_opt") %] make -j[% c("num_procs") %] make install +# tor-browser-build#31321: we need a link to our GCC, to prevent some projects +# from using system cc, which points to /usr/bin/gcc. +ln -s gcc $distdir/bin/cc cd /var/tmp/dist [% c('tar', { tar_src => [ project ], diff --git a/projects/lucetc/build b/projects/lucetc/build index cd80ac7..6b7b1c0 100644 --- a/projects/lucetc/build +++ b/projects/lucetc/build @@ -2,11 +2,8 @@ [% c("var/set_default_env") -%] # XXX: Do we need the GCC part here if we set CC to clang anyway? [% IF c("var/linux") %] - # We need a link to our GCC, otherwise the system cc gets used which points to - # /usr/bin/gcc. [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'), hardened_gcc => 0 }) %] - ln -s gcc /var/tmp/dist/gcc/bin/cc tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %] export PATH="/var/tmp/dist/binutils/bin:$PATH" [% END -%] diff --git a/projects/nasm/build b/projects/nasm/build index dc4f25e..33120c1 100644 --- a/projects/nasm/build +++ b/projects/nasm/build @@ -1,11 +1,8 @@ #!/bin/bash [% c("var/set_default_env") -%] [% IF c("var/linux") %] - # We need a link to our GCC, otherwise the system cc gets used which points to - # /usr/bin/gcc. [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'), hardened_gcc => 0 }) %] - ln -s gcc /var/tmp/dist/gcc/bin/cc tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %] export PATH="/var/tmp/dist/binutils/bin:$PATH" [% END -%] diff --git a/projects/node/build b/projects/node/build index 40b797e..4be0e30 100644 --- a/projects/node/build +++ b/projects/node/build @@ -1,11 +1,8 @@ #!/bin/bash [% c("var/set_default_env") -%] [% IF c("var/linux") %] - # We need a link to our GCC, otherwise the system cc gets used which points to - # /usr/bin/gcc. [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'), hardened_gcc => 0 }) %] - ln -s gcc /var/tmp/dist/gcc/bin/cc tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %] export PATH="/var/tmp/dist/binutils/bin:$PATH" [% END -%] diff --git a/projects/wasi-sysroot/build b/projects/wasi-sysroot/build index fbfa5ad..f82cb98 100644 --- a/projects/wasi-sysroot/build +++ b/projects/wasi-sysroot/build @@ -1,11 +1,8 @@ #!/bin/bash [% c("var/set_default_env") -%] [% IF c("var/linux") %] - # We need a link to our GCC, otherwise the system cc gets used which points to - # /usr/bin/gcc. [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'), hardened_gcc => 0 }) %] - ln -s gcc /var/tmp/dist/gcc/bin/cc tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %] export PATH="/var/tmp/dist/binutils/bin:$PATH" [% END -%]