From: Paul Eggert Date: Wed, 7 Dec 2016 18:29:57 +0000 (-0800) Subject: Fix --enable-gcc-warnings --with-ns on Fedora X-Git-Tag: emacs-26.0.90~1179 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=220ccda78bd8e91069d373287b5d9d0fa505fcf1;p=emacs.git Fix --enable-gcc-warnings --with-ns on Fedora * src/Makefile.in (NON_OBJC_CFLAGS): New macro. (ALL_OBJC_CFLAGS): Use it. (EMACS_CFLAGS): New macro, with most of the old ALL_CFLAGS. (ALL_CFLAGS, ALL_OBJC_FLAGS): Use it. --- diff --git a/src/Makefile.in b/src/Makefile.in index dc0bfff9b33..7ca147f1eb5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -361,16 +361,13 @@ DEPFLAGS = MKDEPDIR = : endif -## DO NOT use -R. There is a special hack described in lastfile.c -## which is used instead. Some initialized data areas are modified -## at initial startup, then labeled as part of the text area when -## Emacs is dumped for the first time, and never changed again. -## -## -Demacs is needed to make some files produce the correct version -## for use in Emacs. -## -## FIXME? MYCPPFLAGS only referenced in etc/DEBUG. -ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ +# Flags that might be in WARN_CFLAGS but are not valid for Objective C. +NON_OBJC_CFLAGS = -Wignored-attributes -Wignored-qualifiers -Wopenmp-simd + +# -Demacs makes some files produce the correct version for use in Emacs. +# MYCPPFLAGS is for by-hand Emacs-specific overrides, e.g., +# "make MYCPPFLAGS='-DDBUS_DEBUG'". +EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ -I$(lib) -I$(top_srcdir)/lib \ $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ @@ -381,8 +378,11 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ $(LIBSYSTEMD_CFLAGS) \ $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ - $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS) -ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) + $(WERROR_CFLAGS) +ALL_CFLAGS = $(EMACS_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) +ALL_OBJC_CFLAGS = $(EMACS_CFLAGS) \ + $(filter-out $(NON_OBJC_CFLAGS),$(WARN_CFLAGS)) $(CFLAGS) \ + $(GNU_OBJC_CFLAGS) .SUFFIXES: .m .c.o: diff --git a/src/dbusbind.c b/src/dbusbind.c index 23392d8dcc3..08b7cc2ddf2 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -91,7 +91,7 @@ static bool xd_in_read_queued_messages = 0; } while (0) /* Macros for debugging. In order to enable them, build with - "env MYCPPFLAGS='-DDBUS_DEBUG -Wall' make". */ + "make MYCPPFLAGS='-DDBUS_DEBUG'". */ #ifdef DBUS_DEBUG #define XD_DEBUG_MESSAGE(...) \ do { \