diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9d9481..b00940f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,7 @@ jobs: max-parallel: 6 # manylinux2014-aarch64 matrix: - arch_name: [android-arm, android-arm64, android-x86, android-x86_64, web-wasm, linux-armv8, linux-armv8-musl, linux-armv8-rpi3, linux-armv8-rpi4, linux-armv5, linux-armv5-musl, linux-armv6-rpi1, linux-armv7-rpi2, linux-armv6-musl, linux-armv6-rpi-old, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-mips, linux-mips64, linux-mipsel, linux-m68k, linux-ppc32, linux-ppc64, linux-s390x, linux-x64, linux-x86, linux-riscv64, manylinux2014-x64, manylinux2014-x86, windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-shared-x64, windows-shared-x64-posix, windows-shared-x86] + arch_name: [android-arm, android-arm64, android-x86, android-x86_64, web-wasm, linux-armv8, linux-armv8-musl, linux-armv8-rpi3, linux-armv8-rpi4, linux-armv5, linux-armv5-musl, linux-armv6-rpi1, linux-armv7-rpi2, linux-armv6-musl, linux-armv6-rpi-old, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-mips, linux-mips64, linux-mipsel, linux-m68k, linux-ppc32, linux-ppc64, linux-s390x, linux-x64, linux-x64-clang, linux-x86, linux-riscv64, manylinux2014-x64, manylinux2014-x86, windows-static-x64, windows-static-x64-posix, windows-static-x86, windows-shared-x64, windows-shared-x64-posix, windows-shared-x86] steps: - uses: actions/checkout@v2 - uses: actions/download-artifact@v2 diff --git a/Makefile b/Makefile index 43cf1e6..6304a02 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,10 @@ ORG = dockcross BIN = ./bin # These images are built using the "build implicit rule" -STANDARD_IMAGES = linux-s390x android-arm android-arm64 android-x86 android-x86_64 linux-x86 linux-x64 linux-armv8 linux-armv8-musl linux-armv8-rpi3 linux-armv8-rpi4 linux-armv5 linux-m68k linux-armv5-musl linux-armv6-rpi1 linux-armv6-musl linux-armv6-rpi-old linux-armv7 linux-armv7a linux-armv7-rpi2 linux-armv7l-musl linux-mips linux-mips64 linux-mipsel linux-ppc32 linux-ppc64 linux-riscv64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix +STANDARD_IMAGES = linux-s390x android-arm android-arm64 android-x86 android-x86_64 linux-x86 linux-x64 linux-x64-clang linux-armv8 linux-armv8-musl linux-armv8-rpi3 linux-armv8-rpi4 linux-armv5 linux-m68k linux-armv5-musl linux-armv6-rpi1 linux-armv6-musl linux-armv6-rpi-old linux-armv7 linux-armv7a linux-armv7-rpi2 linux-armv7l-musl linux-mips linux-mips64 linux-mipsel linux-ppc32 linux-ppc64 linux-riscv64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix # Generated Dockerfiles. -GEN_IMAGES = linux-s390x android-arm android-arm64 linux-x86 linux-x64 linux-mips linux-mips64 linux-mipsel manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 linux-m68k web-wasm linux-armv8 linux-armv8-musl linux-armv8-rpi3 linux-armv8-rpi4 linux-ppc32 linux-ppc64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-armv7 linux-armv7a linux-armv7l-musl linux-armv6-rpi1 linux-armv6-musl linux-armv6-rpi-old linux-armv7-rpi2 linux-armv5 linux-armv5-musl linux-riscv64 +GEN_IMAGES = linux-s390x android-arm android-arm64 linux-x86 linux-x64 linux-x64-clang linux-mips linux-mips64 linux-mipsel manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 linux-m68k web-wasm linux-armv8 linux-armv8-musl linux-armv8-rpi3 linux-armv8-rpi4 linux-ppc32 linux-ppc64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-armv7 linux-armv7a linux-armv7l-musl linux-armv6-rpi1 linux-armv6-musl linux-armv6-rpi-old linux-armv7-rpi2 linux-armv5 linux-armv5-musl linux-riscv64 GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES)) # These images are expected to have explicit rules for *both* build and testing diff --git a/linux-x64-clang/Dockerfile.in b/linux-x64-clang/Dockerfile.in new file mode 100644 index 0000000..51c67cd --- /dev/null +++ b/linux-x64-clang/Dockerfile.in @@ -0,0 +1,27 @@ +FROM dockcross/base:latest +MAINTAINER Matt McCormick "matt.mccormick@kitware.com" + +RUN apt-get update && \ + apt-get -y install \ + libelf-dev \ + libssl-dev \ + libc++-dev \ + clang \ + && apt-get clean --yes + +ENV CROSS_TRIPLE x86_64-linux-gnu +ENV CROSS_ROOT /usr/bin +ENV AS=/usr/bin/${CROSS_TRIPLE}-as \ + AR=/usr/bin/${CROSS_TRIPLE}-ar \ + CC=/usr/bin/clang \ + CPP=/usr/bin/clang-cpp \ + CXX=/usr/bin/clang++ \ + LD=/usr/bin/${CROSS_TRIPLE}-ld \ + FC=/usr/bin/${CROSS_TRIPLE}-gfortran + +COPY ${CROSS_TRIPLE}-noop.sh /usr/bin/${CROSS_TRIPLE}-noop + +COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/ +ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake + +#include "common.label-and-env" diff --git a/linux-x64-clang/Toolchain.cmake b/linux-x64-clang/Toolchain.cmake new file mode 100644 index 0000000..9866b79 --- /dev/null +++ b/linux-x64-clang/Toolchain.cmake @@ -0,0 +1,12 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR x86_64) + +set(cross_triple "x86_64-linux-gnu") + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) +set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/${cross_triple}-noop) diff --git a/linux-x64-clang/x86_64-linux-gnu-noop.sh b/linux-x64-clang/x86_64-linux-gnu-noop.sh new file mode 100755 index 0000000..311cb8c --- /dev/null +++ b/linux-x64-clang/x86_64-linux-gnu-noop.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec "$@"