Explicitly declare toolchain tools in base image
This commit is contained in:
parent
1f74f0a60a
commit
2f0d9dbf8b
5 changed files with 32 additions and 2 deletions
|
@ -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" \
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue