[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
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Jan 9 14:38:52 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252379
--- Comment #17 from Jason W. Bacon <jwb at 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 really
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
===================================================================
--- /usr/ports/Mk/bsd.port.mk (revision 560811)
+++ /usr/ports/Mk/bsd.port.mk (working copy)
@@ -1141,6 +1141,15 @@
_EXPORTED_VARS+= PPC_ABI
.endif
+.if !defined(CHOSEN_COMPILER_TYPE)
+# FIXME: Are there other archs that use gcc in base?
+.if ${ARCH} == powerpc64 || ${ARCH} == powerpc
+CHOSEN_COMPILER_TYPE=gcc
+.else
+CHOSEN_COMPILER_TYPE=clang
+.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 set
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 unconditionally as
a stop-gap if I can't resolve them quickly.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-gnome
mailing list