diff options
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/libast/Makefile.com | 3 | ||||
-rw-r--r-- | usr/src/lib/libc/amd64/Makefile | 5 | ||||
-rw-r--r-- | usr/src/lib/libc/i386/Makefile | 5 | ||||
-rw-r--r-- | usr/src/lib/libc/i386/Makefile.com | 7 | ||||
-rw-r--r-- | usr/src/lib/libc/inc/libc_int.h | 2 | ||||
-rw-r--r-- | usr/src/lib/libc/port/gen/ssignal.c | 23 | ||||
-rw-r--r-- | usr/src/lib/libc/port/threads/c11_thr.c | 3 | ||||
-rw-r--r-- | usr/src/lib/libc/port/threads/pthread.c | 10 | ||||
-rw-r--r-- | usr/src/lib/libc/port/threads/tls.c | 14 | ||||
-rw-r--r-- | usr/src/lib/libficl/Makefile.com | 12 | ||||
-rw-r--r-- | usr/src/lib/libm/Makefile.libm.com | 5 | ||||
-rw-r--r-- | usr/src/lib/libpp/Makefile.com | 4 | ||||
-rw-r--r-- | usr/src/lib/libshell/Makefile.com | 4 |
13 files changed, 66 insertions, 31 deletions
diff --git a/usr/src/lib/libast/Makefile.com b/usr/src/lib/libast/Makefile.com index 3ec9d8313e..46c4dad799 100644 --- a/usr/src/lib/libast/Makefile.com +++ b/usr/src/lib/libast/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # +# Copyright (c) 2019, Joyent, Inc. SHELL=/usr/bin/ksh93 @@ -738,6 +739,8 @@ CERRWARN += -_gcc=-Wno-empty-body CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-address +SMATCH=off + pics/$(MACH)/src/lib/libast/conftab.o \ pics/$(MACH64)/src/lib/libast/conftab.o := CERRWARN += -erroff=E_INIT_DOES_NOT_FIT pics/common/comp/setlocale.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile index f5c4224338..2e5b58e349 100644 --- a/usr/src/lib/libc/amd64/Makefile +++ b/usr/src/lib/libc/amd64/Makefile @@ -24,7 +24,7 @@ # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2013 Garrett D'Amore <garrett@damore.org> # Copyright 2018 Nexenta Systems, Inc. -# Copyright 2018 Joyent, Inc. +# Copyright (c) 2019, Joyent, Inc. # LIBCBASE= . @@ -1036,6 +1036,9 @@ CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) # enables ASSERT() checking in the threads portion of the library. # This is automatically enabled for DEBUG builds, not for non-debug builds. diff --git a/usr/src/lib/libc/i386/Makefile b/usr/src/lib/libc/i386/Makefile index 00376a40a1..178a2c216f 100644 --- a/usr/src/lib/libc/i386/Makefile +++ b/usr/src/lib/libc/i386/Makefile @@ -22,10 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# lib/libc/i386/Makefile -# +# Copyright (c) 2019, Joyent, Inc. LIBCBASE=../i386 diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com index e9343c2f15..69f45567b2 100644 --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -21,10 +21,10 @@ # # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 Joyent, Inc. # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2013 Garrett D'Amore <garrett@damore.org> # Copyright 2018 Nexenta Systems, Inc. -# Copyright 2018 Joyent, Inc. # LIBCDIR= $(SRC)/lib/libc @@ -1085,6 +1085,9 @@ CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-unused-function CERRWARN += -_gcc=-Wno-address +# not linted +SMATCH=off + # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) # enables ASSERT() checking in the threads portion of the library. # This is automatically enabled for DEBUG builds, not for non-debug builds. @@ -1317,7 +1320,7 @@ $(LIB_PIC): pics $$(PICS) $(POST_PROCESS_A) $(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c - $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S $(C_PICFLAGS) \ + $(CC) $(CPPFLAGS) -_smatch=off $(CTF_FLAGS) -O -S $(C_PICFLAGS) \ $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@ $(RM) $(LIBCBASE)/crt/_rtld.s diff --git a/usr/src/lib/libc/inc/libc_int.h b/usr/src/lib/libc/inc/libc_int.h index 940636b49c..0bc8a16fa0 100644 --- a/usr/src/lib/libc/inc/libc_int.h +++ b/usr/src/lib/libc/inc/libc_int.h @@ -74,7 +74,7 @@ extern "C" { typedef struct { int ci_tag; union { - int (*ci_func)(); + void *ci_func; long ci_val; char *ci_ptr; } ci_un; diff --git a/usr/src/lib/libc/port/gen/ssignal.c b/usr/src/lib/libc/port/gen/ssignal.c index 6030626b17..ce74eb2a07 100644 --- a/usr/src/lib/libc/port/gen/ssignal.c +++ b/usr/src/lib/libc/port/gen/ssignal.c @@ -25,9 +25,7 @@ */ /* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* All Rights Reserved */ /* * ssignal, gsignal: software signals @@ -54,8 +52,9 @@ ssignal(int sig, int (*action)(int)))(int) if (sig >= MINSIG && sig <= MAXSIGNUM) { savefn = sigs[sig-MINSIG]; sigs[sig-MINSIG] = action; - } else - savefn = (int(*)(int))SIG_DFL; + } else { + savefn = (int(*)(int))(uintptr_t)SIG_DFL; + } return (savefn); } @@ -66,12 +65,14 @@ gsignal(int sig) int (*sigfn)(int); if (sig < MINSIG || sig > MAXSIGNUM || - (sigfn = sigs[sig-MINSIG]) == (int(*)(int))SIG_DFL) + (sigfn = sigs[sig-MINSIG]) == (int(*)(int))(uintptr_t)SIG_DFL) { return (0); - else if (sigfn == (int(*)(int))SIG_IGN) - return (1); - else { - sigs[sig-MINSIG] = (int(*)(int))SIG_DFL; - return ((*sigfn)(sig)); + } else { + if (sigfn == (int(*)(int))(uintptr_t)SIG_IGN) { + return (1); + } else { + sigs[sig-MINSIG] = (int(*)(int))(uintptr_t)SIG_DFL; + return ((*sigfn)(sig)); + } } } diff --git a/usr/src/lib/libc/port/threads/c11_thr.c b/usr/src/lib/libc/port/threads/c11_thr.c index a33fa12743..98e72c9b04 100644 --- a/usr/src/lib/libc/port/threads/c11_thr.c +++ b/usr/src/lib/libc/port/threads/c11_thr.c @@ -195,7 +195,8 @@ thrd_create(thrd_t *thr, thrd_start_t func, void *arg) { int ret; - ret = pthread_create(thr, NULL, (void *(*)(void *))func, arg); + ret = pthread_create(thr, NULL, + (void *(*)(void *))(uintptr_t)func, arg); if (ret == 0) return (thrd_success); else if (ret == -1 && errno == EAGAIN) diff --git a/usr/src/lib/libc/port/threads/pthread.c b/usr/src/lib/libc/port/threads/pthread.c index 34b4b4c73c..dc0123361d 100644 --- a/usr/src/lib/libc/port/threads/pthread.c +++ b/usr/src/lib/libc/port/threads/pthread.c @@ -177,6 +177,14 @@ pthread_create(pthread_t *thread, const pthread_attr_t *attr, return (error); } +static void +_mutex_unlock_wrap(void *ptr) +{ + mutex_t *mp = ptr; + + (void) mutex_unlock(mp); +} + /* * pthread_once: calls given function only once. * it synchronizes via mutex in pthread_once_t structure @@ -192,7 +200,7 @@ pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) if (once->once_flag == PTHREAD_ONCE_NOTDONE) { (void) mutex_lock(&once->mlock); if (once->once_flag == PTHREAD_ONCE_NOTDONE) { - pthread_cleanup_push(mutex_unlock, &once->mlock); + pthread_cleanup_push(_mutex_unlock_wrap, &once->mlock); (*init_routine)(); pthread_cleanup_pop(0); membar_producer(); diff --git a/usr/src/lib/libc/port/threads/tls.c b/usr/src/lib/libc/port/threads/tls.c index 9822cc5367..31fd1c5368 100644 --- a/usr/src/lib/libc/port/threads/tls.c +++ b/usr/src/lib/libc/port/threads/tls.c @@ -199,13 +199,13 @@ extern int _preexec_exit_handlers(); extern void libc_init(); const Lc_interface tls_rtldinfo[] = { - {CI_VERSION, (int(*)())CI_V_CURRENT}, - {CI_ATEXIT, (int(*)())_preexec_exit_handlers}, - {CI_TLS_MODADD, (int(*)())__tls_mod_add}, - {CI_TLS_MODREM, (int(*)())__tls_mod_remove}, - {CI_TLS_STATMOD, (int(*)())__tls_static_mods}, - {CI_THRINIT, (int(*)())libc_init}, - {CI_NULL, (int(*)())NULL} + { .ci_tag = CI_VERSION, .ci_un.ci_val = CI_V_CURRENT }, + { .ci_tag = CI_ATEXIT, .ci_un.ci_func = _preexec_exit_handlers }, + { .ci_tag = CI_TLS_MODADD, .ci_un.ci_func = __tls_mod_add }, + { .ci_tag = CI_TLS_MODREM, .ci_un.ci_func = __tls_mod_remove }, + { .ci_tag = CI_TLS_STATMOD, .ci_un.ci_func = __tls_static_mods }, + { .ci_tag = CI_THRINIT, .ci_un.ci_func = libc_init }, + { .ci_tag = CI_NULL, .ci_un.ci_func = NULL } }; /* diff --git a/usr/src/lib/libficl/Makefile.com b/usr/src/lib/libficl/Makefile.com index a7f4a3f63f..b4532d2ed9 100644 --- a/usr/src/lib/libficl/Makefile.com +++ b/usr/src/lib/libficl/Makefile.com @@ -21,7 +21,7 @@ VERS=.$(MAJOR).$(MINOR) OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o \ softcore.o stack.o tools.o vm.o primitives.o unix.o utility.o \ hash.o callback.o word.o loader.o pager.o extras.o \ - loader_emu.o lz4.o + loader_emu.o pnglite.o lz4.o include $(SRC)/lib/Makefile.lib @@ -29,17 +29,19 @@ LIBS= $(DYNLIB) $(LINTLIB) FICLDIR= $(SRC)/common/ficl CSTD= $(CSTD_GNU99) +PNGLITE= $(SRC)/common/pnglite CPPFLAGS += -I.. -I$(FICLDIR) -D_LARGEFILE64_SOURCE=1 +CPPFLAGS += -I$(PNGLITE) # As variable "count" is marked volatile, gcc 4.4.4 will complain about # function argument. So we switch this warning off # for time being, till gcc 4.4.4 will be replaced. pics/vm.o := CERRWARN += -_gcc=-Wno-clobbered -LDLIBS += -luuid -lc -lm -lumem +LDLIBS += -luuid -lz -lc -lm -lumem HEADERS= $(FICLDIR)/ficl.h $(FICLDIR)/ficltokens.h ../ficllocal.h \ - $(FICLDIR)/ficlplatform/unix.h + $(FICLDIR)/ficlplatform/unix.h $(PNGLITE)/pnglite.h pics/%.o: ../softcore/%.c $(HEADERS) $(COMPILE.c) -o $@ $< @@ -61,6 +63,10 @@ pics/%.o: $(FICLDIR)/softcore/%.c $(HEADERS) $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) +pics/%.o: $(PNGLITE)/%.c $(HEADERS) + $(COMPILE.c) -o $@ $< + $(POST_PROCESS_O) + $(LINTLIB) := SRCS= ../$(LINTSRC) all: $(LIBS) diff --git a/usr/src/lib/libm/Makefile.libm.com b/usr/src/lib/libm/Makefile.libm.com index 93d071c377..dc7a353d97 100644 --- a/usr/src/lib/libm/Makefile.libm.com +++ b/usr/src/lib/libm/Makefile.libm.com @@ -11,6 +11,7 @@ # # Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# Copyright (c) 2019, Joyent, Inc. # LIBMDIR = $(SRC)/lib/libm @@ -63,6 +64,10 @@ CFLAGS64 += -_gcc=-D__C99FEATURES__ CFLAGS += -_gcc=-fno-strict-overflow CFLAGS64 += -_gcc=-fno-strict-overflow +# sparse currently has no _Complex support +CFLAGS += -_smatch=off +CFLAGS64 += -_smatch=off + $(DYNLIB) := LDLIBS += -lc $(LINTLIB) := SRCS = $(LIBMSRC)/$(LINTSRC) diff --git a/usr/src/lib/libpp/Makefile.com b/usr/src/lib/libpp/Makefile.com index 26bd897ec8..2710fe8873 100644 --- a/usr/src/lib/libpp/Makefile.com +++ b/usr/src/lib/libpp/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2019, Joyent, Inc. SHELL=/usr/bin/ksh93 @@ -104,6 +105,9 @@ CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-empty-body CERRWARN += -_gcc=-Wno-unused-value +# "pplex() parse error: turning off implications after 60 seconds" +SMATCH = off + pics/ppcall.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED pics/ppcontrol.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED pics/ppcpp.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED diff --git a/usr/src/lib/libshell/Makefile.com b/usr/src/lib/libshell/Makefile.com index 8dd5057867..b904c0fe5f 100644 --- a/usr/src/lib/libshell/Makefile.com +++ b/usr/src/lib/libshell/Makefile.com @@ -21,6 +21,7 @@ # # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, Joyent, Inc. # SHELL=/usr/bin/ksh93 @@ -161,6 +162,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-char-subscripts +# smatch gets out of memory on common/sh/macro.c +SMATCH = off + pics/sh/macro.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED pics/sh/nvdisc.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED |