Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Jan 2021 14:38:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        gnome@FreeBSD.org
Subject:   [Bug 252379] Mk/Uses/compiler.mk: remove USE_GCC=yes for compiler:openmp due to libomp.so is part of base since 11.3/12.1
Message-ID:  <bug-252379-6497-1OoSHBA9vi@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-252379-6497@https.bugs.freebsd.org/bugzilla/>
References:  <bug-252379-6497@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252379

--- Comment #17 from Jason W. Bacon <jwb@freebsd.org> ---
(In reply to Antoine Brodin from comment #16)

That strategy falls short on our goal to stop using gcc where it isn't real=
ly
needed.  We'd be using gcc on amd64 because gcc 4.2 doesn't provide c++-14 =
on
powerpc, for example.

The patch below adds a default value for CHOSEN_COMPILER_TYPE based on the
architecture, which can be overridden by compiler.mk.

Index: /usr/ports/Mk/bsd.port.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- /usr/ports/Mk/bsd.port.mk   (revision 560811)
+++ /usr/ports/Mk/bsd.port.mk   (working copy)
@@ -1141,6 +1141,15 @@
 _EXPORTED_VARS+=3D       PPC_ABI
 .endif

+.if !defined(CHOSEN_COMPILER_TYPE)
+# FIXME: Are there other archs that use gcc in base?
+.if ${ARCH} =3D=3D powerpc64 || ${ARCH} =3D=3D powerpc
+CHOSEN_COMPILER_TYPE=3Dgcc
+.else
+CHOSEN_COMPILER_TYPE=3Dclang
+.endif
+.endif
+
 # Get operating system versions for a cross build
 .if defined(CROSS_SYSROOT)
 .if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h)

I think this is a good starting point, but there may be a better place to s=
et
this or other issues to resolve.

So far biology/clang and biology/gcta both fail to build with clang.

I'll try to correct these issues and temporarily set USE_GCC unconditionall=
y as
a stop-gap if I can't resolve them quickly.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252379-6497-1OoSHBA9vi>