From 2946bd8c00bdf58f3af88530c5e47c0f8e8b248c Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Thu, 28 Apr 2022 07:17:25 -0400 Subject: Tweak static build process to improve build speed and debuggability. (#12708) - Switch from `-O3` to `-O2` for optimization CFLAGS, bringing us in-line with all of our other builds. This should help avoid strange edge cases specific to static builds resulting from the build process. - Stop stripping binaries in static builds so that we can get proper symbolic backtraces when the agent crashes in the static builds. --- packaging/makeself/jobs/70-netdata-git.install.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'packaging/makeself') diff --git a/packaging/makeself/jobs/70-netdata-git.install.sh b/packaging/makeself/jobs/70-netdata-git.install.sh index bda75592ac..1c39abc853 100755 --- a/packaging/makeself/jobs/70-netdata-git.install.sh +++ b/packaging/makeself/jobs/70-netdata-git.install.sh @@ -7,7 +7,7 @@ cd "${NETDATA_SOURCE_PATH}" || exit 1 if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then - export CFLAGS="-static -O3 -I/openssl-static/include" + export CFLAGS="-static -O2 -I/openssl-static/include" else export CFLAGS="-static -O1 -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -D_FORTIFY_SOURCE=2 -DNETDATA_INTERNAL_CHECKS=1 -I/openssl-static/include" fi @@ -54,11 +54,5 @@ if run readelf -l "${NETDATA_INSTALL_PATH}"/bin/netdata | grep 'INTERP'; then exit 1 fi -if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then - run strip "${NETDATA_INSTALL_PATH}"/bin/netdata - run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/apps.plugin - run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/cgroup-network -fi - # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true -- cgit v1.2.3