From owner-freebsd-toolchain@freebsd.org Fri Dec 20 19:49:36 2019 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 12A1A1E1A97; Fri, 20 Dec 2019 19:49:36 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (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 47ffTW0kFgz4KF8; Fri, 20 Dec 2019 19:49:34 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f172.google.com with SMTP id w47so9201833qtk.4; Fri, 20 Dec 2019 11:49:34 -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=gQjlZ0wyUJrIR45MkoCYvqj+gU90HBpYeU7eEhrfixM=; b=Fx2exigUPzE9ZVv1k/oOJ/lEwoI51lweGoJg9DttUM8+ToD3a1YqJl1qqBP/zdarfG Fx8S621EzOaEL0VvWdemc/UxZ5Nwncl0DDiO/O7U792WhnCVnhCui07EhwfdWPMVTAa5 kVfkNM9pQv5AUs7X4kA6pmA4x9hJo5cJxKdbMDGKF0orQdHZT05WC3SecL9i1tvY2Iiy A3urdljxPFLHo8oSOzokjBga+Av532HhgnJWGqxnxMq+pxcGVbKrnbtp18ARNKkGDHxB uErtIEvXo2JrT9aFkchHde2SwhpVGtlX6QWUmzBwE74UNg/y8Rc3UPtErNLJSLfU8MFH cFZQ== X-Gm-Message-State: APjAAAW1rktFjM67XMVMl2SeCpQJ0lX1oh22Uh5HDbhaOJlxutqPDF3o hTXEZywE9WSBlV8XoTNqRXDAaby3 X-Google-Smtp-Source: APXvYqy3nYJK5kgMM4xL9Vw77pE+rCXW6CVW2MdhQZmVZPSqu8EdYqwtT/XOFCqU3j3e7xvOyuCrEA== X-Received: by 2002:ac8:460a:: with SMTP id p10mr12626766qtn.98.1576871373419; Fri, 20 Dec 2019 11:49:33 -0800 (PST) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com. [209.85.160.182]) by smtp.gmail.com with ESMTPSA id r37sm3447795qtj.44.2019.12.20.11.49.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2019 11:49:33 -0800 (PST) Received: by mail-qt1-f182.google.com with SMTP id j5so9166899qtq.9; Fri, 20 Dec 2019 11:49:32 -0800 (PST) X-Received: by 2002:ac8:5510:: with SMTP id j16mr13147170qtq.262.1576871372776; Fri, 20 Dec 2019 11:49:32 -0800 (PST) MIME-Version: 1.0 References: <20191220173131.GM32279@kib.kiev.ua> <20191220181534.GN32279@kib.kiev.ua> In-Reply-To: <20191220181534.GN32279@kib.kiev.ua> From: Ryan Libby Date: Fri, 20 Dec 2019 11:49:21 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: New external GCC toolchain ports/packages To: Konstantin Belousov Cc: John Baldwin , "freebsd-toolchain@FreeBSD.org" , "freebsd-current@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47ffTW0kFgz4KF8 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.160.172 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-3.68 / 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]; 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)[172.160.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-1.68)[ip: (-3.35), 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)[172.160.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-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: Fri, 20 Dec 2019 19:49:36 -0000 On Fri, Dec 20, 2019 at 10:15 AM Konstantin Belousov wrote: > > On Fri, Dec 20, 2019 at 09:51:15AM -0800, Ryan Libby wrote: > > 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. > Does changing the base type from int to u_int help ? It does not; it fails in the same way.