Skip to content

Commit

Permalink
Auto merge of #45443 - bgermann:beta, r=kennytm
Browse files Browse the repository at this point in the history
[beta] Make Solaris builder compatible with Solaris 10 retry

Backport of #45343.
  • Loading branch information
bors committed Oct 23, 2017
2 parents a0a837c + 4c928f9 commit c4008d6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/ci/docker/cross2/build-solaris-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,38 @@ cd solaris

dpkg --add-architecture $APT_ARCH
apt-get update
apt-get download \
libc:$APT_ARCH \
apt-get download $(apt-cache depends --recurse --no-replaces \
libc-dev:$APT_ARCH \
libm:$APT_ARCH \
libm-dev:$APT_ARCH \
libpthread:$APT_ARCH \
libpthread-dev:$APT_ARCH \
libresolv:$APT_ARCH \
libresolv-dev:$APT_ARCH \
librt:$APT_ARCH \
librt-dev:$APT_ARCH \
libsocket:$APT_ARCH \
libsocket-dev:$APT_ARCH \
system-crt:$APT_ARCH \
system-header:$APT_ARCH
system-header:$APT_ARCH \
| grep "^\w")

for deb in *$APT_ARCH.deb; do
dpkg -x $deb .
done

# Strip Solaris 11 functions that are optionally used by libbacktrace.
# Remove Solaris 11 functions that are optionally used by libbacktrace.
# This is for Solaris 10 compatibility.
$ARCH-sun-solaris2.10-strip -N dl_iterate_phdr -N strnlen lib/$LIB_ARCH/libc.so
rm usr/include/link.h
patch -p0 << 'EOF'
--- usr/include/string.h
+++ usr/include/string10.h
@@ -93 +92,0 @@
-extern size_t strnlen(const char *, size_t);
EOF

mkdir /usr/local/$ARCH-sun-solaris2.10/usr
mv usr/include /usr/local/$ARCH-sun-solaris2.10/usr/include
mv usr/lib/$LIB_ARCH/* /usr/local/$ARCH-sun-solaris2.10/lib
mv lib/$LIB_ARCH/* /usr/local/$ARCH-sun-solaris2.10/lib

ln -s /usr/local/$ARCH-sun-solaris2.10/usr/include /usr/local/$ARCH-sun-solaris2.10/sys-include
ln -s /usr/local/$ARCH-sun-solaris2.10/usr/include /usr/local/$ARCH-sun-solaris2.10/include
ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/sys-include
ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/include

cd ..
rm -rf solaris
Expand Down Expand Up @@ -97,8 +98,7 @@ hide_output ../gcc-$GCC/configure \
--disable-libada \
--disable-libsanitizer \
--disable-libquadmath-support \
--disable-lto \
--with-sysroot=/usr/local/$ARCH-sun-solaris2.10
--disable-lto

hide_output make -j10
hide_output make install
Expand Down

0 comments on commit c4008d6

Please sign in to comment.