-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a1db7a0
Showing
2 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
pushd gcc | ||
|
||
echo "Resetting gcc repo" | ||
git reset --hard releases/gcc-12.1.0 | ||
git apply ../gcc-patch.diff | ||
|
||
echo "Current GCC version is $(cat gcc/BASE-VER)" | ||
|
||
source contrib/download_prerequisites | ||
|
||
popd | ||
|
||
echo "Installing dev libs" | ||
apt-get install -y libmpfr-dev libmpc-dev texinfo flex linux-libc-dev | ||
|
||
# This is needed to build GCC in scout | ||
#if [ ! -L "/usr/include/asm" ]; then ln -s /usr/include/asm-generic /usr/include/asm; fi | ||
|
||
if [ -d "out" ]; then rm -r out; fi | ||
mkdir out | ||
|
||
if cmp -s "gcc/gcc/BASE-VER" "GCC-CUR-VER"; | ||
then | ||
i=$(cat GCC-BUILD-COUNTER) | ||
else | ||
i=0 | ||
cp gcc/gcc/BASE-VER GCC-CUR-VER | ||
fi | ||
|
||
pushd out | ||
|
||
CXX=g++-9 CC=gcc-9 ../gcc/configure -v --with-pkgversion="SteamRT $(cat ../gcc/gcc/BASE-VER)-$i+steamrt2.2+bsrt2.1" --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,c++ --prefix=/usr/lib/gcc-12 --with-gcc-major-version-only --program-prefix= --program-suffix=-12 --enable-shared --enable-linker-build-id --disable-shared --with-pic=yes --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex | ||
|
||
#make -j8 | ||
make -j16 | ||
make install-strip | ||
|
||
popd | ||
|
||
for FILE in /usr/lib/gcc-12/bin/*; do | ||
if [ -L /usr/bin/$(basename "$FILE") ]; then | ||
echo "Removing old symbolic link /usr/bin/$(basename $FILE)"; | ||
rm /usr/bin/$(basename "$FILE") | ||
fi | ||
|
||
ln -s $FILE /usr/bin/$(basename "$FILE") | ||
done | ||
|
||
tar -cf gcc12.tar /usr/lib/gcc-12/ /usr/bin/{c++-12,cpp-12,g++-12,gcc-12,gcc-ar-12,gcc-nm-12,gcc-ranlib-12,gcov-12,gcov-dump-12,gcov-tool-12,lto-dump-12,x86_64-linux-gnu-c++-12,x86_64-linux-gnu-g++-12,x86_64-linux-gnu-gcc-12,x86_64-linux-gnu-gcc-ar-12,x86_64-linux-gnu-gcc-nm-12,x86_64-linux-gnu-gcc-ranlib-12} | ||
gzip -f gcc12.tar | ||
|
||
((i=i+1)) | ||
echo $i > GCC-BUILD-COUNTER | ||
|
||
echo "Build done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h | ||
index 8902ae1d2..8fa893630 100644 | ||
--- a/gcc/cp/lang-specs.h | ||
+++ b/gcc/cp/lang-specs.h | ||
@@ -31,6 +31,8 @@ along with GCC; see the file COPYING3. If not see | ||
{".c++", "@c++", 0, 0, 0}, | ||
{".C", "@c++", 0, 0, 0}, | ||
{".CPP", "@c++", 0, 0, 0}, | ||
+ {".ixx", "@c++", 0, 0, 0}, | ||
+ {".cppm", "@c++", 0, 0, 0}, | ||
{".H", "@c++-header", 0, 0, 0}, | ||
{".hpp", "@c++-header", 0, 0, 0}, | ||
{".hp", "@c++-header", 0, 0, 0}, | ||
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure | ||
index 16baffffc..e82b8eab8 100755 | ||
--- a/libstdc++-v3/configure | ||
+++ b/libstdc++-v3/configure | ||
@@ -15587,6 +15587,11 @@ if test "$enable_shared" = yes; then | ||
glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX" | ||
glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED" | ||
|
||
+elif test "${with_pic+set}" = set; then | ||
+ glibcxx_lt_pic_flag="-prefer-pic" | ||
+ glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX" | ||
+ glibcxx_compiler_shared_flag= | ||
+ | ||
else | ||
glibcxx_lt_pic_flag= | ||
glibcxx_compiler_pic_flag= | ||
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac | ||
index 3e639279d..b5194dcb7 100644 | ||
--- a/libstdc++-v3/configure.ac | ||
+++ b/libstdc++-v3/configure.ac | ||
@@ -121,6 +121,11 @@ if test "$enable_shared" = yes; then | ||
glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX" | ||
glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED" | ||
|
||
+elif test "${with_pic+set}" != set; then | ||
+ glibcxx_lt_pic_flag="-prefer-pic" | ||
+ glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX" | ||
+ glibcxx_compiler_shared_flag= | ||
+ | ||
else | ||
glibcxx_lt_pic_flag= | ||
glibcxx_compiler_pic_flag= |