From owner-freebsd-toolchain@freebsd.org Mon Mar 23 17:58:27 2020 Return-Path: Delivered-To: freebsd-toolchain@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 06A0226A2AB for ; Mon, 23 Mar 2020 17:58:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-55.consmr.mail.gq1.yahoo.com (sonic307-55.consmr.mail.gq1.yahoo.com [98.137.64.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48mMYr3NFZz4bN5 for ; Mon, 23 Mar 2020 17:58:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 3JlIrisVM1nLueQRsWlpqe23IcyHrHX3DbyXMOJHBWivOS7985Ha2uotlLOKhiX qTjeXSUDSUJXmIwZEI0MeojUQQY4OAeVx8Hig0DdNzzx_mLKMgNVuquORWJFPwziSy.a77ICcLnL F5.aLD4a0qzlyftDBJ8zE9kY5F0GIY.TmpzIHp.CUWkdzu.3j2XeMaTZBBUtIq5DCdkRLLb_W__I Tn57D9oXHckCD0Dxll8D.1LwXo07_N33BQYMk1_eggtR8Dr3ru7uoKJvzI.KnJCkIxe2AifC0PlD _xlomInVh5_6_cdQIZa8EmgselUl5iRWQzDUA6PIwkfd0tpeR9jJav8LY7Yd1w.rNLmbD9w74fAv rlxgIeSi8HBTmn5n59obIOvsbskE4UnawBTSrxuSYMDE9MfrkLMOMnvePlSM0TwXw4wz6v3umsAf uViqsBxXoa8pkgcIqJRoj2chg9UUUdr_sc_WTiTIAFL8f.AwSLkFnjxtEQzS.1cK.bNXhY_HztMu lj2tEfeionsQQGmvn1_18.cVzoNcWQLqFv4tkWKPKaw9w2ylHJ8ALUm5Hulp3.elKOweDFm2PibC Fq99B2irwvXnXC8YM.afPSiykS_BvaOY_xb2llnOW4IxTLYc4H5rgwLoaUYaxQUXYuZKJJieGFig RIrygdoKZ9yS_qnheDzGqIvghFYl14l1VYLscDyiERfQ8eT9r.SE745xQQlOWzNq5MEMwksx8Cwo EOyx7kz0lkfQa_42ro06bfRElmRQYh_qIcclGEgcVPy4Zlp9jl2YCHaAaAtjNUa9o8VOdgL9ThZV SpLPLTGH51ZFGxT6yJ2O7V3y2IMYwX6JJlPGtr.uvdYg60LiItEpgxMaKBRcbD39DdfokNwAkiPP _HfoZLQ.wVu8gNFxkXb7VD9yDVpvY75GBI5JdPpkbSHCPrDEL5KnwMohJABYa3ZN4Zac8FFmtvbc 2x5MbMUlijwbd_boq6XE1hcLzwiFEEpLNTHEJdqQxmD5024WWSzER.AN0aNBgmvSkTEzyHBstumJ 8FDGGUbTzCB08DJ4GQpzXQWJDV2ptYo8z_FiDEm6Zu39GUpEtffeR.C.016es07TWGrJc6eCHvKD L5O1e.jMHd_Ffbn0m9iHtlVYDRuciKytbYo6gcePkIvkOmAP5O9ILMRodvIoRdOKEWjHybmxejfC ctAIyY5D7XdtZX0LVhBLfFZUgUmcRHfTRmRZk4W21cf38Li.uAxhmEaQCMH0Rr6dnTohz0VnC6Lv x7LHkI9KM3fJ8_Gxndj6KxZGFWijMarIVwP5QWQ93Yb42K8tatfSvgoIKG7k28lJVwwsJmmF5WgO Bv6Dx2XClTBbJAhS0ZjmA8MY9NugwWXfs558wby6L2BeCsfSvwP9dN.pbzx4VPY6N_Q1cWCChlH6 e7hTEH7xaunpmf2KMgfh5OYmmxZVGJjysFU3XdpTyf8C31RRtWzh5nJcT Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Mon, 23 Mar 2020 17:58:22 +0000 Received: by smtp403.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID bb58a9524206733e3493d3ff70e37150; Mon, 23 Mar 2020 17:58:18 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: head -r358966 on aarch64 fails to build base/gcc6: fatal error: bracket nesting level exceeded maximum of 256 From: Mark Millard In-Reply-To: Date: Mon, 23 Mar 2020 10:58:17 -0700 Cc: FreeBSD Toolchain , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <1FFE6B7C-ED7D-4BA6-B276-F401E0913BAF@yahoo.com> References: <879B19CB-5EBB-4114-8C13-199E1C2E491D.ref@yahoo.com> <879B19CB-5EBB-4114-8C13-199E1C2E491D@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48mMYr3NFZz4bN5 X-Spamd-Bar: + X-Spamd-Result: default: False [1.38 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_SPAM_MEDIUM(0.92)[0.925,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[31.64.137.98.list.dnswl.org : 127.0.5.0]; NEURAL_SPAM_LONG(0.96)[0.957,0]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (4.19), ipnet: 98.137.64.0/21(0.82), asn: 36647(0.66), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.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: Mon, 23 Mar 2020 17:58:27 -0000 On 2020-Mar-23, at 09:48, John Baldwin wrote: > On 3/20/20 11:02 PM, Mark Millard wrote: >> While trying to build base/gcc6 on aarch64 (implicitly targeting = aarch64: >> self hosted), it failed with: >>=20 >> . . . >> c++: warning: treating 'c' input as 'c++' when in C++ mode, this = behavior is deprecated [-Wdeprecated] >> = /wrkdirs/usr/ports/base/gcc6/work/gcc-6.5.0/gcc/config/aarch64/aarch64.md:= 817:10873: fatal error: bracket nesting level exceeded maximum of 256 >> = /wrkdirs/usr/ports/base/gcc6/work/gcc-6.5.0/gcc/config/aarch64/aarch64.md:= 817:10873: note: use -fbracket-depth=3DN to increase maximum nesting = level >> 116 warnings and 1 error generated. >> gmake[2]: *** [Makefile:1086: insn-attrtab.o] Error 1 >> gmake[2]: *** Waiting for unfinished jobs.... >> . . . >>=20 >> amd64 (implicitly targeting amd64: self hosted) did not have the = problem. >>=20 >> (These were just build-ability tests, no intent to install as = stands.) >>=20 >> base/binutils did not have such problems. (Actually installed on = 32-bit >> powerpc so more ports can build.) >=20 > I think the devel/freebsd-gcc* ports have a workaround for this when = being built > on aarch64. We probably need the same fix for base/gcc when the build = host is > aarch64. Looks like in devel/freebsd-gcc* such code is like: .if ${TARGETARCH} =3D=3D "armv6" || ${TARGETARCH} =3D=3D "aarch64" . if ${COMPILER_TYPE} =3D=3D clang MAKE_ARGS+=3DCXXFLAGS=3D-fbracket-depth=3D512 . endif .endif There is no armv6 flavor in FLAVORS, nor armv7. But having armv6 above but not armv7 looks a little odd. (When I later tried base/gcc6 on an armv7 it also had the problem.) Also, TARGETARCH seems to be the target, not the host. All hosts using clang get the larger bracket depth for handling the listed arm targets, if I read the above right. base/gcc6 does not use FLAVOR and has: TARGETARCH=3D ${ARCH:S/amd64/x86_64/} So, again, it looks like explicitly covering "armv7" would be appropriate for base/gcc* examples that can handle armv7 reasonably. (Unsure for gcc6.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)