From owner-freebsd-toolchain@freebsd.org Sat Apr 27 11:01:26 2019 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8728158F0DD for ; Sat, 27 Apr 2019 11:01:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from springbank.echomania.com (springbank.echomania.com [IPv6:2a01:7c8:aab2:81::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "springbank.echomania.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 502F581F79; Sat, 27 Apr 2019 11:01:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) X-Virus-Scanned: Debian amavisd-new at springbank.echomania.com Received: from [IPv6:2001:470:7a58::899a:b9e0:4e4e:8826] (unknown [IPv6:2001:470:7a58:0:899a:b9e0:4e4e:8826]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by springbank.echomania.com (Postfix) with ESMTPSA id 828E95800F9; Sat, 27 Apr 2019 13:01:22 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_DC4B1775-4E06-438D-A1ED-F0CF96BA6928"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: stable/11 discards const qualifiers Date: Sat, 27 Apr 2019 13:01:16 +0200 In-Reply-To: Cc: FreeBSD Toolchain , Ed Maste To: Dmitry Chagin References: X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: 502F581F79 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:20857, ipnet:2a01:7c8::/32, country:NL]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Apr 2019 11:01:26 -0000 --Apple-Mail=_DC4B1775-4E06-438D-A1ED-F0CF96BA6928 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 25 Apr 2019, at 16:01, Dmitry Chagin wrote: > > I'm trying to merge r331056, r331057, r331060, r331356,(by emaste@) to the > stable/11 and get the following error: > > ===> linux (all) > cc -O2 -pipe -DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 -fno-strict-aliasing > -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS > -include > /usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/sys/GENERIC/opt_global.h > -I. -I/usr/home/dchagin/freebsd/sys -fno-common -g -fno-omit-frame-pointer > -mno-omit-leaf-frame-pointer > -I/usr/home/dchagin/tmp/obj/usr/home/dchagin/freebsd/sys/GENERIC -MD > -MF.depend.linux32_sysvec.o -MTlinux32_sysvec.o -mcmodel=kernel > -mno-red-zone -mno-mmx -mno-sse -msoft-float > -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector > -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs > -fdiagnostics-show-option -Wno-unknown-pragmas > -Wno-error-tautological-compare -Wno-error-empty-body > -Wno-error-parentheses-equality -Wno-error-unused-function > -Wno-error-pointer-sign -Wno-error-shift-negative-value > -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 > -c /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c -o > linux32_sysvec.o > /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c:322:29: > warning: taking address of packed member 'uc_sigmask' of class or structure > 'l_ucontext' may result in an unaligned pointer value > [-Waddress-of-packed-member] > bsd_to_linux_sigset(mask, &frame.sf_sc.uc_sigmask); > ^~~~~~~~~~~~~~~~~~~~~~ > /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c:639:23: > warning: taking address of packed member 'uc_sigmask' of class or structure > 'l_ucontext' may result in an unaligned pointer value > [-Waddress-of-packed-member] > linux_to_bsd_sigset(&uc.uc_sigmask, &bmask); > ^~~~~~~~~~~~~ > /usr/home/dchagin/freebsd/sys/amd64/linux32/linux32_sysvec.c:912:15: error: > initializing 'int *' with an expression of type 'const int []' discards > qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] > .sv_errtbl = linux_errtbl, > ^~~~~~~~~~~~ > 2 warnings and 1 error generated. > *** Error code 1 > > Is I'm missing something? Yes, please also merge r329787: ------------------------------------------------------------------------ r329787 | emaste | 2018-02-22 02:59:59 +0100 (Thu, 22 Feb 2018) | 6 lines Use 'const int *' for sysentvec errno translation table This allows an sv_errtbl to be read-only .rodata. Sponsored by: Turing Robotic Industries Inc. Index: sys/sys/sysent.h =================================================================== --- sys/sys/sysent.h (revision 329786) +++ sys/sys/sysent.h (revision 329787) @@ -94,7 +94,7 @@ struct sysentvec { struct sysent *sv_table; /* pointer to sysent */ u_int sv_mask; /* optional mask to index */ int sv_errsize; /* size of errno translation table */ - int *sv_errtbl; /* errno translation table */ + const int *sv_errtbl; /* errno translation table */ int (*sv_transtrap)(int, int); /* translate trap-to-signal mapping */ int (*sv_fixup)(register_t **, struct image_params *); ------------------------------------------------------------------------ -Dimitry --Apple-Mail=_DC4B1775-4E06-438D-A1ED-F0CF96BA6928 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXMQ2fAAKCRCwXqMKLiCW o1YAAKDHzIut0s5UsN2f9jQEFR12DEv8LQCgucRD0R/QseYXa/gcAanuP5iS99Q= =LxnF -----END PGP SIGNATURE----- --Apple-Mail=_DC4B1775-4E06-438D-A1ED-F0CF96BA6928--