mirror of
				https://github.com/bensuperpc/dockcross.git
				synced 2025-11-04 09:56:23 +01:00 
			
		
		
		
	Compare commits
	
		
			8 Commits
		
	
	
		
			update_cro
			...
			add_shellc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8a765dd273 | |||
| 317b741420 | |||
| 4d2bf9be44 | |||
| 347749e2ba | |||
| fd27bd07cf | |||
| 8769b048bf | |||
| e5fee6a82f | |||
| 97482d0814 | 
							
								
								
									
										2
									
								
								.github/workflows/expired.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/expired.yml
									
									
									
									
										vendored
									
									
								
							@@ -6,7 +6,7 @@ jobs:
 | 
			
		||||
  stale:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/stale@v4
 | 
			
		||||
      - uses: actions/stale@v3
 | 
			
		||||
        with:
 | 
			
		||||
          repo-token: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
          exempt-issue-milestones: 'future,alpha,beta,release'
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							@@ -18,7 +18,17 @@ jobs:
 | 
			
		||||
    name: base
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - name: "Checkout Code"
 | 
			
		||||
        uses: actions/checkout@v2.3.4
 | 
			
		||||
        with:
 | 
			
		||||
          submodules: 'recursive'
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
      - name: Run ShellCheck
 | 
			
		||||
        uses: ludeeus/action-shellcheck@master
 | 
			
		||||
        with:
 | 
			
		||||
          severity: error
 | 
			
		||||
        env:
 | 
			
		||||
          SHELLCHECK_OPTS: -s bash
 | 
			
		||||
      - name: build
 | 
			
		||||
        run: make base
 | 
			
		||||
      - name: test
 | 
			
		||||
@@ -42,7 +52,7 @@ jobs:
 | 
			
		||||
  image:
 | 
			
		||||
    name: ${{ matrix.arch_name }}
 | 
			
		||||
    needs: base
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    runs-on: ubuntu-20.04
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										28
									
								
								.github/workflows/shellcheck.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/shellcheck.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,28 +0,0 @@
 | 
			
		||||
name: Shellcheck CI
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
    - '*'
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**/README.md'
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches:
 | 
			
		||||
    - '*'
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**/README.md'
 | 
			
		||||
  workflow_dispatch:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  shellcheck:
 | 
			
		||||
    name: Shellcheck
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v2
 | 
			
		||||
    - name: Run ShellCheck
 | 
			
		||||
      uses: ludeeus/action-shellcheck@master
 | 
			
		||||
      with:
 | 
			
		||||
        severity: error
 | 
			
		||||
        format: gcc
 | 
			
		||||
      env:
 | 
			
		||||
        SHELLCHECK_OPTS: -s bash
 | 
			
		||||
							
								
								
									
										11
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Makefile
									
									
									
									
									
								
							@@ -50,12 +50,6 @@ endif
 | 
			
		||||
# Tag images with date and Git short hash in addition to revision
 | 
			
		||||
TAG := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD)
 | 
			
		||||
 | 
			
		||||
# shellcheck executable
 | 
			
		||||
SHELLCHECK := shellcheck
 | 
			
		||||
 | 
			
		||||
# Defines the level of verification (error, warning, info...)
 | 
			
		||||
SHELLCHECK_SEVERITY_LEVEL := error
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# images: This target builds all IMAGES (because it is the first one, it is built by default)
 | 
			
		||||
#
 | 
			
		||||
@@ -281,11 +275,6 @@ purge: clean
 | 
			
		||||
# Remove all images with organization (ex dockcross/*)
 | 
			
		||||
	$(DOCKER) images --filter=reference='$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f
 | 
			
		||||
 | 
			
		||||
# Check bash syntax
 | 
			
		||||
bash-check:
 | 
			
		||||
	find . -type f \( -name "*.sh" -o -name "*.bash" \) -print0 | xargs -0 -P"$(shell nproc)" -I{} \
 | 
			
		||||
		$(SHELLCHECK) --check-sourced --color=auto --format=gcc --severity=error --shell=bash --enable=all "{}"
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# testing implicit rule
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
@@ -13,4 +13,4 @@ RUN \
 | 
			
		||||
  rm -rf /buildscripts
 | 
			
		||||
 | 
			
		||||
# Runtime scripts
 | 
			
		||||
COPY imagefiles/entrypoint.sh imagefiles/dockcross.sh /dockcross/
 | 
			
		||||
COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/
 | 
			
		||||
 
 | 
			
		||||
@@ -15,8 +15,8 @@
 | 
			
		||||
#  ARG MXE_TARGET_LINK=shared
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# mxe master 2021-08-04
 | 
			
		||||
ARG MXE_GIT_TAG=91e21fc4bc0775790b0a7cc3f7da4aef89637a0f
 | 
			
		||||
# mxe master 2021-07-07
 | 
			
		||||
ARG MXE_GIT_TAG=29aac96601e6428900b1e9b2befb4cc567aff298
 | 
			
		||||
 | 
			
		||||
ENV CMAKE_TOOLCHAIN_FILE /usr/src/mxe/usr/${MXE_TARGET_ARCH}-w64-mingw32.${MXE_TARGET_LINK}${MXE_TARGET_THREAD}/share/cmake/mxe-conf.cmake
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -29,31 +29,31 @@ fi
 | 
			
		||||
 | 
			
		||||
cd /usr/src
 | 
			
		||||
 | 
			
		||||
git clone https://gitlab.kitware.com/cmake/cmake.git CMake -b v$CMAKE_VERSION --depth 1
 | 
			
		||||
git clone https://gitlab.kitware.com/cmake/cmake.git CMake -b "v$CMAKE_VERSION" --depth 1
 | 
			
		||||
 | 
			
		||||
mkdir /usr/src/CMake-build
 | 
			
		||||
cd /usr/src/CMake-build
 | 
			
		||||
 | 
			
		||||
${WRAPPER} /usr/src/CMake/bootstrap \
 | 
			
		||||
  --parallel=$(nproc) \
 | 
			
		||||
"${WRAPPER}" /usr/src/CMake/bootstrap \
 | 
			
		||||
  --parallel="$(nproc)" \
 | 
			
		||||
  -- -DCMAKE_USE_OPENSSL=OFF
 | 
			
		||||
${WRAPPER} make -j$(nproc)
 | 
			
		||||
"${WRAPPER}" make -j"$(nproc)"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
mkdir /usr/src/CMake-ssl-build
 | 
			
		||||
cd /usr/src/CMake-ssl-build
 | 
			
		||||
 | 
			
		||||
${WRAPPER} /usr/src/CMake-build/bin/cmake \
 | 
			
		||||
"${WRAPPER}" /usr/src/CMake-build/bin/cmake \
 | 
			
		||||
  -DCMAKE_BUILD_TYPE:STRING=Release \
 | 
			
		||||
  -DBUILD_TESTING:BOOL=OFF \
 | 
			
		||||
  -DCMAKE_INSTALL_PREFIX:PATH=/usr/src/cmake-$CMAKE_VERSION \
 | 
			
		||||
  -DCMAKE_INSTALL_PREFIX:PATH="/usr/src/cmake-$CMAKE_VERSION" \
 | 
			
		||||
  -DCMAKE_USE_OPENSSL:BOOL=ON \
 | 
			
		||||
  -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl \
 | 
			
		||||
  ../CMake
 | 
			
		||||
${WRAPPER} make -j$(nproc) install
 | 
			
		||||
"${WRAPPER}" make -j"$(nproc)" install
 | 
			
		||||
 | 
			
		||||
# Cleanup install tree
 | 
			
		||||
cd /usr/src/cmake-$CMAKE_VERSION
 | 
			
		||||
cd "/usr/src/cmake-$CMAKE_VERSION"
 | 
			
		||||
rm -rf doc man
 | 
			
		||||
 | 
			
		||||
# Install files
 | 
			
		||||
@@ -69,7 +69,7 @@ file(
 | 
			
		||||
list(GET status 0 error_code)
 | 
			
		||||
list(GET status 1 error_msg)
 | 
			
		||||
if(error_code)
 | 
			
		||||
  message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
 | 
			
		||||
  message(FATAL_ERROR "error: Failed to download \${url} - \${error_msg}")
 | 
			
		||||
else()
 | 
			
		||||
  message(STATUS "CMake: HTTPS download works")
 | 
			
		||||
endif()
 | 
			
		||||
 
 | 
			
		||||
@@ -18,20 +18,20 @@ function do_curl_build {
 | 
			
		||||
    # We do this shared to avoid obnoxious linker issues where git couldn't
 | 
			
		||||
    # link properly. If anyone wants to make this build statically go for it.
 | 
			
		||||
    LIBS=-ldl CFLAGS=-Wl,--exclude-libs,ALL ./configure --with-ssl --disable-static > /dev/null
 | 
			
		||||
    make -j$(nproc) > /dev/null
 | 
			
		||||
    make -j"$(nproc)" > /dev/null
 | 
			
		||||
    make install > /dev/null
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function build_curl {
 | 
			
		||||
    local curl_fname=$1
 | 
			
		||||
    check_var ${curl_fname}
 | 
			
		||||
    check_var "${curl_fname}"
 | 
			
		||||
    local curl_sha256=$2
 | 
			
		||||
    check_var ${curl_sha256}
 | 
			
		||||
    check_var ${CURL_DOWNLOAD_URL}
 | 
			
		||||
    curl -fsSLO ${CURL_DOWNLOAD_URL}/${curl_fname}.tar.gz
 | 
			
		||||
    check_sha256sum ${curl_fname}.tar.gz ${curl_sha256}
 | 
			
		||||
    tar -zxf ${curl_fname}.tar.gz
 | 
			
		||||
    check_var "${curl_sha256}"
 | 
			
		||||
    check_var "${CURL_DOWNLOAD_URL}"
 | 
			
		||||
    curl -fsSLO "${CURL_DOWNLOAD_URL}/${curl_fname}.tar.gz"
 | 
			
		||||
    check_sha256sum "${curl_fname}.tar.gz ${curl_sha256}"
 | 
			
		||||
    tar -zxf "${curl_fname}.tar.gz"
 | 
			
		||||
    (cd curl-*/ && do_curl_build)
 | 
			
		||||
    rm -rf curl-*
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -27,18 +27,18 @@ url="https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar
 | 
			
		||||
echo "Downloading $url"
 | 
			
		||||
curl -# -LO $url
 | 
			
		||||
 | 
			
		||||
tar xvzf git-${GIT_VERSION}.tar.gz  --no-same-owner
 | 
			
		||||
rm -f git-${GIT_VERSION}.tar.gz
 | 
			
		||||
tar xvzf "git-${GIT_VERSION}.tar.gz" --no-same-owner
 | 
			
		||||
rm -f "git-${GIT_VERSION}.tar.gz"
 | 
			
		||||
 | 
			
		||||
pushd git-${GIT_VERSION}
 | 
			
		||||
pushd "git-${GIT_VERSION}"
 | 
			
		||||
./configure --prefix=/usr/local --with-curl
 | 
			
		||||
make -j$(nproc)
 | 
			
		||||
make -j"$(nproc)"
 | 
			
		||||
make install
 | 
			
		||||
popd
 | 
			
		||||
 | 
			
		||||
ldconfig
 | 
			
		||||
 | 
			
		||||
rm -rf git-${GIT_VERSION}
 | 
			
		||||
rm -rf "git-${GIT_VERSION}"
 | 
			
		||||
 | 
			
		||||
# turn the detached message off
 | 
			
		||||
git config --global advice.detachedHead false
 | 
			
		||||
 
 | 
			
		||||
@@ -58,48 +58,48 @@ PERL_HASH=03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c
 | 
			
		||||
PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0
 | 
			
		||||
 | 
			
		||||
function do_perl_build {
 | 
			
		||||
    ${WRAPPER} sh Configure -des -Dprefix=/opt/perl > /dev/null
 | 
			
		||||
    ${WRAPPER} make -j$(nproc) > /dev/null
 | 
			
		||||
    ${WRAPPER} make install > /dev/null
 | 
			
		||||
    "${WRAPPER}" sh Configure -des -Dprefix=/opt/perl > /dev/null
 | 
			
		||||
    "${WRAPPER}" make -j"$(nproc)" > /dev/null
 | 
			
		||||
    "${WRAPPER}" make install > /dev/null
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function build_perl {
 | 
			
		||||
    local perl_fname=$1
 | 
			
		||||
    check_var ${perl_fname}
 | 
			
		||||
    check_var "${perl_fname}"
 | 
			
		||||
    local perl_sha256=$2
 | 
			
		||||
    check_var ${perl_sha256}
 | 
			
		||||
    check_var ${PERL_DOWNLOAD_URL}
 | 
			
		||||
    curl -fsSLO ${PERL_DOWNLOAD_URL}/${perl_fname}.tar.gz
 | 
			
		||||
    check_sha256sum ${perl_fname}.tar.gz ${perl_sha256}
 | 
			
		||||
    tar -xzf ${perl_fname}.tar.gz
 | 
			
		||||
    (cd ${perl_fname} && do_perl_build)
 | 
			
		||||
    rm -rf ${perl_fname} ${perl_fname}.tar.gz
 | 
			
		||||
    check_var "${perl_sha256}"
 | 
			
		||||
    check_var "${PERL_DOWNLOAD_URL}"
 | 
			
		||||
    curl -fsSLO "${PERL_DOWNLOAD_URL}/${perl_fname}.tar.gz"
 | 
			
		||||
    check_sha256sum "${perl_fname}.tar.gz" "${perl_sha256}"
 | 
			
		||||
    tar -xzf "${perl_fname}.tar.gz"
 | 
			
		||||
    (cd "${perl_fname}" && do_perl_build)
 | 
			
		||||
    rm -rf "${perl_fname}" "${perl_fname}.tar.gz"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function do_openssl_build {
 | 
			
		||||
    ${WRAPPER} ./config no-shared -fPIC $CONFIG_FLAG --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null
 | 
			
		||||
    ${WRAPPER} make -j$(nproc) > /dev/null
 | 
			
		||||
    ${WRAPPER} make install_sw > /dev/null
 | 
			
		||||
    "${WRAPPER}" ./config no-shared -fPIC "$CONFIG_FLAG" --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null
 | 
			
		||||
    "${WRAPPER}" make -j"$(nproc)" > /dev/null
 | 
			
		||||
    "${WRAPPER}" make install_sw > /dev/null
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function build_openssl {
 | 
			
		||||
    local openssl_fname=$1
 | 
			
		||||
    check_var ${openssl_fname}
 | 
			
		||||
    check_var "${openssl_fname}"
 | 
			
		||||
    local openssl_sha256=$2
 | 
			
		||||
    check_var ${openssl_sha256}
 | 
			
		||||
    check_var ${OPENSSL_DOWNLOAD_URL}
 | 
			
		||||
    curl -fsSLO ${OPENSSL_DOWNLOAD_URL}/${openssl_fname}.tar.gz
 | 
			
		||||
    check_sha256sum ${openssl_fname}.tar.gz ${openssl_sha256}
 | 
			
		||||
    tar -xzf ${openssl_fname}.tar.gz
 | 
			
		||||
    (cd ${openssl_fname} && PATH=/opt/perl/bin:${PATH} do_openssl_build)
 | 
			
		||||
    rm -rf ${openssl_fname} ${openssl_fname}.tar.gz
 | 
			
		||||
    check_var "${openssl_sha256}"
 | 
			
		||||
    check_var" ${OPENSSL_DOWNLOAD_URL}"
 | 
			
		||||
    curl -fsSLO "${OPENSSL_DOWNLOAD_URL}/${openssl_fname}.tar.gz"
 | 
			
		||||
    check_sha256sum "${openssl_fname}.tar.gz" "${openssl_sha256}"
 | 
			
		||||
    tar -xzf "${openssl_fname}.tar.gz"
 | 
			
		||||
    (cd "${openssl_fname}" && PATH="/opt/perl/bin:${PATH}" do_openssl_build)
 | 
			
		||||
    rm -rf "${openssl_fname}" "${openssl_fname}.tar.gz"
 | 
			
		||||
    # Cleanup install tree
 | 
			
		||||
    rm -rf /usr/ssl/man
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cd /usr/src
 | 
			
		||||
build_perl $PERL_ROOT $PERL_HASH
 | 
			
		||||
build_openssl $OPENSSL_ROOT $OPENSSL_HASH
 | 
			
		||||
build_perl "$PERL_ROOT" "$PERL_HASH"
 | 
			
		||||
build_openssl "$OPENSSL_ROOT" "$OPENSSL_HASH"
 | 
			
		||||
 | 
			
		||||
# Delete PERL
 | 
			
		||||
rm -rf /opt/perl
 | 
			
		||||
 
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Configure, build and install python
 | 
			
		||||
#
 | 
			
		||||
# Usage:
 | 
			
		||||
#
 | 
			
		||||
#  build-and-install-python.sh [-version 3.9.5]
 | 
			
		||||
# needed packages : libncurses5-dev libgdbm-dev libnss3-dev 
 | 
			
		||||
#   libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev
 | 
			
		||||
 | 
			
		||||
PYTHON_VERSION=3.9.5
 | 
			
		||||
while [ $# -gt 0 ]; do
 | 
			
		||||
  case "$1" in
 | 
			
		||||
    -version|-v)
 | 
			
		||||
      PYTHON_VERSION=$2
 | 
			
		||||
      shift
 | 
			
		||||
      ;;&
 | 
			
		||||
    *)
 | 
			
		||||
      echo "Usage: Usage: ${0##*/} [-version 3.9.5]"
 | 
			
		||||
      exit 1
 | 
			
		||||
      ;;
 | 
			
		||||
  esac
 | 
			
		||||
  shift
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Download
 | 
			
		||||
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
 | 
			
		||||
tar xvf Python-${PYTHON_VERSION}.tgz
 | 
			
		||||
# Configure, build and install
 | 
			
		||||
cd Python-${PYTHON_VERSION}
 | 
			
		||||
# Disable --enable-shared --enable-optimizations --prefix=/usr/local/python-${PYTHON_VERSION}
 | 
			
		||||
./configure --with-ensurepip=install
 | 
			
		||||
make -j$(nproc) 
 | 
			
		||||
make install #altinstall
 | 
			
		||||
 | 
			
		||||
ln -s /usr/local/bin/python3 /usr/local/bin/python
 | 
			
		||||
ln -s /usr/local/bin/pip3 /usr/local/bin/pip
 | 
			
		||||
 | 
			
		||||
# Clean
 | 
			
		||||
cd ..
 | 
			
		||||
rm -rf Python-${PYTHON_VERSION}
 | 
			
		||||
@@ -4,4 +4,4 @@
 | 
			
		||||
# dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is
 | 
			
		||||
# always set in this context
 | 
			
		||||
 | 
			
		||||
exec /usr/bin/ccmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
 | 
			
		||||
exec /usr/bin/ccmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${CMAKE_TOOLCHAIN_FILE}" "$@"
 | 
			
		||||
 
 | 
			
		||||
@@ -19,4 +19,4 @@ case $1 in
 | 
			
		||||
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
 | 
			
		||||
exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${CMAKE_TOOLCHAIN_FILE}" "$@"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,11 +6,11 @@ DEFAULT_DOCKCROSS_IMAGE=dockcross/base  # DO NOT MOVE THIS LINE (see entrypoint.
 | 
			
		||||
# Helpers
 | 
			
		||||
#
 | 
			
		||||
err() {
 | 
			
		||||
    echo -e >&2 "ERROR: $*\n"
 | 
			
		||||
    echo -e ">&2 ERROR: $*\\n"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
die() {
 | 
			
		||||
    err "$*"
 | 
			
		||||
    err "$@"
 | 
			
		||||
    exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -19,7 +19,7 @@ has() {
 | 
			
		||||
    local kind=$1
 | 
			
		||||
    local name=$2
 | 
			
		||||
 | 
			
		||||
    type -t $kind:$name | grep -q function
 | 
			
		||||
    type -t "$kind:$name" | grep -q function
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# If OCI_EXE is not already set, search for a container executor (OCI stands for "Open Container Initiative")
 | 
			
		||||
@@ -37,24 +37,24 @@ fi
 | 
			
		||||
# Command handlers
 | 
			
		||||
#
 | 
			
		||||
command:update-image() {
 | 
			
		||||
    $OCI_EXE pull $FINAL_IMAGE
 | 
			
		||||
    $OCI_EXE pull "$FINAL_IMAGE"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
help:update-image() {
 | 
			
		||||
    echo Pull the latest $FINAL_IMAGE .
 | 
			
		||||
    echo Pull the latest "$FINAL_IMAGE" .
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
command:update-script() {
 | 
			
		||||
    if cmp -s <( $OCI_EXE run --rm $FINAL_IMAGE ) $0; then
 | 
			
		||||
        echo $0 is up to date
 | 
			
		||||
    if cmp -s <( "$OCI_EXE" run --rm "$FINAL_IMAGE" ) "$0"; then
 | 
			
		||||
        echo "$0" is up to date
 | 
			
		||||
    else
 | 
			
		||||
        echo -n Updating $0 '... '
 | 
			
		||||
        $OCI_EXE run --rm $FINAL_IMAGE > $0 && echo ok
 | 
			
		||||
        echo -n Updating "$0" '... '
 | 
			
		||||
        "$OCI_EXE" run --rm "$FINAL_IMAGE" > "$0" && echo ok
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
help:update-image() {
 | 
			
		||||
    echo Update $0 from $FINAL_IMAGE .
 | 
			
		||||
    echo Update "$0" from "$FINAL_IMAGE" .
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
command:update() {
 | 
			
		||||
@@ -63,18 +63,18 @@ command:update() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
help:update() {
 | 
			
		||||
    echo Pull the latest $FINAL_IMAGE, and then update $0 from that.
 | 
			
		||||
    echo "Pull the latest $FINAL_IMAGE, and then update $0 from that."
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
command:help() {
 | 
			
		||||
    if [[ $# != 0 ]]; then
 | 
			
		||||
        if ! has command $1; then
 | 
			
		||||
        if ! has command "$1"; then
 | 
			
		||||
            err \"$1\" is not an dockcross command
 | 
			
		||||
            command:help
 | 
			
		||||
        elif ! has help $1; then
 | 
			
		||||
        elif ! has help "$1"; then
 | 
			
		||||
            err No help found for \"$1\"
 | 
			
		||||
        else
 | 
			
		||||
            help:$1
 | 
			
		||||
            help:"$1"
 | 
			
		||||
        fi
 | 
			
		||||
    else
 | 
			
		||||
        cat >&2 <<ENDHELP
 | 
			
		||||
@@ -133,7 +133,7 @@ while [[ $# != 0 ]]; do
 | 
			
		||||
            ;;
 | 
			
		||||
        -*)
 | 
			
		||||
            err Unknown option \"$1\"
 | 
			
		||||
            command:help
 | 
			
		||||
            command:help $1
 | 
			
		||||
            exit
 | 
			
		||||
            ;;
 | 
			
		||||
 | 
			
		||||
@@ -246,11 +246,11 @@ if [[ $rm_exit_code != 0 ]]; then
 | 
			
		||||
    : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/
 | 
			
		||||
  else
 | 
			
		||||
    echo "$rm_output"
 | 
			
		||||
    exit $rm_exit_code
 | 
			
		||||
    exit "$rm_exit_code"
 | 
			
		||||
  fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
exit $run_exit_code
 | 
			
		||||
exit "$run_exit_code"
 | 
			
		||||
 | 
			
		||||
################################################################################
 | 
			
		||||
#
 | 
			
		||||
@@ -7,13 +7,13 @@ if [[ $# == 0 ]]; then
 | 
			
		||||
    # Presumably the image has been run directly, so help the user get
 | 
			
		||||
    # started by outputting the dockcross script
 | 
			
		||||
    if [[ -n $DEFAULT_DOCKCROSS_IMAGE ]]; then
 | 
			
		||||
        head -n 2 /dockcross/dockcross.sh
 | 
			
		||||
        head -n 2 /dockcross/dockcross
 | 
			
		||||
        echo "DEFAULT_DOCKCROSS_IMAGE=$DEFAULT_DOCKCROSS_IMAGE"
 | 
			
		||||
        tail -n +4 /dockcross/dockcross.sh |
 | 
			
		||||
        tail -n +4 /dockcross/dockcross |
 | 
			
		||||
          sed -e "s@dockcross\/linux\-armv7@${DEFAULT_DOCKCROSS_IMAGE}@g" |
 | 
			
		||||
          sed -e "s@dockcross\-linux\-armv7@${DEFAULT_DOCKCROSS_IMAGE//[\/:]/-}@g"
 | 
			
		||||
    else
 | 
			
		||||
        cat /dockcross/dockcross.sh
 | 
			
		||||
        cat /dockcross/dockcross
 | 
			
		||||
    fi
 | 
			
		||||
    exit 0
 | 
			
		||||
fi
 | 
			
		||||
@@ -37,16 +37,16 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Enable passwordless sudo capabilities for the user
 | 
			
		||||
    chown root:$BUILDER_GID $(which gosu)
 | 
			
		||||
    chmod +s $(which gosu); sync
 | 
			
		||||
    chown root:"$BUILDER_GID" "$(which gosu)"
 | 
			
		||||
    chmod +s "$(which gosu)"; sync
 | 
			
		||||
 | 
			
		||||
    # Execute project specific pre execution hook
 | 
			
		||||
    if [[ -e /work/.dockcross ]]; then
 | 
			
		||||
       gosu $BUILDER_UID:$BUILDER_GID /work/.dockcross
 | 
			
		||||
       gosu "$BUILDER_UID:$BUILDER_GID" /work/.dockcross
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Run the command as the specified user/group.
 | 
			
		||||
    exec gosu $BUILDER_UID:$BUILDER_GID "$@"
 | 
			
		||||
    exec gosu "$BUILDER_UID:$BUILDER_GID" "$@"
 | 
			
		||||
else
 | 
			
		||||
    # Just run the command as root.
 | 
			
		||||
    exec "$@"
 | 
			
		||||
 
 | 
			
		||||
@@ -35,15 +35,15 @@ fi
 | 
			
		||||
 | 
			
		||||
cd /usr/src
 | 
			
		||||
 | 
			
		||||
CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH}
 | 
			
		||||
url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz
 | 
			
		||||
CMAKE_ROOT="cmake-${CMAKE_VERSION}-Centos5-${ARCH}"
 | 
			
		||||
url="https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz"
 | 
			
		||||
echo "Downloading $url"
 | 
			
		||||
curl -# -LO $url
 | 
			
		||||
curl -# -LO "$url"
 | 
			
		||||
 | 
			
		||||
tar -xzvf ${CMAKE_ROOT}.tar.gz
 | 
			
		||||
rm -f ${CMAKE_ROOT}.tar.gz
 | 
			
		||||
tar -xzvf "${CMAKE_ROOT}.tar.gz"
 | 
			
		||||
rm -f "${CMAKE_ROOT}.tar.gz"
 | 
			
		||||
 | 
			
		||||
cd ${CMAKE_ROOT}
 | 
			
		||||
cd "${CMAKE_ROOT}"
 | 
			
		||||
 | 
			
		||||
rm -rf doc man
 | 
			
		||||
rm -rf bin/cmake-gui
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,7 @@ cd crosstool-ng
 | 
			
		||||
git fetch --tags
 | 
			
		||||
 | 
			
		||||
# checkout 
 | 
			
		||||
git checkout ${REV}
 | 
			
		||||
git checkout "${REV}"
 | 
			
		||||
 | 
			
		||||
if [ ${REV} = "crosstool-ng-1.23.0" ]; then
 | 
			
		||||
  patch scripts/build/companion_libs/210-expat.sh -i /dockcross/crosstool-ng-expat.patch
 | 
			
		||||
@@ -89,7 +89,7 @@ BOOTSTRAP_PREFIX="${CTNG}/prefix"
 | 
			
		||||
./bootstrap
 | 
			
		||||
./configure \
 | 
			
		||||
  --prefix "${BOOTSTRAP_PREFIX}"
 | 
			
		||||
make -j$(nproc)
 | 
			
		||||
make -j"$(nproc)"
 | 
			
		||||
make install
 | 
			
		||||
 | 
			
		||||
##
 | 
			
		||||
 
 | 
			
		||||
@@ -14,12 +14,13 @@ if ! command -v gpg &> /dev/null; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
GOSU_VERSION=1.12
 | 
			
		||||
dpkgArch=$(if test $(uname -m) = "x86_64"; then echo amd64; else echo i386; fi)
 | 
			
		||||
dpkgArch=$(if test "$(uname -m)" = "x86_64"; then echo amd64; else echo i386; fi)
 | 
			
		||||
url="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}"
 | 
			
		||||
url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}.asc"
 | 
			
		||||
 | 
			
		||||
# download and verify the signature
 | 
			
		||||
export GNUPGHOME="$(mktemp -d)"
 | 
			
		||||
GNUPGHOME=$(mktemp -d)
 | 
			
		||||
export GNUPGHOME
 | 
			
		||||
 | 
			
		||||
gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \
 | 
			
		||||
gpg --keyserver hkp://pgp.key-server.io:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \
 | 
			
		||||
 
 | 
			
		||||
@@ -24,10 +24,10 @@ cd /tmp
 | 
			
		||||
# 3.6 or later
 | 
			
		||||
curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py
 | 
			
		||||
#curl -# -LO https://bootstrap.pypa.io/pip/2.7/get-pip.py
 | 
			
		||||
${PYTHON} get-pip.py --ignore-installed
 | 
			
		||||
"${PYTHON}" get-pip.py --ignore-installed
 | 
			
		||||
rm get-pip.py
 | 
			
		||||
 | 
			
		||||
${PYTHON} -m pip install --upgrade --ignore-installed setuptools
 | 
			
		||||
${PYTHON} -m pip install --ignore-installed conan
 | 
			
		||||
"${PYTHON}" -m pip install --upgrade --ignore-installed setuptools
 | 
			
		||||
"${PYTHON}" -m pip install --ignore-installed conan
 | 
			
		||||
# Purge cache to save space: https://stackoverflow.com/questions/37513597/is-it-safe-to-delete-cache-pip-directory
 | 
			
		||||
${PYTHON} -m pip cache purge
 | 
			
		||||
"${PYTHON}" -m pip cache purge
 | 
			
		||||
 
 | 
			
		||||
@@ -13,12 +13,12 @@ function check_var {
 | 
			
		||||
# Copied from https://github.com/pypa/manylinux/blob/master/docker/build_scripts/build_utils.sh
 | 
			
		||||
function check_sha256sum {
 | 
			
		||||
    local fname=$1
 | 
			
		||||
    check_var ${fname}
 | 
			
		||||
    check_var "${fname}"
 | 
			
		||||
    local sha256=$2
 | 
			
		||||
    check_var ${sha256}
 | 
			
		||||
    check_var "${sha256}"
 | 
			
		||||
 | 
			
		||||
    echo "${sha256}  ${fname}" > ${fname}.sha256
 | 
			
		||||
    sha256sum -c ${fname}.sha256
 | 
			
		||||
    rm -f ${fname}.sha256
 | 
			
		||||
    echo "${sha256}  ${fname}" > "${fname}.sha256"
 | 
			
		||||
    sha256sum -c "${fname}.sha256"
 | 
			
		||||
    rm -f "${fname}.sha256"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,8 @@ FROM dockcross/base:latest
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,8 +6,8 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
# musleabi as default glibc
 | 
			
		||||
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,8 +6,8 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,8 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
# This is for 32-bit ARMv6 Linux
 | 
			
		||||
# Raspberry Pi is ARMv6+VFP2
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,8 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
# This is for 32-bit ARMv7 Linux
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,8 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
# This is for 32-bit ARMv7 Linux
 | 
			
		||||
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,10 +3,10 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
ARG QEMU_VERSION=6.0.0
 | 
			
		||||
ENV QEMU_VERSION 6.0.0
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,8 @@ FROM dockcross/base:latest
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,10 +3,10 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
ARG QEMU_VERSION=6.0.0
 | 
			
		||||
ENV QEMU_VERSION 6.0.0
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,10 +3,10 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
ARG QEMU_VERSION=6.0.0
 | 
			
		||||
ENV QEMU_VERSION 6.0.0
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,10 +3,10 @@ MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
ARG QEMU_VERSION=6.0.0
 | 
			
		||||
ENV QEMU_VERSION 6.0.0
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,8 @@ FROM dockcross/base:latest
 | 
			
		||||
 | 
			
		||||
# Crosstool-ng version
 | 
			
		||||
# We use a git commit while waiting for 1.25 to release (1.24 is several years old)
 | 
			
		||||
# crosstool-ng master 2021-08-04
 | 
			
		||||
ENV CT_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
 | 
			
		||||
# crosstool-ng master 2021-07-07
 | 
			
		||||
ENV CT_VERSION 62e9db247be34f8a4fa3bc116e60a1b15db62a97
 | 
			
		||||
 | 
			
		||||
#include "common.crosstool"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,33 +1,26 @@
 | 
			
		||||
FROM dockcross/base:latest
 | 
			
		||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
ARG CLANG_VERSION=13
 | 
			
		||||
ENV CLANG_VERSION=${CLANG_VERSION}
 | 
			
		||||
 | 
			
		||||
 # flang
 | 
			
		||||
RUN echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye main" >> /etc/apt/sources.list \
 | 
			
		||||
    && echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-${CLANG_VERSION} main" >> /etc/apt/sources.list \
 | 
			
		||||
    && echo "deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye main" >> /etc/apt/sources.list \
 | 
			
		||||
    && echo "deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-${CLANG_VERSION}  main" >> /etc/apt/sources.list \
 | 
			
		||||
    && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
 | 
			
		||||
    && apt-get update \
 | 
			
		||||
    && apt-get purge --autoremove -y gcc g++ software-properties-common \
 | 
			
		||||
    && apt-get -y install clang-${CLANG_VERSION} libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev clang-format-${CLANG_VERSION} clang-tidy-${CLANG_VERSION} lldb-${CLANG_VERSION}  \
 | 
			
		||||
    && apt-get -y install clang libc++-dev libc++abi-dev clang-format clang-tidy lldb \
 | 
			
		||||
    && apt-get clean --yes \
 | 
			
		||||
    && rm -rf /var/lib/apt/lists/* \
 | 
			
		||||
    && update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${CLANG_VERSION} 90 \
 | 
			
		||||
    && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 90 \
 | 
			
		||||
    && update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-${CLANG_VERSION} 90 \
 | 
			
		||||
    && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 90 \
 | 
			
		||||
    && update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 90 \
 | 
			
		||||
    && update-alternatives --install /usr/bin/cc cc /usr/bin/clang 90 \
 | 
			
		||||
    && update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 90 \
 | 
			
		||||
    && update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++ 90 \
 | 
			
		||||
    && cc --version \
 | 
			
		||||
    && c++ --version \
 | 
			
		||||
    && cpp --version
 | 
			
		||||
 | 
			
		||||
ENV CROSS_TRIPLE x86_64-linux-gnu
 | 
			
		||||
ENV CROSS_ROOT /usr/bin
 | 
			
		||||
ENV CC=/usr/bin/clang  \
 | 
			
		||||
ENV CC=/usr/bin/clang \
 | 
			
		||||
    CPP=/usr/bin/cpp \
 | 
			
		||||
    CXX=/usr/bin/clang++  \
 | 
			
		||||
    CXX=/usr/bin/clang++ \
 | 
			
		||||
    LD=/usr/bin/lld \
 | 
			
		||||
    FC=/usr/bin/flang
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
FROM emscripten/emsdk:2.0.26
 | 
			
		||||
FROM emscripten/emsdk:2.0.25
 | 
			
		||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
 | 
			
		||||
 | 
			
		||||
# Revert back to "/bin/sh" as default shell
 | 
			
		||||
@@ -52,7 +52,7 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
 | 
			
		||||
 | 
			
		||||
#include "common.docker"
 | 
			
		||||
 | 
			
		||||
ENV EMSCRIPTEN_VERSION 2.0.26
 | 
			
		||||
ENV EMSCRIPTEN_VERSION 2.0.25
 | 
			
		||||
 | 
			
		||||
ENV PATH /emsdk:/emsdk/upstream/bin/:/emsdk/upstream/emscripten:${PATH}
 | 
			
		||||
ENV CC=/emsdk/upstream/emscripten/emcc \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user