Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions images/packages/gnutls/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ altPackages:
- liboqs-devel
- iproute2-devel
- wget
- tree
packages:
- libbrotli libidn2 libgcrypt libgmp
- nettle zlib zstd p11-kit
Expand Down Expand Up @@ -94,10 +95,17 @@ shell:

cd /src

# Fake distcheck-hook that checks bootstrap is called without --skip-po
mkdir -p po/.reference
# Limit optimisations to x86-64 level 2 microarchitecture.
# This prevent "invalid opcode" errors on CPUs without level v3 extensions
# AVX2, BMI2, etc.: Intel Ivy Bridge and older, AMD Steamroller and older.
export CFLAGS="-march=x86-64-v2"
export CPPFLAGS="-march=x86-64-v2"
export CXXFLAGS="-march=x86-64-v2"

./bootstrap --skip-po
# Skip po downloads: bootstrap checks .reference directory to decide if it should download po files.
mkdir -p po/.reference
# Skip git clone: gnulib is already downloaded in the src-artifact image.
./bootstrap --skip-po --no-git --gnulib-srcdir=/src/gnulib

./configure \
--prefix=/usr \
Expand All @@ -123,3 +131,5 @@ shell:
make -j$(nproc)

make DESTDIR=$OUTDIR install-strip

tree -hp $OUTDIR
12 changes: 12 additions & 0 deletions images/packages/libgmp/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,21 @@ shell:

cd /src

# Limit optimisations to x86-64 level 2 microarchitecture.
# This prevent "invalid opcode" errors on CPUs without level v3 extensions
# AVX2, BMI2, etc.: Intel Ivy Bridge and older, AMD Steamroller and older.
export CFLAGS="-march=x86-64-v2"
export CPPFLAGS="-march=x86-64-v2"
export CXXFLAGS="-march=x86-64-v2"

# Notes:
# - Use x86_64 cpu to produce the most portable binary but not the most performant one.
# - Disable fat binary.
./configure \
--prefix=/usr \
--libdir=/usr/lib64 \
--disable-fat \
--build x86_64-linux-gnu \
--enable-cxx

make -j$(nproc)
Expand Down
2 changes: 1 addition & 1 deletion images/packages/libvirt/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ shell:
echo "Stripped: $execfile"
fi
done
tree -hp $OUTDIR
tree -hp $OUTDIR
10 changes: 10 additions & 0 deletions images/packages/swtpm/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ altPackages:
- libgnutls-openssl-devel
- libfuse-devel
- perl-podlators
- tree
packages:
- libgmp libtpms openssl libjson-glib
- libtasn1
Expand Down Expand Up @@ -78,6 +79,13 @@ shell:

cd /src

# Limit optimisations to x86-64 level 2 microarchitecture.
# This prevent "invalid opcode" errors on CPUs without level v3 extensions
# AVX2, BMI2, etc.: Intel Ivy Bridge and older, AMD Steamroller and older.
export CFLAGS="-march=x86-64-v2"
export CPPFLAGS="-march=x86-64-v2"
export CXXFLAGS="-march=x86-64-v2"

./autogen.sh \
--disable-tests \
--with-openssl \
Expand All @@ -98,3 +106,5 @@ shell:
rm -rf $OUTDIR/usr/include
rm -rf $OUTDIR/usr/share
rm -rf $OUTDIR/usr/libexec/installed-tests

tree -hp $OUTDIR
4 changes: 2 additions & 2 deletions images/virt-launcher/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ altLibs:
- msulogin
- strace
binaries:
# Gnu utils (requared for swtpm)
# GNU utils (required to run swtpm).
- /usr/bin/certtool
- /usr/bin/gnutls-cli
- /usr/bin/ocsptool
Expand Down Expand Up @@ -210,7 +210,7 @@ import:

{{- include "importPackageImages" (list . $builderDependencies.packages "install") -}}

# Statically builded
# Statically built.
- image: {{ .ModuleNamePrefix }}packages/openssl
add: /openssl
to: /relocate
Expand Down
Loading