Skip to content

Commit

Permalink
Merge pull request #651 from cole-miller/unbreak-configure
Browse files Browse the repository at this point in the history
configure: Disable default CFLAGS from AC_PROG_CC
  • Loading branch information
cole-miller committed May 2, 2024
2 parents 582603c + 334e23e commit a4ed77b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ACLOCAL_AMFLAGS = -I m4

AM_CFLAGS += $(CODE_COVERAGE_CFLAGS)
AM_CFLAGS += $(SQLITE_CFLAGS) $(UV_CFLAGS) $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(UV_LIBS) $(PTHREAD_LIBS)
Expand All @@ -17,7 +18,7 @@ AM_LDFLAGS += $(RAFT_LIBS)
endif

if DEBUG_ENABLED
AM_CFLAGS += -g3
AM_CFLAGS += -O0
else
AM_CFLAGS += -O2
endif
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ AC_CONFIG_AUX_DIR([ac])
AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror -Wno-portability foreign])
AM_SILENT_RULES([yes])

# Without this line, AC_PROG_CC boneheadedly adds `-g -O2` to our CFLAGS.
AC_SUBST(CFLAGS, "")
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS

Expand Down

0 comments on commit a4ed77b

Please sign in to comment.