From e6615f1000c4c6e6b8e18bdc6b077002bdd22526 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Sat, 14 Sep 2019 09:57:13 +0000 Subject: 11684 shadow compilers dislike glib2 2.62 Reviewed by: Toomas Soome Reviewed by: Dominik Hassler Approved by: Dan McDonald --- usr/src/cmd/hal/Makefile.hal | 7 +++++++ usr/src/cmd/latencytop/Makefile.com | 19 +++++++++---------- usr/src/cmd/policykit/Makefile | 11 +++++++++++ usr/src/lib/policykit/libpolkit/Makefile.com | 19 +++++++++++-------- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/usr/src/cmd/hal/Makefile.hal b/usr/src/cmd/hal/Makefile.hal index 7e03986055..1b353b62df 100644 --- a/usr/src/cmd/hal/Makefile.hal +++ b/usr/src/cmd/hal/Makefile.hal @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # Definitions common for HAL code and consumers # @@ -74,5 +75,11 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-address CERRWARN += -_gcc=-Wno-unused-function +# glib2 >= 2.62 suppresses warnings about deprecated declarations in header +# files using pragma "GCC diagnostic ignored \"-Wdeprecated-declarations\"" +# This is not supported before GCC 4.6 so just globally suppress these +# warnings under the shadow compiler +CERRWARN += -_gcc4=-Wno-deprecated-declarations + # not linted SMATCH=off diff --git a/usr/src/cmd/latencytop/Makefile.com b/usr/src/cmd/latencytop/Makefile.com index 75f7efef16..cc547f618f 100644 --- a/usr/src/cmd/latencytop/Makefile.com +++ b/usr/src/cmd/latencytop/Makefile.com @@ -23,6 +23,7 @@ # All Rights Reserved. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. PROG = latencytop OBJS = latencytop.o display.o dwrapper.o klog.o stat.o table.o util.o @@ -35,7 +36,14 @@ CFLAGS64 += $(CCVERBOSE) CERRWARN += $(CNOWARN_UNINIT) -SMOFF += all_func_returns +# glib2 >= 2.62 suppresses warnings about deprecated declarations in header +# files using pragma "GCC diagnostic ignored \"-Wdeprecated-declarations\"" +# This is not supported before GCC 4.6 so just globally suppress these +# warnings under the shadow compiler +CERRWARN += -_gcc4=-Wno-deprecated-declarations + +# smatch has problems parsing the glib header files +SMATCH=off CPPFLAGS += -DEMBED_CONFIGS -I$(ADJUNCT_PROTO)/usr/include/glib-2.0 \ -I$(ADJUNCT_PROTO)/usr/lib/glib-2.0/include @@ -43,13 +51,6 @@ CSTD = $(CSTD_GNU99) LDLIBS += -lcurses -ldtrace all install := LDLIBS += -lglib-2.0 -LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 -LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 -LINTFLAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2 -LINTFLAGS64 += -erroff=E_NAME_USED_NOT_DEF2 -LINTFLAGS64 += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 -LINTFLAGS64 += -erroff=E_FUNC_RET_MAYBE_IGNORED2 - FILEMODE = 0555 ELFWRAP = elfwrap @@ -81,8 +82,6 @@ latencytop_trans: clean: $(RM) $(CLEANFILES) -lint: lint_SRCS - %.o: ../common/%.c $(COMPILE.c) $< diff --git a/usr/src/cmd/policykit/Makefile b/usr/src/cmd/policykit/Makefile index 0388c9fa5a..8bff90c63e 100644 --- a/usr/src/cmd/policykit/Makefile +++ b/usr/src/cmd/policykit/Makefile @@ -22,6 +22,8 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG = polkit-is-privileged @@ -40,6 +42,15 @@ CSTD = $(CSTD_GNU99) CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-unused-function +# glib2 >= 2.62 suppresses warnings about deprecated declarations in header +# files using pragma "GCC diagnostic ignored \"-Wdeprecated-declarations\"" +# This is not supported before GCC 4.6 so just globally suppress these +# warnings under the shadow compiler +CERRWARN += -_gcc4=-Wno-deprecated-declarations + +# smatch has problems parsing the glib header files +SMATCH=off + ROOTUSRSBINPROG = $(PROG:%=$(ROOTUSRSBIN)/%) .KEEP_STATE: diff --git a/usr/src/lib/policykit/libpolkit/Makefile.com b/usr/src/lib/policykit/libpolkit/Makefile.com index 0fb2f8a7f6..abb0c6891f 100644 --- a/usr/src/lib/policykit/libpolkit/Makefile.com +++ b/usr/src/lib/policykit/libpolkit/Makefile.com @@ -22,10 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# usr/src/lib/policykit/libpolkit/Makefile.com -# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. LIBRARY = libpolkit.a VERS = .0.0.0 @@ -35,10 +32,9 @@ LIBPCSRC = polkit.pc include ../../Makefile.com -LIBS = $(DYNLIB) $(LINTLIB) +LIBS = $(DYNLIB) LDLIBS += $(POLICYKIT_GLIB_LDLIBS) LDLIBS += -lc -lsecdb -$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) SRCDIR = ../common @@ -47,12 +43,19 @@ CPPFLAGS += -DPACKAGE_LOCALE_DIR=\"/usr/lib/locale\" ROOTMAJLINK = $(ROOTLIBDIR)/$(LIBRARY:.a=.so)$(VERS_MAJ) +# glib2 >= 2.62 suppresses warnings about deprecated declarations in header +# files using pragma "GCC diagnostic ignored \"-Wdeprecated-declarations\"" +# This is not supported before GCC 4.6 so just globally suppress these +# warnings under the shadow compiler +CERRWARN += -_gcc4=-Wno-deprecated-declarations + +# smatch has problems parsing the glib header files +SMATCH=off + .KEEP_STATE: all: $(LIBS) -lint: - $(ROOTMAJLINK): -$(RM) $@; $(SYMLINK) $(DYNLIB) $@ -- cgit v1.2.3