Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jul 2019 00:23:33 +0200 (CEST)
From:      Gerald Pfeifer <gerald@pfeifer.com>
To:        Mark Linimon <linimon@lonesome.com>
Cc:        Piotr Kubaj <pkubaj@anongoth.pl>, Alexey Dokuchaev <danfe@freebsd.org>,  Cy Schubert <Cy.Schubert@cschubert.com>,  "Jason W. Bacon" <jwb@FreeBSD.org>, ports-committers@freebsd.org,  svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   USES=compiler prefers old GCC on powerpc64 and should not (was: svn commit: r504198 - head/Mk)
Message-ID:  <alpine.LSU.2.21.1907050009160.4639@anthias.pfeifer.com>
In-Reply-To: <20190704203112.GA6138@lonesome.com>
References:  <201906141610.x5EGAdnN049103@repo.freebsd.org> <F69E23F2-E526-4B3F-95EB-1786222C2D61@cschubert.com> <20190614165425.GA42674@FreeBSD.org> <8BDC3B40-7FEA-46EA-AE7C-A3C266F6978F@cschubert.com> <20190614175822.GA3336@FreeBSD.org> <20190615061345.GA20346@lonesome.com> <alpine.LSU.2.21.1906151028570.3441@anthias.pfeifer.com> <20190615084354.GA33091@ThinkPad-X200.g.anongoth.pl> <alpine.LSU.2.21.1906151058350.3441@anthias.pfeifer.com> <20190704203112.GA6138@lonesome.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Jul 2019, Mark Linimon wrote:
> Different topic.  Here's a special case:
> 
>> For example, Mk/Uses/compiler.mk has
>> 
>>   .if ${_COMPILER_ARGS:Mopenmp}
>>   .if ${COMPILER_TYPE} == clang
>>   USE_GCC=        yes
>>   CHOSEN_COMPILER_TYPE=   gcc
>>   .endif
>>   .endif
>> 
>> which means that anyone asking for compiler:openmp gets GCC 4.2,
>> unless I'm missing something.
> Yes, openmp is a special case IIUC.

openmp and several others.

What the above code from Uses/compiler.mk de facto does is this:

   if systemcompiler == clang then
      USE_GCC=yes
   else
      USE_GCC=4.2
   fi

In other words, powerpc64 users are exposed to the use of GCC 4.2 
over GCC 8 which is used on amd64 and i386.

Which, especially in case of something like OpenMP is exposing them 
to something *very* different, and very inferior.

> fwiw, there are a number of other special cases (around 50 in all) that
> are mostly disjoint with the "=any" cases.  All of these are going to
> have to be examined carefully, and have test-runs in multiple environments.

I am not proposing to touch individual ports.  I am proposing to fix 
our infrastructure to treat powerpc64 similarly to amd64/i386 when it
comes to special requirements.  That is avoid touching individual ports.

We can do so by aligning what the infrastructure does as opposed to 
having volunteers fix things port by port via the likes of

   +# Force newer GCC on platforms using GCC 4.2 as base
   +.if ${CHOSEN_COMPILER_TYPE} == gcc
   +USE_GCC=        yes
   +.endif

This will reduce the amount of code under Mk/ *and* individual ports.

Gerald



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.LSU.2.21.1907050009160.4639>