public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Eugene Rozenfeld <erozen@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/microsoft/heads/main)] Add a script to build and test gcc Date: Fri, 16 Apr 2021 20:36:00 +0000 (GMT) [thread overview] Message-ID: <20210416203600.DAB3B3893662@sourceware.org> (raw) https://gcc.gnu.org/g:2dac816369d1dd3e943aba0abb601c5a094bf63c commit 2dac816369d1dd3e943aba0abb601c5a094bf63c Author: Eugene Rozenfeld <erozen@microsoft.com> Date: Thu Nov 5 18:46:56 2020 -0800 Add a script to build and test gcc Diff: --- .github/scripts/build-gcc.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/scripts/build-gcc.sh b/.github/scripts/build-gcc.sh new file mode 100644 index 00000000000..ab793cd9677 --- /dev/null +++ b/.github/scripts/build-gcc.sh @@ -0,0 +1,46 @@ +sudo apt update + +# Install gcc 7 and g++ 7 +sudo apt-get install gcc-7 g++-7 g++-7-multilib libstdc++-7-doc binutils-doc build-essential cpp-doc gcc-7-doc libstdc++6-7-dbg lib32stdc++6-7-dbg libx32stdc++6-7-dbg make autoconf automake libtool flex bison gdb gcc-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc python + +# Redirect gcc and g++ to the installed versions +sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 +sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 + +# Redirect cc and c++ to the installed gcc and g++ versions: +sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 +sudo update-alternatives --set cc /usr/bin/gcc + +sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 +sudo update-alternatives --set c++ /usr/bin/g++ + +cd gcc + +sudo apt install -y texinfo +sudo apt-get install -y dejagnu +./contrib/download_prerequisites + +cd .. +mkdir objdir +cd objdir +$PWD/../gcc/configure --prefix=$HOME/GCC --enable-languages=c,c++ +exit_code=$? +if [ $exit_code != 0 ]; then + exit $exit_code +fi + +make -j 16 +exit_code=$? +if [ $exit_code != 0 ]; then + exit $exit_code +fi + + +sudo make install +exit_code=$? +if [ $exit_code != 0 ]; then + exit $exit_code +fi + +make -k check -j 16 +../gcc/contrib/testsuite-management/validate_failures.py
reply other threads:[~2021-04-16 20:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210416203600.DAB3B3893662@sourceware.org \ --to=erozen@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).