From 03b01186555287366d835239a39973963e3bb581 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Thu, 19 Mar 2020 12:18:34 +0000 Subject: [PATCH] databases/mysql56-server: fix build on powerpc64 elfv2 This port doesn't build on powerpc64 with clang: Wrong types for attribute: inalloca nest noalias nocapture nonnull readnone readonly signext sret zeroext byval dereferenceable(1) dereferenceable_or_null(1) %call38 = call signext i32 @my_atomic_cas32(i32* %58, i32* %60, %union.U_32 signext %61) in function lf_hash_insert fatal error: error in backend: Broken function found, compilation aborted! cc: error: clang frontend command failed with exit code 70 (use -v to see invocation) FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-rc3-1-gc290cb61fdc) Target: powerpc64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin This issue is already reported upstream, so switch for now to GCC on powerpc64. --- databases/mysql56-server/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/databases/mysql56-server/Makefile b/databases/mysql56-server/Makefile index 4e4f698861f1..dda937c585f8 100644 --- a/databases/mysql56-server/Makefile +++ b/databases/mysql56-server/Makefile @@ -14,8 +14,8 @@ COMMENT?= Multithreaded SQL database (server) LICENSE= GPLv2 SLAVEDIRS= databases/mysql56-client -USES= bison:build cmake:noninja compiler:c11 compiler:c++11-lib \ - cpe groff:run libedit localbase perl5 shebangfix ssl +USES= bison:build cmake:noninja cpe groff:run libedit localbase \ + perl5 shebangfix ssl USE_PERL5= run @@ -135,6 +135,14 @@ FEDERATED_SUB_LIST_OFF+= FEDER="" .include +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 +USES+= compiler:gcc-c++11-lib +USE_CXXSTD= gnu++11 +.else +USES+= compiler:c++11-lang +USE_CXXSTD= gnu++98 +.endif + .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200057 SUB_LIST+= LEGACY_LIMITS="@comment " MODERN_LIMITS="" .else