aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Overbruck <mail@duncano.de>2020-11-14 16:27:07 +0100
committerDuncan Overbruck <mail@duncano.de>2020-11-14 16:32:41 +0100
commitb3e966b7f3b921a686a7665f4b265b19c79c46f3 (patch)
treeaaeab3c7e7f3f7287b3f18c042b0c22f3fed8b34
parentdc56c2fe04e8f658a2481fba007c4422dd1cdc35 (diff)
downloadopendoas-b3e966b7f3b921a686a7665f4b265b19c79c46f3.tar.gz
configure: respect environment and make CFLAGS
-rw-r--r--GNUmakefile4
-rwxr-xr-xconfigure4
2 files changed, 3 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 9e524fc..9470202 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -5,9 +5,7 @@ SRCS= parse.y doas.c env.c
include config.mk
-CFLAGS+= -I. -Ilibopenbsd ${COPTS}
-COPTS+= -Wall -Wextra -pedantic -O2 -D_FORTIFY_SOURCE=2
-YFLAGS=
+override CFLAGS:=-I. -Ilibopenbsd -O2 -Wall -Wextra ${OS_CFLAGS} ${CFLAGS}
all: ${PROG}
diff --git a/configure b/configure
index 9592a30..1c5d989 100755
--- a/configure
+++ b/configure
@@ -153,7 +153,7 @@ BINGRP ?= ${BINGRP}
EOF
[ -n "$OS_CFLAGS" ] && \
- printf 'CFLAGS += %s\n' "$OS_CFLAGS" >>$CONFIG_MK
+ printf 'OS_CFLAGS += %s\n' "$OS_CFLAGS" >>$CONFIG_MK
[ -n "$DEBUG" ] && \
printf 'CFLAGS += -O0 -g\n' >>$CONFIG_MK
@@ -545,7 +545,7 @@ int main(void){return 0;}
__attribute__((__unused__)) static void foo(void){return;}
'
check_func "__attribute__" "$src" || {
- printf 'CFLAGS += -DNO_ATTRIBUTE_ON_RETURN_TYPE=1\n' >>$CONFIG_MK
+ printf 'OS_CFLAGS += -DNO_ATTRIBUTE_ON_RETURN_TYPE=1\n' >>$CONFIG_MK
}
auth=$(authmethod)