USES=compiler prefers old GCC on powerpc64 and should not (was: svn commit: r504198 - head/Mk)
Gerald Pfeifer
gerald at pfeifer.com
Thu Jul 4 22:23:45 UTC 2019
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
More information about the svn-ports-all
mailing list