From owner-freebsd-stable@freebsd.org Tue Mar 3 07:52:53 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA9252679E7 for ; Tue, 3 Mar 2020 07:52:53 +0000 (UTC) (envelope-from timp87@gmail.com) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wq4N04ZFz3K4y for ; Tue, 3 Mar 2020 07:52:51 +0000 (UTC) (envelope-from timp87@gmail.com) Received: by mail-wr1-x443.google.com with SMTP id q8so3070313wrm.4 for ; Mon, 02 Mar 2020 23:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Wai5osSPKNkkN0qr9GgROOwIYYRHgioSwgSdHkc1YBY=; b=qtM08srdOlusNZ6SpInvqCKJwLYglaaDobQuEomQuRCl0msaei5s1ReDbo9eabBz5W VzczEHrf+swkNFpHtjNC8pbwFVaithKXPr8FeGWLtLQqRpqRAZAO7zwAaMukcORTJRZb WOKi+Xn1mwWS0tbLJsmTFeQTbm2uQF6W0sNbFgz7GP84sk7O5UZgZU/G6yGorHDoY7V5 BTAZ0bMYIIhWSKq4qMD5LP4MUflRVXX96MW+ydyhsF84pzvR7+ZBk1SaEPrGEAzW19x3 yDtA1AafvFL7KtvRTAaKhd+9/PkTLUbCfvsz+dG2+UPR2sSUmmDc/fG4qppST/nqLVP4 7USA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Wai5osSPKNkkN0qr9GgROOwIYYRHgioSwgSdHkc1YBY=; b=ctaSkx4AMfE3xSR/+HdgItp9Ef4A8SMKvPVlexAoNjBjk0F0Y8SzW4VSNlQL6UaGDT xa/VNXHXMYen3YZp3egu44IbrEWTL+kjLAFKPHTSAuQr99EN8W12N8DbkgIvud4/mOn5 V0ShJ43dKW1v1Dq/epR8U6N5A4W8Nv3rjiqPUqYd0FUPEIirL8soqBWgG8nBtDOjZg+v 7mCqPWSoKGajQL3xLvEiFiH60MOrQv2E+50t6oQpH1kDtAlj5gReGp9njBhsCwEAFfwH VeWXkfPJN8r3TKs9hPMoLTVO1SE01BILnMrtzJaHug+Oa4HKqzaBc7sHxBD+JBZAazAx +Fng== X-Gm-Message-State: ANhLgQ0uQ524H5ChWoh7fEpjzsGteLnQDtx0zZ91matGRXMP+IrRw0iW 2knhnFxiohnLoYnb6CGol1KRI+Cx9TjhSqDzI+kfVREjuWQ= X-Google-Smtp-Source: ADFU+vsOKccsLXtn5pR9gQ56Av1IjuzPHC5db8Fs45BEjH4hJg8qTYwE5NSQqg62R2U/NcT4UMOvPPYyysLeEffDNCY= X-Received: by 2002:adf:cd0a:: with SMTP id w10mr2539872wrm.171.1583221968566; Mon, 02 Mar 2020 23:52:48 -0800 (PST) MIME-Version: 1.0 From: Pavel Timofeev Date: Tue, 3 Mar 2020 10:52:37 +0300 Message-ID: Subject: Building 12-STABLE for MIPS using GCC 9.2 To: freebsd-stable stable Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48Wq4N04ZFz3K4y X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=qtM08srd; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of timp87@gmail.com designates 2a00:1450:4864:20::443 as permitted sender) smtp.mailfrom=timp87@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ip: (2.38), ipnet: 2a00:1450::/32(-2.41), asn: 15169(-1.66), country: US(-0.05)]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[3.4.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 07:52:54 -0000 Hi, I've tried to build 12-stable r358547 for MIPS using mips-gcc9-9.2.0 (gcc 6.5.0 is available but out of date and probably will be removed from ports tree in some future). 12-stable can't be compiled with such gcc version right now, so here is a list of errors and patches taken from HEAD that helped me to do build it. This is in case someone wants to do the same at least: - The first build error was: jemalloc_malloc_io.c: In function '__je_malloc_vsnprintf': jemalloc_malloc_io.c:383:2: error: case label value exceeds maximum value for type [-Werror] 383 | case '?' | 0x80: \ | ^~~~ jemalloc_malloc_io.c:595:5: note: in expansion of macro 'GET_ARG_NUMERIC' 595 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~ jemalloc_malloc_io.c:401:2: error: case label value exceeds maximum value for type [-Werror] 401 | case 'j' | 0x80: \ | ^~~~ jemalloc_malloc_io.c:595:5: note: in expansion of macro 'GET_ARG_NUMERIC' 595 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~ jemalloc_malloc_io.c:389:2: error: case label value exceeds maximum value for type [-Werror] 389 | case 'l' | 0x80: \ | ^~~~ jemalloc_malloc_io.c:595:5: note: in expansion of macro 'GET_ARG_NUMERIC' 595 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~ jemalloc_malloc_io.c:395:2: error: case label value exceeds maximum value for type [-Werror] 395 | case 'q' | 0x80: \ | ^~~~ jemalloc_malloc_io.c:595:5: note: in expansion of macro 'GET_ARG_NUMERIC' 595 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~ jemalloc_malloc_io.c:410:2: error: case label value exceeds maximum value for type [-Werror] 410 | case 'z' | 0x80: \ | ^~~~ jemalloc_malloc_io.c:595:5: note: in expansion of macro 'GET_ARG_NUMERIC' 595 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors --- jemalloc_malloc_io.o --- *** [jemalloc_malloc_io.o] Error code 1 make[4]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libc 1 error Fix from HEAD https://svnweb.freebsd.org/base?view=revision&revision=355975 - The second error was: ===> lib/libalias/modules/nbt (all) /usr/home/pavel.timofeev/mips/12/sys/netinet/libalias/alias_nbt.c: In function 'protohandler2out': /usr/home/pavel.timofeev/mips/12/sys/netinet/libalias/alias_nbt.c:127:48: error: taking address of packed member of 'struct ip' may result in an unaligned pointer value [-Werror=address-of-packed-member] 127 | return (AliasHandleUdpNbtNS(la, pip, ah->lnk, &pip->ip_src, ah->sport, | ^~~~~~~~~~~~ cc1: all warnings being treated as errors --- alias_nbt.o --- *** [alias_nbt.o] Error code 1 make[7]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libalias/modules/nbt 1 error make[7]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libalias/modules/nbt --- all_subdir_lib/libalias/modules/nbt --- *** [all_subdir_lib/libalias/modules/nbt] Error code 2 make[6]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libalias/modules 1 error make[6]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libalias/modules --- all_subdir_lib/libalias/modules --- *** [all_subdir_lib/libalias/modules] Error code 2 make[5]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libalias 1 error make[5]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libalias --- all_subdir_lib/libalias --- *** [all_subdir_lib/libalias] Error code 2 make[4]: stopped in /usr/home/pavel.timofeev/mips/12/lib 1 error make[4]: stopped in /usr/home/pavel.timofeev/mips/12/lib --- lib__L --- *** [lib__L] Error code 2 make[3]: stopped in /usr/home/pavel.timofeev/mips/12 A failure has been detected in another branch of the parallel make make[4]: stopped in /usr/home/pavel.timofeev/mips/12/sbin/ipf/libipf --- sbin/ipf/libipf__L --- *** [sbin/ipf/libipf__L] Error code 2 make[3]: stopped in /usr/home/pavel.timofeev/mips/12 2 errors Applying this commit from HEAD helped https://svnweb.freebsd.org/base?view=revision&revision=355971 - Third error was: ===> lib/libdevdctl (all) In file included from /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/consumer.cc:55: /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/event.h: In member function 'DevdCtl::Guid DevdCtl::ZfsEvent::PoolGUID() const': /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/event.h:413:20: error: implicitly-declared 'constexpr DevdCtl::Guid::Guid(const DevdCtl::Guid&)' is deprecated [-Werror=deprecated-copy] 413 | return (m_poolGUID); | ^ In file included from /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/consumer.cc:54: /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/guid.h:114:1: note: because 'DevdCtl::Guid' has user-provided 'DevdCtl::Guid& DevdCtl::Guid::operator=(const DevdCtl::Guid&)' 114 | Guid::operator=(const Guid &rhs) | ^~~~ In file included from /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/consumer.cc:55: /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/event.h: In member function 'DevdCtl::Guid DevdCtl::ZfsEvent::VdevGUID() const': /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/event.h:419:20: error: implicitly-declared 'constexpr DevdCtl::Guid::Guid(const DevdCtl::Guid&)' is deprecated [-Werror=deprecated-copy] 419 | return (m_vdevGUID); | ^ In file included from /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/consumer.cc:54: /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/guid.h:114:1: note: because 'DevdCtl::Guid' has user-provided 'DevdCtl::Guid& DevdCtl::Guid::operator=(const DevdCtl::Guid&)' 114 | Guid::operator=(const Guid &rhs) | ^~~~ In file included from /usr/home/pavel.timofeev/mips/obj/mips_ap/usr/home/pavel.timofeev/mips/12/mips.mips/tmp/usr/include/c++/v1/memory:667, from /usr/home/pavel.timofeev/mips/obj/mips_ap/usr/home/pavel.timofeev/mips/12/mips.mips/tmp/usr/include/c++/v1/list:183, from /usr/home/pavel.timofeev/mips/12/lib/libdevdctl/consumer.cc:50: /usr/home/pavel.timofeev/mips/obj/mips_ap/usr/home/pavel.timofeev/mips/12/mips.mips/tmp/usr/include/c++/v1/atomic: At global scope: /usr/home/pavel.timofeev/mips/obj/mips_ap/usr/home/pavel.timofeev/mips/12/mips.mips/tmp/usr/include/c++/v1/atomic:726:6: warning: always_inline function might not be inlinable [-Wattributes] 726 | void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp>* __a, _Tp __val, | ^~~~~~~~~~~~~~~~~~ /usr/home/pavel.timofeev/mips/obj/mips_ap/usr/home/pavel.timofeev/mips/12/mips.mips/tmp/usr/include/c++/v1/atomic:718:6: warning: always_inline function might not be inlinable [-Wattributes] 718 | void __cxx_atomic_store(volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp __val, | ^~~~~~~~~~~~~~~~~~ /usr/home/pavel.timofeev/mips/obj/mips_ap/usr/home/pavel.timofeev/mips/12/mips.mips/tmp/usr/include/c++/v1/atomic:763:5: warning: always_inline function might not be inlinable [-Wattributes] 763 | _Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp>* __a, _Tp __value, | ^~~~~~~~~~~~~~~~~~~~~ /usr/home/pavel.timofeev/mips/obj/mips_ap/usr/home/pavel.timofeev/mips/12/mips.mips/tmp/usr/include/c++/v1/atomic:753:5: warning: always_inline function might not be inlinable [-Wattributes] 753 | _Tp __cxx_atomic_exchange(volatile __cxx_atomic_base_impl<_Tp>* __a, | ^~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors --- consumer.o --- *** [consumer.o] Error code 1 make[5]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libdevdctl 1 error make[5]: stopped in /usr/home/pavel.timofeev/mips/12/lib/libdevdctl --- all_subdir_lib/libdevdctl --- *** [all_subdir_lib/libdevdctl] Error code 2 The fix is from HEAD https://svnweb.freebsd.org/base?view=revision&revision=355974 - Fourth error was: /usr/home/pavel.timofeev/mips/12/sbin/camcontrol/camcontrol.c: In function 'ataidentify': /usr/home/pavel.timofeev/mips/12/sbin/camcontrol/camcontrol.c:2377:45: error: converting a packed 'struct ata_params' pointer (alignment 1) to a 'uint16_t' {aka 'short unsigned int'} pointer (alignment 2) may re sult in an unaligned pointer value [-Werror=address-of-packed-member] 2377 | dump_data((void*)ident_buf, sizeof(struct ata_params)); | ^~~~~~~~~~ In file included from /usr/home/pavel.timofeev/mips/12/sys/cam/ata/ata_all.h:34, from /usr/home/pavel.timofeev/mips/12/sys/cam/cam_ccb.h:45, from /usr/home/pavel.timofeev/mips/12/sbin/camcontrol/camcontrol.c:56: /usr/home/pavel.timofeev/mips/12/sys/sys/ata.h:37:8: note: defined here 37 | struct ata_params { | ^~~~~~~~~~ /usr/home/pavel.timofeev/mips/12/sbin/camcontrol/camcontrol.c: In function 'atasecurity_notify': /usr/home/pavel.timofeev/mips/12/sbin/camcontrol/camcontrol.c:2486:38: warning: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Wsi zeof-pointer-memaccess] 2486 | strncpy(pass, pwd->password, sizeof(pwd->password)); | ^ cc1: all warnings being treated as errors --- camcontrol.o --- *** [camcontrol.o] Error code 1 make[6]: stopped in /usr/home/pavel.timofeev/mips/12/sbin/camcontrol 1 error make[6]: stopped in /usr/home/pavel.timofeev/mips/12/sbin/camcontrol --- camcontrol_make --- *** [camcontrol_make] Error code 2 Fix from HEAD https://svnweb.freebsd.org/base?view=revision&revision=355972 - Fifth error: ===> usr.sbin/pw (all) [35/1784] /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw.c:30:19: warning: 'rcsid' defined but not used [-Wunused-const-variable=] 30 | static const char rcsid[] = | ^~~~~ /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_conf.c:30:19: warning: 'rcsid' defined but not used [-Wunused-const-variable=] 30 | static const char rcsid[] = | ^~~~~ /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_conf.c: In function 'write_userconfig': /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_conf.c:420:38: warning: '/pw.conf' directive output may be truncated writing 8 bytes into a region of size between 1 and 1024 [-Wformat-truncation=] 420 | snprintf(cfgfile, sizeof(cfgfile), "%s/" _PW_CONF, | ^~~~~ /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_conf.c:420:41: note: format string is defined here 420 | snprintf(cfgfile, sizeof(cfgfile), "%s/" _PW_CONF, /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_conf.c:420:3: note: 'snprintf' output between 9 and 1032 bytes into a destination of size 1024 420 | snprintf(cfgfile, sizeof(cfgfile), "%s/" _PW_CONF, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 421 | conf.etcpath); | ~~~~~~~~~~~~~ /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_user.c: In function 'print_user': /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_user.c:590:2: error: this 'if' clause does not guard... [-Werror=misleading-indentation] 590 | if (pwd->pw_expire > (time_t)0 && (tptr = localtime(&pwd->pw_expire)) != NULL) | ^~ /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_user.c:592:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 592 | if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) | ^~ At top level: /usr/home/pavel.timofeev/mips/12/usr.sbin/pw/pw_user.c:31:19: warning: 'rcsid' defined but not used [-Wunused-const-variable=] 31 | static const char rcsid[] = | ^~~~~ /usr/home/pavel.timofeev/mips/12/contrib/bmake/dir.c: In function 'Dir_FindHereOrAbove': /usr/home/pavel.timofeev/mips/12/contrib/bmake/dir.c:1455:36: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=] 1455 | snprintf(try, sizeof(try), "%s/%s", dirbase, search_path); | ^ /usr/home/pavel.timofeev/mips/12/contrib/bmake/dir.c:1455:3: note: 'snprintf' output 2 or more bytes (assuming 1026) into a destination of size 1025 1455 | snprintf(try, sizeof(try), "%s/%s", dirbase, search_path); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors --- pw_user.o --- *** [pw_user.o] Error code 1 make[4]: stopped in /usr/home/pavel.timofeev/mips/12/usr.sbin/pw 1 error The fix from HEAD https://svnweb.freebsd.org/base?view=revision&revision=348282 - Sixth error /usr/home/pavel.timofeev/mips/12/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c: In function 'ar5210GetTxDescLinkPtr': /usr/home/pavel.timofeev/mips/12/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c:671:13: error: taking address of packed member of 'struct ar5210_desc' may result in an unaligned pointer value [-Werror=address-of-packe d-member] 671 | *linkptr = &ads->ds_link; | ^~~~~~~~~~~~~ cc1: all warnings being treated as errors --- ar5210_xmit.o --- *** [ar5210_xmit.o] Error code 1 make[4]: stopped in /usr/home/pavel.timofeev/mips/12/sys/modules/ath_hal_ar5210 1 error Fix from HEAD https://svnweb.freebsd.org/base?view=revision&revision=355970 I do not know the policy about GCC architectures, but it would be great to make them buildable with GCC version up to date.