public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/microsoft/heads/main)] Add a script to build and test gcc
@ 2021-04-16 20:36 Eugene Rozenfeld
  0 siblings, 0 replies; only message in thread
From: Eugene Rozenfeld @ 2021-04-16 20:36 UTC (permalink / raw)
  To: gcc-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-16 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 20:36 [gcc(refs/vendors/microsoft/heads/main)] Add a script to build and test gcc Eugene Rozenfeld

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).