@@ -38,37 +38,38 @@ cd solaris
38
38
39
39
dpkg --add-architecture $APT_ARCH
40
40
apt-get update
41
- apt-get download \
42
- libc:$APT_ARCH \
41
+ apt-get download $( apt-cache depends --recurse --no-replaces \
43
42
libc-dev:$APT_ARCH \
44
- libm:$APT_ARCH \
45
43
libm-dev:$APT_ARCH \
46
- libpthread:$APT_ARCH \
47
44
libpthread-dev:$APT_ARCH \
48
- libresolv:$APT_ARCH \
49
45
libresolv-dev:$APT_ARCH \
50
- librt:$APT_ARCH \
51
46
librt-dev:$APT_ARCH \
52
- libsocket:$APT_ARCH \
53
47
libsocket-dev:$APT_ARCH \
54
48
system-crt:$APT_ARCH \
55
- system-header:$APT_ARCH
49
+ system-header:$APT_ARCH \
50
+ | grep " ^\w" )
56
51
57
52
for deb in * $APT_ARCH .deb; do
58
53
dpkg -x $deb .
59
54
done
60
55
61
- # Strip Solaris 11 functions that are optionally used by libbacktrace.
56
+ # Remove Solaris 11 functions that are optionally used by libbacktrace.
62
57
# This is for Solaris 10 compatibility.
63
- $ARCH -sun-solaris2.10-strip -N dl_iterate_phdr -N strnlen lib/$LIB_ARCH /libc.so
58
+ rm usr/include/link.h
59
+ patch -p0 << 'EOF '
60
+ --- usr/include/string.h
61
+ +++ usr/include/string10.h
62
+ @@ -93 +92,0 @@
63
+ -extern size_t strnlen(const char *, size_t);
64
+ EOF
64
65
65
66
mkdir /usr/local/$ARCH -sun-solaris2.10/usr
66
67
mv usr/include /usr/local/$ARCH -sun-solaris2.10/usr/include
67
68
mv usr/lib/$LIB_ARCH /* /usr/local/$ARCH -sun-solaris2.10/lib
68
69
mv lib/$LIB_ARCH /* /usr/local/$ARCH -sun-solaris2.10/lib
69
70
70
- ln -s /usr/local/ $ARCH -sun-solaris2.10/ usr/include /usr/local/$ARCH -sun-solaris2.10/sys-include
71
- ln -s /usr/local/ $ARCH -sun-solaris2.10/ usr/include /usr/local/$ARCH -sun-solaris2.10/include
71
+ ln -s usr/include /usr/local/$ARCH -sun-solaris2.10/sys-include
72
+ ln -s usr/include /usr/local/$ARCH -sun-solaris2.10/include
72
73
73
74
cd ..
74
75
rm -rf solaris
@@ -97,8 +98,7 @@ hide_output ../gcc-$GCC/configure \
97
98
--disable-libada \
98
99
--disable-libsanitizer \
99
100
--disable-libquadmath-support \
100
- --disable-lto \
101
- --with-sysroot=/usr/local/$ARCH -sun-solaris2.10
101
+ --disable-lto
102
102
103
103
hide_output make -j10
104
104
hide_output make install
0 commit comments