From owner-freebsd-current@freebsd.org Fri Dec 20 17:51:29 2019 Return-Path: Delivered-To: freebsd-current@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 406D41DFAD7; Fri, 20 Dec 2019 17:51:29 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (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 47fbsD3Gyvz4Dlr; Fri, 20 Dec 2019 17:51:28 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f193.google.com with SMTP id 21so8335128qky.4; Fri, 20 Dec 2019 09:51:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fE8uAvfzz9vB5fa/2XqP3RUnegUBbSdfEEL729RXOlE=; b=Dj0yZcctdEZj293E6S77nS8IkjvCWgKibnQLBqjIGeMdxDBz2HqgmEzWBYOW5l4NtD BFWln0zlJopO4/hX43/A+I3fJfLhUaLEmXqOn8jUBIWEs/yOni5twspmru9M3lrFqXnm XOBTwjXlWw4q1b0o6Kjc2YwjM8NuJwYDqKi/O+EDEvrt1Bm14bDA7LcM8x85WJA6IQhU b6NoBURDOETuHMhkzyhMsmAI5aTw8dAzXvZaLws4c6+4J7FZsZXZF+axwxG3hR1WA53t dcvgjhQZ5j2i0hEl/37g6N6dV6INzEGjIvetNhlZp+3U6sQr8l28Bk8wqF+GbfooBYQT VEmA== X-Gm-Message-State: APjAAAXNXiC9h/Abk+o9+EXM3YZmolCUchKi4U/srIpiOMOUQUgQIo5N kPj/+QGific9OMc0xJNJYEqTfxnl X-Google-Smtp-Source: APXvYqz4LZJPdTjC80Mye5d4hkTccTzcD4nS3IbG46hjkV1d0Lz5d7WvLddCDXald8fHXJ2cZIyN9Q== X-Received: by 2002:a05:620a:6ce:: with SMTP id 14mr14235839qky.417.1576864286702; Fri, 20 Dec 2019 09:51:26 -0800 (PST) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com. [209.85.222.178]) by smtp.gmail.com with ESMTPSA id e19sm3366000qtc.75.2019.12.20.09.51.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2019 09:51:26 -0800 (PST) Received: by mail-qk1-f178.google.com with SMTP id 21so8335058qky.4; Fri, 20 Dec 2019 09:51:26 -0800 (PST) X-Received: by 2002:a37:e10f:: with SMTP id c15mr14665056qkm.331.1576864286009; Fri, 20 Dec 2019 09:51:26 -0800 (PST) MIME-Version: 1.0 References: <20191220173131.GM32279@kib.kiev.ua> In-Reply-To: <20191220173131.GM32279@kib.kiev.ua> From: Ryan Libby Date: Fri, 20 Dec 2019 09:51:15 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: New external GCC toolchain ports/packages To: Konstantin Belousov , John Baldwin Cc: "freebsd-toolchain@FreeBSD.org" , "freebsd-current@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47fbsD3Gyvz4Dlr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.222.193 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-4.39 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[193.222.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-2.39)[ip: (-6.91), ipnet: 209.85.128.0/17(-3.12), asn: 15169(-1.89), country: US(-0.05)]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[193.222.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 17:51:29 -0000 On Fri, Dec 20, 2019 at 9:31 AM Konstantin Belousov wrote: > > On Fri, Dec 20, 2019 at 09:24:00AM -0800, John Baldwin wrote: > > On 12/19/19 12:06 PM, Ryan Libby wrote: > > > On Wed, Dec 18, 2019 at 1:49 PM John Baldwin wrote: > > >> > > >> In the interest of supporting newer versions of GCC for a base system > > >> toolchain, I've renamed the external GCC packages from -gcc > > >> to -gcc6. These are built as flavors of a new devel/freebsd-gcc6 > > >> port. The xtoolchain package is not used for these new packages, instead > > >> one does 'pkg install mips-gcc6' to get the GCC 6.x MIPS compiler and > > >> uses 'CROSS_TOOLCHAIN=mips-gcc6'. I've also gone ahead and updated this > > >> compiler to 6.5.0. > > >> > > >> I will leave the old ports/packages around for now to permit an easy > > >> transition, but going forward, the -gcc6 packages should be preferred > > >> to -xtoolchain-gcc for all but riscv (riscv64-gcc and riscv64-xtoolchain-gcc > > >> are separate from the powerpc64-gcc set of packages). > > >> > > >> In addition, I've also just added a devel/freebsd-gcc9 package which > > >> builds -gcc9 packages. It adds powerpc and riscv flavors relative > > >> to freebsd-gcc6 and uses GCC 9.2.0. To date in my testing I've yet to > > >> be able to finish a buildworld on any of the platforms I've tried > > >> (amd64, mips, sparc64), but the packages should permit other developers > > >> to get the tree building with GCC 9. To use these packages one would do > > >> something like: > > >> > > >> # pkg install amd64-gcc9 > > >> # make buildworld CROSS_TOOLCHAIN=amd64-gcc9 > > >> > > >> You can install both the gcc6 and gcc9 versions of a package at the same > > >> time, e.g. amd64-gcc6 and amd64-gcc9. Having different packages for major > > >> versions is similar to llvm and will also let us keep a known-good > > >> toolchain package for older releases while using newer major versions on > > >> newer FreeBSD releases (e.g gcc9 for 13.0 and gcc6 for 12.x). > > >> > > >> I do plan to switch the default toolchains for make universe/tinderbox > > >> for targets using -xtoolchain-gcc based on GCC 6 over to the > > >> freebsd-gcc6 variants in the next week or so. > > >> > > >> -- > > >> John Baldwin > > > > > > Awesome, thanks! I was able to get amd64 buildworld and buildkernel to > > > succeed with just a few changes, and none to the port. I'll work on > > > getting the changes in. > > > > I have been able to get it building as well, mostly by muting a few > > warnings, adding libcompiler_rt to rtld's link for i386, disabling > I am curious about the rtld issue. Can you show me the pristine error with > gcc, please ? For me, it's gcc generates __udivmoddi4 for the -m32 build but we used -nostdlib, and we get a link error. My hack right now is to explicitly link libgcc, but I don't think this is what we are intending to do because we seem to go through effort to reimplement other libgcc functions. Here's the text: --- ld-elf32.so.1.full --- /usr/local/bin/x86_64-unknown-freebsd13.0-ld: rtld_printf.o: in function `ksprintn': /usr/src/freebsd/libexec/rtld-elf/rtld_printf.c:115: undefined reference to `__udivmoddi4' /usr/local/bin/x86_64-unknown-freebsd13.0-ld: /usr/src/freebsd/libexec/rtld-elf/rtld_printf.c:117: undefined reference to `__udivmoddi4' collect2: error: ld returned 1 exit status *** [ld-elf32.so.1.full] Error code 1 You can see my hack at the link below. I'm not sure what the right solution is. > > > googletest (needs an upstream patch to stop using signed wchar_t), > > and a hack to jemalloc. I was able to build riscv as well with those > > same changes and am working through builds of other platforms. > > Actually, both those have upstream fixes. (For the jemalloc one, gcc is technically right, but because of a literal signed char argument to a macro.) > > I'm happy to compare notes. The jemalloc one is a bit weird. I pushed non-polished changes here. I'm working to get them reviewed. Please feel free to comment on any/all. https://github.com/rlibby/freebsd/commits/gcc9-fixes > > > > -- > > John Baldwin > > _______________________________________________ > > freebsd-toolchain@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > > To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org"