Skip to content

Commit

Permalink
Compile libz with -O3 (#169)
Browse files Browse the repository at this point in the history
The side effect of us overwriting libz CFLAGS to add -fPIE was removal of default -O3 optimization level making libz effectively build with -O0.
Restore -O3.
  • Loading branch information
stanek-michal committed Apr 20, 2023
1 parent 5d0f0d5 commit bc27372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/modules/libz.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ExternalProject_Add(
libz-external
BINARY_DIR ${LIBZ_BUILD_DIR}
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ${EBPF_EXT_ENV_FLAGS} /bin/sh -c "CFLAGS=-fPIE ${LIBZ_SRC_DIR}/configure --static"
CONFIGURE_COMMAND ${EBPF_EXT_ENV_FLAGS} /bin/sh -c "CFLAGS='-O3 -fPIE' ${LIBZ_SRC_DIR}/configure --static"
BUILD_COMMAND ${EBPF_EXT_ENV_FLAGS} /bin/sh -c "make"
INSTALL_COMMAND /bin/sh -c "make install prefix= DESTDIR=${EBPF_INSTALL_DIR}"
BUILD_IN_SOURCE 0
Expand Down

0 comments on commit bc27372

Please sign in to comment.