Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Solaris builder compatible with Solaris 10 retry #45343

Merged
merged 2 commits into from
Oct 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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