aboutsummaryrefslogtreecommitdiff
path: root/auto.def
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-03-02 08:35:45 +1000
committerSteve Bennett <steveb@workware.net.au>2023-03-20 08:19:51 +1000
commit56339de8502e8838b825453668c7388bbc0d448b (patch)
treea50c96fef23b29b6dfbf81a5fce99bcff2d5f5d9 /auto.def
parentd9b7db7fc6dfffc066b521b672b2bd7c7ff212db (diff)
downloadjimtcl-56339de8502e8838b825453668c7388bbc0d448b.zip
jimtcl-56339de8502e8838b825453668c7388bbc0d448b.tar.gz
jimtcl-56339de8502e8838b825453668c7388bbc0d448b.tar.bz2
build: define _GNU_SOURCE only on the command line
Not in source files See https://ariadne.space/2021/12/21/stop-defining-feature-test-macros-in-your-code/ Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'auto.def')
-rw-r--r--auto.def2
1 files changed, 2 insertions, 0 deletions
diff --git a/auto.def b/auto.def
index e9d6002..36ab1e3 100644
--- a/auto.def
+++ b/auto.def
@@ -209,6 +209,8 @@ cc-check-sizeof int
# Default optimisation
define-append AS_CPPFLAGS -O2
+define-append AS_CPPFLAGS -D_GNU_SOURCE
+
# check, but don't add to -cflags
cc-with {} {
cc-check-flags -fno-unwind-tables -fno-asynchronous-unwind-tables