From nobody Fri Nov 18 19:41:10 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NDRwq09kYz4dLf0; Fri, 18 Nov 2022 19:41:15 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NDRwp4wY3z3h3y; Fri, 18 Nov 2022 19:41:14 +0000 (UTC) (envelope-from tijl@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668800474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZF4T8n1+GTQ+DvoIUBNUfnQ2ZiVDoYWdV9yUkBkNaBw=; b=UBkd1wDMbg1p+v5da/vy9KiXDaGii+HPRiisDQM4fbiLdcUBKA0qbyY/vZ6Bm+FqhpHXC9 3J6BtIEpyKKUrXi4HqCx8v+Lzq0qx+dLEWqIVkYvxhk3/5EpJNBol+M5hCGsIuHtc/nDAD l1i9Cxl8+khR4uLSKTGb7B6daP7iEVl2sqlTvJ+LId4/J0DvSWeZgqTBrEy9oYiKZzsd3U DxFxCBiWSuHSojfkXBM0f21quWix9nCn5mFHZTl262nKon82FJcamGoMjiIio8NYbezuqz R1zqaTmBVn5X5aW5vlgmb0Tfs9WYh9618AXDX3b2+7qRLsXqIHRYGiFgmId70A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668800474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZF4T8n1+GTQ+DvoIUBNUfnQ2ZiVDoYWdV9yUkBkNaBw=; b=Ya7tO0UvBVpk3NElYNvnnqAyCgGHnYVle0l7XTYozvmoTogyn1oYJK7fxpBFKpOolYas+D e8F5S2r2SHXAAxC+k2XdqG5PCpWbu+INZSP0SV8J520BsKY3hxMSn8PvmrBh8ZdqwDk3r1 dC6JqwNVBUYnNVQs9z6SZi6BmCX9dMC07PLgfZ37S1Ll1ynId+xbB29C3oDpmACSJ0liVY 9H/36I+mfq3o9mffNbZUdaVmcFuP4F8AXXvaGUJu2i3GxzO00rpEiJ6XqPdsYqvNLrC0xL x6VU0gQXTXErQllFJz5IG+f65BJlAh6EIVhd+1GHE1w+DI5yblJ5yNlt22M2Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668800474; a=rsa-sha256; cv=none; b=MVEcLNmN1LGH4sV2GU04eJq34fkiIjrnv3OOukKAG3HpGbAtuiRzn9uWLhQNOR6x+WtUWF jyem2PGUfm20taLZjtRxCCB8/Q2G+rt9nSo8pGRHRV63BbhvBFMK8IZBybTU01SCvl/d/N 9XK/AF4vJ8Bhx7DHjlUnbNjcVJRN67SLh/7EMlGjmTetlCMH4BBfauqO/L6ebQozEecVSm XGgzlDB3R6tefeQg7GQb6YilFS5x74qwsH+QlDqbSSH41H1p8rB+eGfRpiELn0nUOtC7d0 r4Pzy7CKGsj6QaRP6+XdDfLImnn0tCZ+JcY4Ts1KBIF2FNR1GenOHN4oyKqjUA== Received: from hal.tijl.coosemans.org (unknown [IPv6:2a02:a03f:894b:4700:30b7:dc3e:28cd:5e7d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: tijl) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NDRwn4r8jz122L; Fri, 18 Nov 2022 19:41:13 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Date: Fri, 18 Nov 2022 20:41:10 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Lorenzo Salvadore , thierry@FreeBSD.org, yuri@FreeBSD.org Cc: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: Re: git: 4191c71fbd22 - main - Mk/Uses/fortran.mk: Make gfortran respect USE_GCC Message-ID: <20221118204110.5ff6c228@hal.tijl.coosemans.org> In-Reply-To: <202211162139.2AGLdojd006463@gitrepo.freebsd.org> References: <202211162139.2AGLdojd006463@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On Wed, 16 Nov 2022 21:39:50 GMT Lorenzo Salvadore wrote: > The branch main has been updated by salvadore: > > URL: https://cgit.FreeBSD.org/ports/commit/?id=4191c71fbd229e5a96382bc6fa271a1ce5668b0f > > commit 4191c71fbd229e5a96382bc6fa271a1ce5668b0f > Author: Lorenzo Salvadore > AuthorDate: 2022-11-16 14:43:40 +0000 > Commit: Lorenzo Salvadore > CommitDate: 2022-11-16 21:38:54 +0000 > > Mk/Uses/fortran.mk: Make gfortran respect USE_GCC > > Allow choosing a specific version of gfortran through USE_GCC variable. > > PR: 266196 > Approved by: thierry (fortran) > Co-authored by: thierry > --- > Mk/Uses/fortran.mk | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Mk/Uses/fortran.mk b/Mk/Uses/fortran.mk > index 09ebd62b1a0f..d335fad4dc8e 100644 > --- a/Mk/Uses/fortran.mk > +++ b/Mk/Uses/fortran.mk > @@ -14,7 +14,11 @@ fortran_ARGS= ${FORTRAN_DEFAULT} > . endif > > . if ${fortran_ARGS} == gfortran > +. if empty(USE_GCC) > _GCC_VER= ${GCC_DEFAULT:S/.//} > +. else > +_GCC_VER= ${_USE_GCC} > +. endif > BUILD_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} > RUN_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} > F77= gfortran${_GCC_VER} When I wrote this file I didn't include this because users will end up with multiple versions of GCC installed, each with its own set of runtime libraries. So they'll have programs/libraries built against different runtime libraries and those don't always work together. For instance, science/octopus is now built with GCC 11 but its dependencies like lapack are built with GCC 12. These dependencies may require features from GCC 12 runtime libraries while science/octopus programs probably (I haven't checked) load GCC 11 runtime libraries when you run them. Even if this happens to work now it may not work when the default switches to 13. I believe it's better for ports like science/octopus to have something like this in their Makefile: .if ${GCC_DEFAULT} != 11 IGNORE= This port only works with gcc 11. You can add DEFAULT_VERSIONS+=gcc=11 to /etc/make.conf .endif I noticed there's a new version of Octopus so maybe an update would fix this particular case.