Skip to content

Commit

Permalink
Fixed FreeBSD build
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanoostenrijk committed Jul 30, 2024
1 parent 2e4f6df commit 0872fd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ jobs:
release: "13.2"
usesh: true
prepare: |
pkg install -y cmake git gtar libxml2 libxslt pcre2 rust
pkg install -y cmake git go gtar libxml2 libxslt pcre2 rust samurai
run: |
./build-bsd.sh
./build-freebsd.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
nginx-http3-aws-lc-freebsd.tar.xz
nginx-http3-aws-lc-freebsd-amd64.tar.xz
9 changes: 6 additions & 3 deletions build-bsd.sh → build-freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ CC=clang CXX=clang++ cmake \
..
cmake --build .
cmake --install .
mkdir -p /usr/src/aws-lc/install/.openssl/lib /usr/src/aws-lc/install/.openssl/include
ln -sf /usr/src/aws-lc/install/include/openssl /usr/src/aws-lc/install/.openssl/include/openssl
cp /usr/src/aws-lc/install/lib/libcrypto.a /usr/src/aws-lc/install/lib/libssl.a /usr/src/aws-lc/install/.openssl/lib
SSL_COMMIT="AWS-LC-${AWS_LC_TAG}"

#
Expand All @@ -92,8 +95,8 @@ mkdir out && cd out
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -ffat-lto-objects -Wl,--gc-sections" \
-DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -ffat-lto-objects -Wl,--gc-sections" \
-DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections" \
-DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections" \
-DCMAKE_INSTALL_PREFIX=./installed \
..
cmake \
Expand Down Expand Up @@ -163,4 +166,4 @@ CXX=/usr/bin/clang++ \
--without-http_uwsgi_module || cat objs/autoconf.err
make -j$(getconf _NPROCESSORS_ONLN) || exit 1

tar -C /usr/src/nginx/objs -Jcvf ${BASE_DIR}/nginx-http3-aws-lc-freebsd.tar.xz nginx
tar -C /usr/src/nginx/objs -Jcvf ${BASE_DIR}/nginx-http3-aws-lc-freebsd-amd64.tar.xz nginx

0 comments on commit 0872fd1

Please sign in to comment.