Update Docker to use the correct target
This commit is contained in:
parent
c3226accbe
commit
47f291ec2d
@ -39,9 +39,9 @@ ENV \
|
||||
AR_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-ar \
|
||||
CC_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-gcc \
|
||||
CXX_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-g++ \
|
||||
AR_x86_64_sun_solaris=x86_64-sun-solaris2.10-ar \
|
||||
CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
|
||||
CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++ \
|
||||
AR_x86_64_pc_solaris=x86_64-pc-solaris2.10-ar \
|
||||
CC_x86_64_pc_solaris=x86_64-pc-solaris2.10-gcc \
|
||||
CXX_x86_64_pc_solaris=x86_64-pc-solaris2.10-g++ \
|
||||
CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-8 \
|
||||
CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-8 \
|
||||
AR_x86_64_fortanix_unknown_sgx=ar \
|
||||
@ -100,7 +100,7 @@ ENV TARGETS=$TARGETS,aarch64-fuchsia
|
||||
ENV TARGETS=$TARGETS,wasm32-unknown-unknown
|
||||
ENV TARGETS=$TARGETS,wasm32-wasi
|
||||
ENV TARGETS=$TARGETS,sparcv9-sun-solaris
|
||||
ENV TARGETS=$TARGETS,x86_64-sun-solaris
|
||||
ENV TARGETS=$TARGETS,x86_64-pc-solaris
|
||||
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
|
||||
ENV TARGETS=$TARGETS,x86_64-fortanix-unknown-sgx
|
||||
ENV TARGETS=$TARGETS,nvptx64-nvidia-cuda
|
||||
|
@ -9,6 +9,19 @@ APT_ARCH=$3
|
||||
BINUTILS=2.28.1
|
||||
GCC=6.5.0
|
||||
|
||||
# Choose correct target based on the $ARCH
|
||||
case "$ARCH" in
|
||||
x86_64)
|
||||
TARGET=x86_64-pc-solaris2.10
|
||||
;;
|
||||
sparcv9)
|
||||
TARGET=sparcv9-sun-solaris2.10
|
||||
;;
|
||||
*)
|
||||
printf 'ERROR: unknown architecture: %s\n' "$ARCH"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
# First up, build binutils
|
||||
mkdir binutils
|
||||
cd binutils
|
||||
@ -16,7 +29,7 @@ cd binutils
|
||||
curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.xz | tar xJf -
|
||||
mkdir binutils-build
|
||||
cd binutils-build
|
||||
hide_output ../binutils-$BINUTILS/configure --target=$ARCH-sun-solaris2.10
|
||||
hide_output ../binutils-$BINUTILS/configure --target=$TARGET
|
||||
hide_output make -j10
|
||||
hide_output make install
|
||||
|
||||
@ -62,13 +75,13 @@ patch -p0 << 'EOF'
|
||||
-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
|
||||
mkdir /usr/local/$TARGET/usr
|
||||
mv usr/include /usr/local/$TARGET/usr/include
|
||||
mv usr/lib/$LIB_ARCH/* /usr/local/$TARGET/lib
|
||||
mv lib/$LIB_ARCH/* /usr/local/$TARGET/lib
|
||||
|
||||
ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/sys-include
|
||||
ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/include
|
||||
ln -s usr/include /usr/local/$TARGET/sys-include
|
||||
ln -s usr/include /usr/local/$TARGET/include
|
||||
|
||||
cd ..
|
||||
rm -rf solaris
|
||||
@ -84,7 +97,7 @@ mkdir ../gcc-build
|
||||
cd ../gcc-build
|
||||
hide_output ../gcc-$GCC/configure \
|
||||
--enable-languages=c,c++ \
|
||||
--target=$ARCH-sun-solaris2.10 \
|
||||
--target=$TARGET \
|
||||
--with-gnu-as \
|
||||
--with-gnu-ld \
|
||||
--disable-multilib \
|
||||
|
@ -18,7 +18,7 @@ x86_64)
|
||||
exit 1
|
||||
esac
|
||||
|
||||
BUILD_TARGET="$ARCH-sun-solaris2.10"
|
||||
BUILD_TARGET="$ARCH-pc-solaris2.10"
|
||||
|
||||
#
|
||||
# The illumos and the Solaris build both use the same GCC-level host triple,
|
||||
|
Loading…
Reference in New Issue
Block a user