-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linux-ppc64 (little endian) as supported platform (#242)
- Loading branch information
Showing
9 changed files
with
148 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "@img/sharp-libvips-linux-ppc64", | ||
"version": "1.0.2", | ||
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) ppc64le", | ||
"author": "Lovell Fuller <[email protected]>", | ||
"homepage": "https://sharp.pixelplumbing.com", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/lovell/sharp-libvips.git", | ||
"directory": "npm/linux-ppc64" | ||
}, | ||
"license": "LGPL-3.0-or-later", | ||
"funding": { | ||
"url": "https://opencollective.com/libvips" | ||
}, | ||
"preferUnplugged": true, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"lib", | ||
"versions.json" | ||
], | ||
"exports": { | ||
"./lib": "./lib/index.js", | ||
"./package": "./package.json", | ||
"./versions": "./versions.json" | ||
}, | ||
"type": "commonjs", | ||
"config": { | ||
"glibc": ">=2.31" | ||
}, | ||
"os": [ | ||
"linux" | ||
], | ||
"libc": [ | ||
"glibc" | ||
], | ||
"cpu": [ | ||
"ppc64" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
FROM debian:bullseye | ||
LABEL maintainer="Lovell Fuller <[email protected]>" | ||
|
||
# Create Debian 11 (glibc 2.31) container suitable for cross-compiling Linux ppc64le binaries | ||
|
||
# Path settings | ||
ENV \ | ||
RUSTUP_HOME="/usr/local/rustup" \ | ||
CARGO_HOME="/usr/local/cargo" \ | ||
PATH="/usr/local/cargo/bin:$PATH" | ||
|
||
# Build dependencies | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y curl && \ | ||
dpkg --add-architecture ppc64el && \ | ||
apt-get install -y \ | ||
autoconf \ | ||
autopoint \ | ||
cmake \ | ||
crossbuild-essential-ppc64el \ | ||
gettext \ | ||
git \ | ||
gperf \ | ||
jq \ | ||
libssl-dev \ | ||
libtool \ | ||
ninja-build \ | ||
pkg-config \ | ||
python3-packaging \ | ||
python3-pip \ | ||
&& \ | ||
curl https://sh.rustup.rs -sSf | sh -s -- -y \ | ||
--no-modify-path \ | ||
--profile minimal \ | ||
&& \ | ||
rustup target add powerpc64le-unknown-linux-gnu && \ | ||
cargo install cargo-c && \ | ||
pip3 install meson tomli | ||
|
||
# Handy for debugging the compiled targets in Highway (hwy_list_targets) | ||
#RUN apt-get install -y qemu-user-static | ||
#ENV QEMU_LD_PREFIX="/usr/powerpc64le-linux-gnu" | ||
|
||
# Compiler settings | ||
ENV \ | ||
PKG_CONFIG="powerpc64le-linux-gnu-pkg-config --static" \ | ||
PLATFORM="linux-ppc64le" \ | ||
CHOST="powerpc64le-linux-gnu" \ | ||
RUST_TARGET="powerpc64le-unknown-linux-gnu" \ | ||
FLAGS="" \ | ||
MESON="--cross-file=/root/meson.ini" | ||
|
||
COPY Toolchain.cmake /root/ | ||
COPY meson.ini /root/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_VERSION 1) | ||
set(CMAKE_SYSTEM_PROCESSOR ppc64le) | ||
|
||
SET(CMAKE_C_COMPILER powerpc64le-linux-gnu-gcc) | ||
SET(CMAKE_CXX_COMPILER powerpc64le-linux-gnu-g++) | ||
SET(CMAKE_AR powerpc64le-linux-gnu-gcc-ar) | ||
SET(CMAKE_STRIP powerpc64le-linux-gnu-gcc-strip) | ||
SET(CMAKE_RANLIB powerpc64le-linux-gnu-gcc-ranlib) | ||
|
||
#SET(CMAKE_CROSSCOMPILING_EMULATOR qemu-ppc64le-static) | ||
|
||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'ppc64' | ||
cpu = 'powerpc64le' | ||
endian = 'little' | ||
|
||
[binaries] | ||
c = 'powerpc64le-linux-gnu-gcc' | ||
cpp = 'powerpc64le-linux-gnu-g++' | ||
ar = 'powerpc64le-linux-gnu-gcc-ar' | ||
nm = 'powerpc64le-linux-gnu-gcc-nm' | ||
ld = 'powerpc64le-linux-gnu-gcc-ld' | ||
strip = 'powerpc64le-linux-gnu-strip' | ||
ranlib = 'powerpc64le-linux-gnu-gcc-ranlib' | ||
#exe_wrapper = 'qemu-ppc64le-static' | ||
|
||
[built-in options] | ||
libdir = 'lib' | ||
datadir = '/usr/share' | ||
localedir = '/usr/share/locale' | ||
sysconfdir = '/etc' | ||
localstatedir = '/var' | ||
wrap_mode = 'nofallback' |