Index: Mk/Uses/compiler.mk =================================================================== --- Mk/Uses/compiler.mk (revision 462044) +++ Mk/Uses/compiler.mk (working copy) @@ -95,11 +95,27 @@ CHOSEN_COMPILER_TYPE= ${COMPILER_TYPE} .if ${_COMPILER_ARGS:Mopenmp} -.if ${COMPILER_TYPE} == clang -USE_GCC= yes +.if ${COMPILER_TYPE} == clang && ${ARCH} == amd64 +_USES_POST+= localbase:ldflags +BUILD_DEPENDS+= llvm50>=0:devel/llvm50 +RUN_DEPENDS+= llvm50>=0:devel/llvm50 +CPP= ${LOCALBASE}/bin/clang-cpp50 +CC= ${LOCALBASE}/bin/clang50 +CXX= ${LOCALBASE}/bin/clang++50 +CHOSEN_COMPILER_TYPE= clang +.else +USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc +.if ${COMPILER_FEATURES:Mlibc++} +CXXFLAGS+= -nostdinc++ -isystem /usr/include/c++/v1 +LDFLAGS+= -L${WRKDIR} + +_USES_configure+= 200:gcc-libc++-configure +gcc-libc++-configure: + @${LN} -fs /usr/lib/libc++.so ${WRKDIR}/libstdc++.so .endif .endif +.endif .if ${_COMPILER_ARGS:Mnestedfct} .if ${COMPILER_TYPE} == clang Index: math/openblas/Makefile =================================================================== --- math/openblas/Makefile (revision 462044) +++ math/openblas/Makefile (working copy) @@ -78,6 +78,8 @@ .endif .if ${PORT_OPTIONS:MOPENMP} +# due to the Fortran dependency, we must require USE_GCC here to avoid mixing different OpenMPs for Fortran and C/C++ +USE_GCC= yes USES+= compiler:openmp BUILDFLAGS_THREAD+= USE_OPENMP=1 .endif