From owner-freebsd-ports@freebsd.org Mon Apr 8 09:59:33 2019 Return-Path: Delivered-To: freebsd-ports@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 DCCB1157AE58; Mon, 8 Apr 2019 09:59:32 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay104.isp.belgacom.be (mailrelay104.isp.belgacom.be [195.238.20.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF74A6A0C8; Mon, 8 Apr 2019 09:59:31 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2C2AgCVGqtc/3pH8lFlGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBZQKBYC9XEYEDFBOEDoh7ij4Cggw1AYl8kA8rhFEChWMjOBI?= =?us-ascii?q?BAQMBAQkBAwJtHAxCARABhHcBBSMzIxALGAICBSECAg8qHgYTG4MIgXmtP4E?= =?us-ascii?q?viRaBDoELJQGLXYF/hCM+hBwogwqCVwOKY5sjCYgDi3QmgmKRei2hMiGBVk0?= =?us-ascii?q?wCDuCbAmCDRcUgziKVT0DMIdNhmGCPwEB?= X-IPAS-Result: =?us-ascii?q?A2C2AgCVGqtc/3pH8lFlGgEBAQEBAgEBAQEHAgEBAQGBZ?= =?us-ascii?q?QKBYC9XEYEDFBOEDoh7ij4Cggw1AYl8kA8rhFEChWMjOBIBAQMBAQkBAwJtH?= =?us-ascii?q?AxCARABhHcBBSMzIxALGAICBSECAg8qHgYTG4MIgXmtP4EviRaBDoELJQGLX?= =?us-ascii?q?YF/hCM+hBwogwqCVwOKY5sjCYgDi3QmgmKRei2hMiGBVk0wCDuCbAmCDRcUg?= =?us-ascii?q?ziKVT0DMIdNhmGCPwEB?= Received: from 122.71-242-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.242.71.122]) by relay.skynet.be with ESMTP; 08 Apr 2019 11:58:19 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x389wHLJ008433; Mon, 8 Apr 2019 11:58:17 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Mon, 8 Apr 2019 11:58:16 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Mark Millard via freebsd-ports Cc: Mark Millard , Gerald Pfeifer , Steve Kargl , Dave Horsfall , Dima Pasechnik , freebsd-toolchain@freebsd.org, Andreas Tobler Subject: Re: libgcc_s.so.1, Fortran, and the world (was: FreeCAD 0.17 && /lib//libgcc_s.so.1) Message-ID: <20190408115816.11a9401c@kalimero.tijl.coosemans.org> In-Reply-To: References: <416689e6-37f9-17ec-54d8-0d224c26f30f@pinyon.org> <20190217151604.GB68620@night.db.net> <20190221180515.39c79ce6@kalimero.tijl.coosemans.org> <092b17f0-6fbf-662e-1061-403442248abd@pinyon.org> <20190222140407.2145c11e@kalimero.tijl.coosemans.org> <20190223000620.GA12700@troutmask.apl.washington.edu> <20190223183117.GA65065@night.db.net> <20190224142150.685debe4@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: CF74A6A0C8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; TAGGED_RCPT(0.00)[freebsd]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2019 09:59:33 -0000 On Sun, 7 Apr 2019 23:57:12 -0700 Mark Millard via freebsd-ports wrote: > On 2019-Apr-7, at 22:16, Gerald Pfeifer wrote: >> Hmm, I received zero feedback on this proposal, when it appeared >> important for a number of users. >>=20 >> What's your take, Andreas, Tijl (your patch essentially with a bit >> of an updated description), and toolchain? >>=20 >> Gerald >>=20 >> On Wed, 27 Feb 2019, Gerald Pfeifer wrote: >>> Hi Tijl, hi everyone, >>>=20 >>> and let me add Andreas who has been helping on the GCC side (both >>> ports, viz. his work on arm and powerpc, and upstream) and toolchain@! >>> >>> On Sun, 24 Feb 2019, T=C4=B3l Coosemans wrote: >>>> GCC_4.3.0 instead of GCC_3.3.0. The gcc commit that changed this >>>> doesn't explain why this was done, but we'll have to make the same >>>> change in FreeBSD ARM libgcc_s to be ABI compatible (since _Unwind* is >>>> part of the ABI). This isn't a blocker for the patch. >>>>=20 >>>> I emailed the patch to gerald on 2017-02-21. He responded in the usual >>>> way that he prefers patches submitted upstream and because I thought t= he >>>> patch would not be accepted upstream he proposed an alternative soluti= on >>>> where gcc would always add -rpath on FreeBSD so you didn't have to >>>> specify it on the command line. I responded this wouldn't fix the case >>>> where clang was used as a linker (e.g. to combine fortran and c++ code >>>> in one program) and that the FAQ on the gcc website said it was a bad >>>> idea for other reasons. I also said upstream might accept my patch if >>>> it was a configure option but that the gcc configure scripts are >>>> complicated and I didn't know where to add it exactly. Then silence. >>>=20 >>> To move this forward, let me include an updated version of the patch >>> Tijl shared on 2017-02-21 (which still was in my inbox/todo list) for >>> consideration for our ports collection, initially for lang/gcc8 given >>> that this is the default in the ports collection. >>>=20 >>>=20 >>> (The lang/gcc* ports actually do carry local patches, e.g. for arm or >>> powerpc or -fuse-ld=3Dlld, but you are right that I usually try to get >>> things upstream first, fixing things upstream myself when I can, or >>> asking for help. The problem in this specific case was/is that I'm >>> quite not enough into this area so cannot really assess and clearly >>> stalling over that was not good.) >>>=20 >>>=20 >>> Find patch-gfortran-libgcc attached which should simply plug into >>> lang/gcc8/files and lang/gcc8-devel/files. >>>=20 >>> Feedback very welcome! >=20 > I'm not sure the following will be considered important > for the above, but I'll note it in case. I don't think it is relevant. The patch only affects gfortran, not any C/C++ compiler, and it only affects programs that currently don't run because system libgcc_s is loaded as a dependency of some library while another library later in the dependency chain needs gcc libgcc_s. The patch fixes this case by eliminating the need for gcc libgcc_s. It does not change which libgcc_s is loaded so any problem in the system libgcc_s affects the same programs before and after the patch.