From a31ac734bf985912d0d4d5ec39150f2b6c498b4c Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 31 Jul 2019 02:43:30 -0400 Subject: build: Include debugging symbols in Git builds --- diff --git a/configure.ac b/configure.ac index 8970211..0af4123 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AM_CONDITIONAL([IN_GIT], AC_PROG_CC() AM_PROG_CC_C_O() -CFLAGS='' +test -d "${srcdir}/.git" || CFLAGS='' AX_CFLAGS_WARN_ALL() dnl Adds -Wall or equivalent AX_CHECK_COMPILE_FLAG([-Wpedantic], [AX_APPEND_FLAG([-Wpedantic])]) @@ -87,7 +87,10 @@ fi AX_APPEND_FLAG([-DTFM_TIMING_RESISTANT]) AX_APPEND_FLAG([-DECC_TIMING_RESISTANT]) -for flag in -Os -s -fno-unwind-tables -fno-asynchronous-unwind-tables \ +if ! test -d "${srcdir}/.git"; then + AX_CHECK_COMPILE_FLAG([-s], [AX_APPEND_FLAG([-s])]) +fi +for flag in -Os -fno-unwind-tables -fno-asynchronous-unwind-tables \ -ffunction-sections -fdata-sections -Wl,--gc-sections \ -fstack-protector-strong -flto \ -Wl,-z,now -Wl,--hash-style=sysv -Wl,--build-id=none; do -- cgit v0.9.1