1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-22 19:14:20 +00:00

Setup pkg-config for cross-compilation on Debian

This commit is contained in:
Steffo 2024-07-12 06:17:13 +02:00
parent 47cb8abf0e
commit 7ad71853c9
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -16,7 +16,7 @@ RUN \
if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \ if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
dpkg --add-architecture amd64; \ dpkg --add-architecture amd64; \
apt-get update; \ apt-get update; \
apt-get install --assume-yes gcc-x86-64-linux-gnu; \ apt-get install --assume-yes gcc-x86-64-linux-gnu x86-64-linux-gnu-pkg-config; \
echo '[target.x86_64-unknown-linux-gnu]' >> .cargo/config.toml; \ echo '[target.x86_64-unknown-linux-gnu]' >> .cargo/config.toml; \
echo 'linker = "x86-64-linux-gnu-gcc"' >> .cargo/config.toml; \ echo 'linker = "x86-64-linux-gnu-gcc"' >> .cargo/config.toml; \
echo >> .cargo/config.toml; \ echo >> .cargo/config.toml; \
@ -24,7 +24,7 @@ RUN \
if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \ if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
dpkg --add-architecture arm64; \ dpkg --add-architecture arm64; \
apt-get update; \ apt-get update; \
apt-get install --assume-yes gcc-aarch64-linux-gnu; \ apt-get install --assume-yes gcc-aarch64-linux-gnu aarch64-linux-gnu-pkg-config; \
echo '[target.aarch64-unknown-linux-gnu]' >> .cargo/config.toml; \ echo '[target.aarch64-unknown-linux-gnu]' >> .cargo/config.toml; \
echo 'linker = "aarch64-linux-gnu-gcc"' >> .cargo/config.toml; \ echo 'linker = "aarch64-linux-gnu-gcc"' >> .cargo/config.toml; \
echo >> .cargo/config.toml; \ echo >> .cargo/config.toml; \
@ -32,7 +32,7 @@ RUN \
if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \ if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then \
dpkg --add-architecture armhf; \ dpkg --add-architecture armhf; \
apt-get update; \ apt-get update; \
apt-get install --assume-yes gcc-arm-linux-gnueabihf; \ apt-get install --assume-yes gcc-arm-linux-gnueabihf arm-linux-gnueabihf-pkg-config; \
echo '[target.armv7-unknown-linux-gnueabihf]' >> .cargo/config.toml; \ echo '[target.armv7-unknown-linux-gnueabihf]' >> .cargo/config.toml; \
echo 'linker = "arm-linux-gnueabihf-gcc"' >> .cargo/config.toml; \ echo 'linker = "arm-linux-gnueabihf-gcc"' >> .cargo/config.toml; \
echo >> .cargo/config.toml; \ echo >> .cargo/config.toml; \