]>
git.proxmox.com Git - rustc.git/blob - src/ci/docker/host-x86_64/dist-various-2/build-solaris-toolchain.sh
13 TARGET
=${ARCH}-${MANUFACTURER}-solaris2.10
15 # First up, build binutils
19 curl https
://ftp.gnu.org
/gnu
/binutils
/binutils-
$BINUTILS.
tar.xz |
tar xJf
-
22 hide_output ..
/binutils-
$BINUTILS/configure
--target=$TARGET
24 hide_output
make install
29 # Next, download and install the relevant solaris packages
33 dpkg
--add-architecture $APT_ARCH
35 apt-get
install -y --download-only \
39 libpthread
:$APT_ARCH \
42 libsendfile
:$APT_ARCH \
44 system-crt
:$APT_ARCH \
45 system-header
:$APT_ARCH
47 for deb
in /var
/cache
/apt
/archives
/*$APT_ARCH.deb
; do
52 # The -dev packages are not available from the apt repository we're using.
53 # However, those packages are just symlinks from *.so to *.so.<version>.
54 # This makes all those symlinks.
55 for lib
in $
(find -name '*.so.*'); do
56 target
=${lib%.so.*}.so
57 [ -e $target ] ||
ln -s ${lib##*/} $target
60 # Remove Solaris 11 functions that are optionally used by libbacktrace.
61 # This is for Solaris 10 compatibility.
64 --- usr
/include
/string.h
65 +++ usr
/include
/string10.h
67 -extern size_t strnlen
(const char
*, size_t
);
70 mkdir
/usr
/local
/$TARGET/usr
71 mv usr
/include
/usr
/local
/$TARGET/usr
/include
72 mv usr
/lib
/$LIB_ARCH/* /usr
/local
/$TARGET/lib
73 mv lib
/$LIB_ARCH/* /usr
/local
/$TARGET/lib
75 ln -s usr
/include
/usr
/local
/$TARGET/sys-include
76 ln -s usr
/include
/usr
/local
/$TARGET/include
81 # Finally, download and build gcc to target solaris
85 curl https
://ftp.gnu.org
/gnu
/gcc
/gcc-
$GCC/gcc-
$GCC.
tar.xz |
tar xJf
-
90 hide_output ..
/gcc-
$GCC/configure \
91 --enable-languages=c
,c
++ \
98 --disable-libquadmath \
101 --disable-libcilkrts \
103 --disable-libsanitizer \
104 --disable-libquadmath-support \
107 hide_output
make -j10
108 hide_output
make install