summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-31 02:43:30 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-31 02:45:49 (EDT)
commita31ac734bf985912d0d4d5ec39150f2b6c498b4c (patch)
tree8137dd288630f0cc77ed3fa2f936bbc75acdd8bf
parent089ee2540008b41329ee25311953db7abf6559eb (diff)
build: Include debugging symbols in Git builds
-rw-r--r--configure.ac7
1 files changed, 5 insertions, 2 deletions
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