Explicitly declare toolchain tools in base image

This commit is contained in:
BtbN 2022-11-02 22:02:09 +01:00
parent 1f74f0a60a
commit 2f0d9dbf8b
5 changed files with 32 additions and 2 deletions

View file

@ -48,6 +48,12 @@ ENV PATH="/opt/ct-ng/bin:${PATH}" \
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
PKG_CONFIG=pkg-config \
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \
CC="${FFBUILD_TOOLCHAIN}-gcc" \
CXX="${FFBUILD_TOOLCHAIN}-g++" \
LD="${FFBUILD_TOOLCHAIN}-ld" \
AR="${FFBUILD_TOOLCHAIN}-gcc-ar" \
RANLIB="${FFBUILD_TOOLCHAIN}-gcc-ranlib" \
NM="${FFBUILD_TOOLCHAIN}-gcc-nm" \
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong -Wl,-z,relro,-z,now -pthread -lm" \

View file

@ -50,6 +50,12 @@ ENV PATH="/opt/ct-ng/bin:${PATH}" \
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
PKG_CONFIG=pkg-config \
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \
CC="${FFBUILD_TOOLCHAIN}-gcc" \
CXX="${FFBUILD_TOOLCHAIN}-g++" \
LD="${FFBUILD_TOOLCHAIN}-ld" \
AR="${FFBUILD_TOOLCHAIN}-gcc-ar" \
RANLIB="${FFBUILD_TOOLCHAIN}-gcc-ranlib" \
NM="${FFBUILD_TOOLCHAIN}-gcc-nm" \
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong -Wl,-z,relro,-z,now -pthread -lm" \

View file

@ -33,9 +33,15 @@ ENV PATH="/opt/ct-ng/bin:${PATH}" \
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
PKG_CONFIG=pkg-config \
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \
CC="${FFBUILD_TOOLCHAIN}-gcc" \
CXX="${FFBUILD_TOOLCHAIN}-g++" \
LD="${FFBUILD_TOOLCHAIN}-ld" \
AR="${FFBUILD_TOOLCHAIN}-gcc-ar" \
RANLIB="${FFBUILD_TOOLCHAIN}-gcc-ranlib" \
NM="${FFBUILD_TOOLCHAIN}-gcc-nm" \
DLLTOOL="${FFBUILD_TOOLCHAIN}-dlltool" \
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong" \
DLLTOOL="${FFBUILD_TOOLCHAIN}-dlltool" \
STAGE_CFLAGS="-fno-semantic-interposition" \
STAGE_CXXFLAGS="-fno-semantic-interposition"

View file

@ -33,9 +33,15 @@ ENV PATH="/opt/ct-ng/bin:${PATH}" \
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
PKG_CONFIG=pkg-config \
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \
CC="${FFBUILD_TOOLCHAIN}-gcc" \
CXX="${FFBUILD_TOOLCHAIN}-g++" \
LD="${FFBUILD_TOOLCHAIN}-ld" \
AR="${FFBUILD_TOOLCHAIN}-gcc-ar" \
RANLIB="${FFBUILD_TOOLCHAIN}-gcc-ranlib" \
NM="${FFBUILD_TOOLCHAIN}-gcc-nm" \
DLLTOOL="${FFBUILD_TOOLCHAIN}-dlltool" \
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong" \
DLLTOOL="${FFBUILD_TOOLCHAIN}-dlltool" \
STAGE_CFLAGS="-fno-semantic-interposition" \
STAGE_CXXFLAGS="-fno-semantic-interposition"

View file

@ -50,6 +50,12 @@ ffbuild_dockerbuild() {
export CFLAGS="$CFLAGS -fno-strict-aliasing"
export CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
# OpenSSL build system prepends the cross prefix itself
export CC="gcc"
export CXX="g++"
export AR="gcc-ar"
export RANLIB="gcc-ranlib"
./Configure "${myconf[@]}"
sed -i -e "/^CFLAGS=/s|=.*|=${CFLAGS}|" -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" Makefile