* [PATCH] build system: choose gnu99 as a C standard
@ 2016-09-21 23:15 David Bremner
2016-09-22 7:56 ` Tomi Ollila
2016-09-22 10:25 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: David Bremner @ 2016-09-21 23:15 UTC (permalink / raw)
To: notmuch
Apparently pre 5.1 gcc defaulted to gnu89, but we decided it was ok to
use some c99 features.
'-std=c99' by itself is not enough for notmuch to compile.
'-std=gnu99' seems to work with clang and gcc, so I'm not convinced
configuration support is needed.
---
Our use of c99 loop variable declarations breaks the build on travis,
because old gcc defaults to c89+extensions
Makefile.local | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.local b/Makefile.local
index 5587cd2..d1b0585 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -44,7 +44,8 @@ GPG_FILE=$(SHA1_FILE).asc
PV_FILE=bindings/python/notmuch/version.py
# Smash together user's values with our extra values
-FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
+STD_CFLAGS := -std=gnu99
+FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(STD_CFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch
ifeq ($(LIBDIR_IN_LDCONFIG),0)
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] build system: choose gnu99 as a C standard
2016-09-21 23:15 [PATCH] build system: choose gnu99 as a C standard David Bremner
@ 2016-09-22 7:56 ` Tomi Ollila
2016-09-22 10:25 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2016-09-22 7:56 UTC (permalink / raw)
To: David Bremner, notmuch
On Thu, Sep 22 2016, David Bremner <david@tethera.net> wrote:
> Apparently pre 5.1 gcc defaulted to gnu89, but we decided it was ok to
> use some c99 features.
>
> '-std=c99' by itself is not enough for notmuch to compile.
>
> '-std=gnu99' seems to work with clang and gcc, so I'm not convinced
> configuration support is needed.
agreed. works. +1
Tomi
> ---
>
> Our use of c99 loop variable declarations breaks the build on travis,
> because old gcc defaults to c89+extensions
>
> Makefile.local | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.local b/Makefile.local
> index 5587cd2..d1b0585 100644
> --- a/Makefile.local
> +++ b/Makefile.local
> @@ -44,7 +44,8 @@ GPG_FILE=$(SHA1_FILE).asc
> PV_FILE=bindings/python/notmuch/version.py
>
> # Smash together user's values with our extra values
> -FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
> +STD_CFLAGS := -std=gnu99
> +FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(STD_CFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
> FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
> FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch
> ifeq ($(LIBDIR_IN_LDCONFIG),0)
> --
> 2.9.3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] build system: choose gnu99 as a C standard
2016-09-21 23:15 [PATCH] build system: choose gnu99 as a C standard David Bremner
2016-09-22 7:56 ` Tomi Ollila
@ 2016-09-22 10:25 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2016-09-22 10:25 UTC (permalink / raw)
To: notmuch
David Bremner <david@tethera.net> writes:
> Apparently pre 5.1 gcc defaulted to gnu89, but we decided it was ok to
> use some c99 features.
>
> '-std=c99' by itself is not enough for notmuch to compile.
>
> '-std=gnu99' seems to work with clang and gcc, so I'm not convinced
> configuration support is needed.
> ---
pushed.
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-22 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 23:15 [PATCH] build system: choose gnu99 as a C standard David Bremner
2016-09-22 7:56 ` Tomi Ollila
2016-09-22 10:25 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).