Skip to content

Commit bc27372

Browse files
Compile libz with -O3 (#169)
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.
1 parent 5d0f0d5 commit bc27372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/modules/libz.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ExternalProject_Add(
66
libz-external
77
BINARY_DIR ${LIBZ_BUILD_DIR}
88
DOWNLOAD_COMMAND ""
9-
CONFIGURE_COMMAND ${EBPF_EXT_ENV_FLAGS} /bin/sh -c "CFLAGS=-fPIE ${LIBZ_SRC_DIR}/configure --static"
9+
CONFIGURE_COMMAND ${EBPF_EXT_ENV_FLAGS} /bin/sh -c "CFLAGS='-O3 -fPIE' ${LIBZ_SRC_DIR}/configure --static"
1010
BUILD_COMMAND ${EBPF_EXT_ENV_FLAGS} /bin/sh -c "make"
1111
INSTALL_COMMAND /bin/sh -c "make install prefix= DESTDIR=${EBPF_INSTALL_DIR}"
1212
BUILD_IN_SOURCE 0

0 commit comments

Comments
 (0)