Index: head/Mk/bsd.default-versions.mk =================================================================== --- head/Mk/bsd.default-versions.mk (revision 505424) +++ head/Mk/bsd.default-versions.mk (revision 505425) @@ -1,140 +1,142 @@ # $FreeBSD$ # # MAINTAINER: ports@FreeBSD.org # # Provide default versions for ports with multiple versions selectable # by the user. # # Users who want to override these defaults can easily do so by defining # DEFAULT_VERSIONS in their make.conf as follows: # # DEFAULT_VERSIONS= perl5=5.20 ruby=2.0 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes LOCALBASE?= /usr/local .for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT \ JULIA LAZARUS LINUX LLVM LUA MYSQL PERL5 PGSQL PHP PYTHON PYTHON2 \ PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH .if defined(${lang}_DEFAULT) ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" .endif #.undef ${lang}_DEFAULT .endfor .for lang in ${DEFAULT_VERSIONS} _l= ${lang:C/=.*//g} ${_l:tu}_DEFAULT= ${lang:C/.*=//g} .endfor # Possible values: 2.4 APACHE_DEFAULT?= 2.4 # Possible values: 48, 5, 6 BDB_DEFAULT?= 5 # Possible values: 2, 3 COROSYNC_DEFAULT?= 2 # Possible_values: full canna nox devel_full devel_nox #EMACS_DEFAULT?= let the flavor be the default if not explicitly set # Possible values: 2.5 FIREBIRD_DEFAULT?= 2.5 # Possible values: flang (experimental), gfortran FORTRAN_DEFAULT?= gfortran # Possible values: 3.0.4 FPC_DEFAULT?= 3.0.4 # Possible values: 7, 8, 9 GCC_DEFAULT?= 8 # Possible values: 7, 8, 9, agpl GHOSTSCRIPT_DEFAULT?= agpl # Possible values: 0.6, 0.7, 1.0, 1.1 JULIA_DEFAULT?= 1.0 # Possible values: 2.0.0 LAZARUS_DEFAULT?= 2.0.0 .if ${ARCH} == amd64 # Possible values: c6, c6_64, c7 LINUX_DEFAULT?= c6_64 .else # Possible values: c6 LINUX_DEFAULT?= c6 .endif # Possible values: 60, 70, 80, -devel (to be used when non-base compiler is required) +# Please give notice to the Graphics Team (x11@FreeBSD.org) in advance before +# bumping the LLVM version. LLVM_DEFAULT?= 80 # Possible values: 5.1, 5.2, 5.3 LUA_DEFAULT?= 5.2 # Possible values: 5.5, 5.6, 5.7, 8.0, 5.5m, 10.0m, 10.1m, 10.2m, 10.3m, 5.5p, 5.6p, 5.7p, 5.6w MYSQL_DEFAULT?= 5.6 # Possible values: 5.26, 5.28, 5.30, devel .if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) PERL5_DEFAULT?= 5.28 .elif !defined(PERL5_DEFAULT) # There's no need to replace development versions, like "5.23" with "devel" # because 1) nobody is supposed to use it outside of poudriere, and 2) it must # be set manually in /etc/make.conf in the first place, and we're never getting # in here. .if !defined(_PERL5_FROM_BIN) _PERL5_FROM_BIN!= ${LOCALBASE}/bin/perl -e 'printf "%vd\n", $$^V;' .endif _EXPORTED_VARS+= _PERL5_FROM_BIN PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R} .endif # Possible values: 9.4, 9.5, 9.6, 10, 11 PGSQL_DEFAULT?= 9.5 # Possible values: 7.1, 7.2, 7.3 PHP_DEFAULT?= 7.2 # Possible values: 2.7, 3.5, 3.6, 3.7 PYTHON_DEFAULT?= 3.6 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 # Possible values: 3.5, 3.6, 3.7 PYTHON3_DEFAULT?= 3.6 # Possible values: 2.4, 2.5, 2.6 RUBY_DEFAULT?= 2.5 # Possible values: rust, rust-nightly RUST_DEFAULT?= rust # Possible values: 4.6, 4.7, 4.8 SAMBA_DEFAULT?= 4.8 # Possible values: base, openssl, openssl111, libressl, libressl-devel .if !defined(SSL_DEFAULT) # If no preference was set, check for an installed base version # but give an installed port preference over it. . if !defined(SSL_DEFAULT) && \ !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ exists(${DESTDIR}/usr/include/openssl/opensslv.h) SSL_DEFAULT= base . else . if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) . if defined(PKG_BIN) # find installed port and use it for dependency . if !defined(OPENSSL_INSTALLED) . if defined(DESTDIR) PKGARGS= -c ${DESTDIR} . else PKGARGS= . endif OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || : . endif . if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) SSL_DEFAULT:= ${OPENSSL_INSTALLED:T} WARNING+= "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf" . endif . else check-makevars:: @${ECHO_MSG} "You have a ${LOCALBASE}/lib/libcrypto.so file installed, but the framework is unable" @${ECHO_MSG} "to determine what port it comes from." @${ECHO_MSG} "Add DEFAULT_VERSIONS+=ssl= to your /etc/make.conf and try again." @${FALSE} . endif . endif . endif # Make sure we have a default in the end SSL_DEFAULT?= base .endif # Possible values: 8.5, 8.6, 8.7 TCLTK_DEFAULT?= 8.6 # Possible values: 4, 6 VARNISH_DEFAULT?= 4 .endif Index: head/devel/libclc/Makefile =================================================================== --- head/devel/libclc/Makefile (revision 505424) +++ head/devel/libclc/Makefile (revision 505425) @@ -1,44 +1,41 @@ # Created by: Koop Mast # $FreeBSD$ PORTNAME= libclc DISTVERSION= 0.3.0.20180518 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MAINTAINER= x11@FreeBSD.org COMMENT= Required library functions for OpenCL C programming language LICENSE= BSD3CLAUSE MIT LICENSE_COMB= dual LICENSE_FILE= ${WRKSRC}/LICENSE.TXT -BUILD_DEPENDS= llvm${LLVMVER}>=4.0:devel/llvm${LLVMVER} \ +BUILD_DEPENDS= llvm${LLVM_DEFAULT}>=4.0:devel/llvm${LLVM_DEFAULT} \ libedit>=0:devel/libedit USE_GITHUB= yes GH_ACCOUNT= llvm-mirror GH_TAGNAME= a2118d5 # ninja based build is broken since commit 598792bc (16 sep 2016) USES= gmake python:2.7,build gmake USE_LDCONFIG= yes MAKE_ENV= MAKE=${GMAKE} DESTDIR=${STAGEDIR} - -LLVMVER= ${MESA_LLVM_VER:U60} - ALL_TARGET= post-patch: @${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|g' \ -e 's|"python |"${PYTHON_VERSION} |g' \ ${WRKSRC}/build/ninja_syntax.py \ ${WRKSRC}/configure.py do-configure: @cd ${WRKSRC} && ${PYTHON_CMD} configure.py ${CONFIGURE_ARGS} -g make \ - --with-llvm-config=${LOCALBASE}/bin/llvm-config${LLVMVER} \ + --with-llvm-config=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} \ --pkgconfigdir=${PREFIX}/libdata/pkgconfig \ --prefix=${PREFIX} .include Index: head/devel/libclc/files/patch-62a9191.c =================================================================== --- head/devel/libclc/files/patch-62a9191.c (nonexistent) +++ head/devel/libclc/files/patch-62a9191.c (revision 505425) @@ -0,0 +1,73 @@ +From 62a9191b606abdab8e2607d945628fa90d9664c1 Mon Sep 17 00:00:00 2001 +From: Jan Vesely +Date: Fri, 3 Aug 2018 15:14:08 +0000 +Subject: [PATCH] amdgcn: Use __constant AS for amdgcn builtins. + +Fixes build after clang r338707. +Reviewer: Matthew.Arsenault@amd.com +Signed-off-by: Jan Vesely + +git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@338898 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + amdgcn-amdhsa/lib/workitem/get_global_size.cl | 4 +++- + amdgcn-amdhsa/lib/workitem/get_local_size.cl | 4 +++- + amdgcn/lib/workitem/get_global_offset.cl | 4 +++- + amdgcn/lib/workitem/get_work_dim.cl | 4 +++- + 4 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/amdgcn-amdhsa/lib/workitem/get_global_size.cl b/amdgcn-amdhsa/lib/workitem/get_global_size.cl +index 2289615..392cd08 100644 +--- amdgcn-amdhsa/lib/workitem/get_global_size.cl ++++ amdgcn-amdhsa/lib/workitem/get_global_size.cl +@@ -1,6 +1,8 @@ + #include + +-#if __clang_major__ >= 7 ++#if __clang_major__ >= 8 ++#define CONST_AS __constant ++#elif __clang_major__ >= 7 + #define CONST_AS __attribute__((address_space(4))) + #else + #define CONST_AS __attribute__((address_space(2))) +diff --git a/amdgcn-amdhsa/lib/workitem/get_local_size.cl b/amdgcn-amdhsa/lib/workitem/get_local_size.cl +index 034c6d9..64d1cf4 100644 +--- amdgcn-amdhsa/lib/workitem/get_local_size.cl ++++ amdgcn-amdhsa/lib/workitem/get_local_size.cl +@@ -1,6 +1,8 @@ + #include + +-#if __clang_major__ >= 7 ++#if __clang_major__ >= 8 ++#define CONST_AS __constant ++#elif __clang_major__ >= 7 + #define CONST_AS __attribute__((address_space(4))) + #else + #define CONST_AS __attribute__((address_space(2))) +diff --git a/amdgcn/lib/workitem/get_global_offset.cl b/amdgcn/lib/workitem/get_global_offset.cl +index 0c2b948..0a87cd2 100644 +--- amdgcn/lib/workitem/get_global_offset.cl ++++ amdgcn/lib/workitem/get_global_offset.cl +@@ -1,6 +1,8 @@ + #include + +-#if __clang_major__ >= 7 ++#if __clang_major__ >= 8 ++#define CONST_AS __constant ++#elif __clang_major__ >= 7 + #define CONST_AS __attribute__((address_space(4))) + #else + #define CONST_AS __attribute__((address_space(2))) +diff --git a/amdgcn/lib/workitem/get_work_dim.cl b/amdgcn/lib/workitem/get_work_dim.cl +index 8eb81ba..3add9b6 100644 +--- amdgcn/lib/workitem/get_work_dim.cl ++++ amdgcn/lib/workitem/get_work_dim.cl +@@ -1,6 +1,8 @@ + #include + +-#if __clang_major__ >= 7 ++#if __clang_major__ >= 8 ++#define CONST_AS __constant ++#elif __clang_major__ >= 7 + #define CONST_AS __attribute__((address_space(4))) + #else + #define CONST_AS __attribute__((address_space(2))) Property changes on: head/devel/libclc/files/patch-62a9191.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/libosmesa/Makefile =================================================================== --- head/graphics/libosmesa/Makefile (revision 505424) +++ head/graphics/libosmesa/Makefile (revision 505425) @@ -1,37 +1,37 @@ # Created by: gahr # $FreeBSD$ PORTNAME= libosmesa PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= graphics COMMENT= Off-Screen Mesa implementation of the OpenGL API USE_XORG= xorgproto .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" CONFIGURE_ARGS+= --disable-dri --disable-egl --disable-gbm \ --disable-gles2 --with-gallium-drivers=swrast MESA_BUILD_WRKSRC= src/util src/compiler src/mapi src/mesa LDFLAGS_i386= -Wl,-znotext -.if "${MESA_LLVM_VER}" != "" +.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} CONFIGURE_ARGS+= --enable-osmesa-gallium MESA_BUILD_WRKSRC+= src/gallium MESA_INSTALL_WRKSRC= src/gallium/state_trackers/osmesa src/gallium/targets/osmesa .else CONFIGURE_ARGS+= --enable-osmesa MESA_INSTALL_WRKSRC= src/mesa/drivers/osmesa .endif .include "${MASTERDIR}/Makefile.targets" post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include/GL ${INSTALL_DATA} ${WRKSRC}/include/GL/osmesa.h \ ${STAGEDIR}${PREFIX}/include/GL .include Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile (revision 505424) +++ head/graphics/mesa-dri/Makefile (revision 505425) @@ -1,122 +1,115 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ USE_XORG= xorgproto x11 xdamage xext xfixes xshmfence xv xvmc OPTIONS_DEFINE= VAAPI VDPAU WAYLAND OPTIONS_DEFAULT=WAYLAND OPTIONS_SUB= yes VAAPI_CONFIGURE_ENABLE= va VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_USE= XORG=xcb VDPAU_CONFIGURE_ENABLE= vdpau VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau WAYLAND_DESC= Enable support for the Wayland platform in Vulkan drivers WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" ALL_DRI_DRIVERS= I915 I965 RADEON R200 SWRAST ALL_GALLIUM_DRIVERS= FREEDRENO R300 R600 RADEONSI SVGA SWRAST VC4 ALL_VULKAN_DRIVERS= INTEL RADEON DRI_DRIVERS= SWRAST # classic swrast -.if "${MESA_LLVM_VER}" != "" +.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} GALLIUM_DRIVERS= SWRAST # llvmpipe .else GALLIUM_DRIVERS= "" .endif VULKAN_DRIVERS= # .if ${ARCH} == amd64 || ${ARCH} == i386 \ || ${ARCH} == powerpc || ${ARCH} == powerpc64 DRI_DRIVERS+= RADEON R200 -GALLIUM_DRIVERS+= R600 -. if "${MESA_LLVM_VER}" != "" && (${ARCH} == amd64 || ${ARCH} == i386) -# https://cgit.freedesktop.org/mesa/mesa/commit/?id=58952675f6d4 -GALLIUM_DRIVERS+= R300 -. endif -. if "${MESA_LLVM_VER}" != "" # until PPC gets LLVM in base -GALLIUM_DRIVERS+= RADEONSI +GALLIUM_DRIVERS+= R300 R600 RADEONSI VULKAN_DRIVERS+= RADEON -. endif .endif .if ${ARCH} == amd64 || ${ARCH} == i386 DRI_DRIVERS+= I915 I965 GALLIUM_DRIVERS+= SVGA . if ${OPSYS} == FreeBSD EXTRA_PATCHES+= ${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c . endif VULKAN_DRIVERS+= INTEL .elif ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 GALLIUM_DRIVERS+= FREEDRENO VC4 . if ${ARCH} == armv6 || ${ARCH} == armv7 EXTRA_PATCHES+= ${PATCHDIR}/extra-src_gallium_drivers_vc4_Makefile.in . endif .endif .if ${VULKAN_DRIVERS} BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR} USE_XORG+= xcb xrandr .endif LDFLAGS_i386= -Wl,-znotext .if ${DRI_DRIVERS} || ${VULKAN_DRIVERS:MINTEL} . if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # --build-id isn't supported by old GNU ld.bfd in base USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin . endif .endif # enables VK_KHR_wayland_surface in Vulkan drivers .if ${PORT_OPTIONS:MWAYLAND} && !empty(VULKAN_DRIVERS) CONFIGURE_ARGS+= --with-platforms=x11,surfaceless,drm,wayland .endif CONFIGURE_ARGS+= --with-dri-drivers="${DRI_DRIVERS:tl}" \ --with-gallium-drivers="${GALLIUM_DRIVERS:tl}" \ --with-vulkan-drivers="${VULKAN_DRIVERS:tl}" .for _d in ${ALL_DRI_DRIVERS} . if ${DRI_DRIVERS:M${_d}} PLIST_SUB+= ${_d}_DRIVER="" . else PLIST_SUB+= ${_d}_DRIVER="@comment " . endif .endfor .for _gd in ${ALL_GALLIUM_DRIVERS} . if ${GALLIUM_DRIVERS:M${_gd}} PLIST_SUB+= ${_gd}_GDRIVER="" . else PLIST_SUB+= ${_gd}_GDRIVER="@comment " . endif .endfor .for _vd in ${ALL_VULKAN_DRIVERS} . if ${VULKAN_DRIVERS:M${_vd}} PLIST_SUB+= ${_vd}_VDRIVER="" ARCH="${ARCH}" . else PLIST_SUB+= ${_vd}_VDRIVER="@comment " . endif .endfor .include "${MASTERDIR}/Makefile.targets" post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL .include Index: head/graphics/mesa-dri/Makefile.common =================================================================== --- head/graphics/mesa-dri/Makefile.common (revision 505424) +++ head/graphics/mesa-dri/Makefile.common (revision 505425) @@ -1,105 +1,99 @@ # Makefile.common - shared code between MesaLib ports. # # !!! Here be dragons !!! (they seem to be everywhere these days) # # Remember to upgrade the following ports everytime you bump MESAVERSION: # # - graphics/libosmesa # - graphics/mesa-dri # - graphics/mesa-libs # - lang/clover # # $FreeBSD$ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} MESABASEVERSION= 18.3.2 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= MASTER_SITES= https://mesa.freedesktop.org/archive/ \ https://mesa.freedesktop.org/archive/${MESABASEVERSION}/ \ ftp://ftp.freedesktop.org/pub/mesa/ \ ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX} MAINTAINER= x11@FreeBSD.org COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs LIB_DEPENDS+= libexpat.so:textproc/expat2 .if ${COMPONENT} != osmesa LIB_DEPENDS+= libdrm.so:graphics/libdrm .endif .if ${COMPONENT} != libs LIB_DEPENDS+= libglapi.so:graphics/mesa-libs .endif .if ${ARCH} == amd64 || ${ARCH} == i386 LIB_DEPENDS+= libunwind.so:devel/libunwind .endif .if ${OPSYS} == DragonFly LIB_DEPENDS+= libelf.so:devel/libelf .endif USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ localbase pathfix pkgconfig python:2.7,build shebangfix tar:xz USE_LDCONFIG= yes GNU_CONFIGURE= yes # only have one port to check with portscout. .if ${PORTNAME} != mesa-dri PORTSCOUT= ignore:1 .endif python_OLD_CMD= /usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ src/gallium/drivers/svga/svgadump/svga_dump.py \ src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ src/util/xmlpool/gen_xmlpool.py \ src/mesa/main/get_*.py src/util/format_srgb.py \ src/amd/*/*.py src/intel/genxml/gen_pack_header.py MASTERDIR= ${.CURDIR:H:H}/graphics/mesa-dri PATCHDIR= ${MASTERDIR}/files WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} DESCR= ${.CURDIR}/pkg-descr PLIST= ${.CURDIR}/pkg-plist PKGHELP= ${.CURDIR}/pkg-help PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall INSTALL_TARGET= install-strip .include -# need LLVM for libEGL wherever possible, but mixing GCC and LLVM breaks Gallium -.if ${CHOSEN_COMPILER_TYPE} == clang \ - || (${COMPONENT} == libs && ${ARCH} != sparc64) # no working LLVM -MESA_LLVM_VER?= 60 -.endif - -.if "${MESA_LLVM_VER}" != "" -BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} +.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} +BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} .if ${COMPONENT} != libs -RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} +RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} .endif -CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} -LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib +CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} +LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib CONFIGURE_ARGS+= --enable-llvm .else CONFIGURE_ARGS+= --disable-llvm .endif # There are issues that need to be fixed to use TLS model "initial-exec" # So stick with "global-dynamic"'s model for now. kan@ is working on a # patch for rtld. We might want to backport global-dynamic or # pthread_setspecific which it uses now by default. But since this # configure switch is going away ... # https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html CONFIGURE_ARGS+= --disable-glx-tls # we don't care about GLes v1 CONFIGURE_ARGS+= --disable-gles1 Index: head/graphics/mesa-dri/files/patch-9cab8cc.c =================================================================== --- head/graphics/mesa-dri/files/patch-9cab8cc.c (nonexistent) +++ head/graphics/mesa-dri/files/patch-9cab8cc.c (revision 505425) @@ -0,0 +1,17 @@ +amd: Make vgpr-spilling depend on llvm version + +https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230789#c14 +diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c +index 69d9f7b9f3fe9e5feb07b32c35cbcf1206a14ca8..dc9b684e9dd287d5bb558d9ad3868a9d0975228d 100644 +--- src/amd/common/ac_llvm_util.c ++++ src/amd/common/ac_llvm_util.c +@@ -153,7 +153,8 @@ static LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, + LLVMTargetRef target = ac_get_llvm_target(triple); + + snprintf(features, sizeof(features), +- "+DumpCode,+vgpr-spilling,-fp32-denormals,+fp64-denormals%s%s%s%s", ++ "+DumpCode,-fp32-denormals,+fp64-denormals%s%s%s%s%s", ++ HAVE_LLVM >= 0x0800 ? "" : ",+vgpr-spilling", + tm_options & AC_TM_SISCHED ? ",+si-scheduler" : "", + tm_options & AC_TM_FORCE_ENABLE_XNACK ? ",+xnack" : "", + tm_options & AC_TM_FORCE_DISABLE_XNACK ? ",-xnack" : "", Property changes on: head/graphics/mesa-dri/files/patch-9cab8cc.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-libs/Makefile =================================================================== --- head/graphics/mesa-libs/Makefile (revision 505424) +++ head/graphics/mesa-libs/Makefile (revision 505425) @@ -1,54 +1,55 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients USE_XORG= xorgproto x11 xcb xdamage xext \ xfixes xshmfence xxf86vm OPTIONS_DEFINE= WAYLAND OPTIONS_DEFAULT=WAYLAND OPTIONS_SUB= yes WAYLAND_DESC= Enable support for the Wayland platform in EGL WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" CONFIGURE_ARGS+= --with-dri-drivers="" --with-gallium-drivers="" .if ${PORT_OPTIONS:MWAYLAND} CONFIGURE_ARGS+= --with-platforms=x11,surfaceless,drm,wayland .endif MESA_BUILD_WRKSRC= src/mapi src/util MESA_INSTALL_WRKSRC= src/mapi .if ${PORT_OPTIONS:MWAYLAND} MESA_BUILD_WRKSRC+= src/egl/wayland/wayland-drm .endif MESA_BUILD_WRKSRC+= src/gbm src/glx MESA_INSTALL_WRKSRC+= src/gbm src/glx MESA_BUILD_WRKSRC+= src/egl MESA_INSTALL_WRKSRC+= src/egl .if ${ARCH} == "i386" # PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set LDFLAGS+=-Wl,-z,notext .endif .include "${MASTERDIR}/Makefile.targets" post-install: @cd ${WRKSRC}/src && ${SETENV} DESTDIR=${STAGEDIR} \ ${MAKE_CMD} install-pkgconfigDATA install-glHEADERS install-glxHEADERS .include Index: head/lang/beignet/Makefile =================================================================== --- head/lang/beignet/Makefile (revision 505424) +++ head/lang/beignet/Makefile (revision 505425) @@ -1,67 +1,66 @@ # Created by: Koop Mast # $FreeBSD$ PORTNAME= beignet DISTVERSION= 1.3.2 DISTVERSIONSUFFIX= -source -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= lang MASTER_SITES= https://01.org/sites/default/files/ MAINTAINER= x11@FreeBSD.org COMMENT= OpenCL library for Intel GPUs LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/COPYING -BUILD_DEPENDS= clang${LLVMVER}:devel/llvm${LLVMVER} \ +BUILD_DEPENDS= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} \ opencl>=0:devel/opencl LIB_DEPENDS= libOpenCL.so:devel/ocl-icd \ libdrm.so:graphics/libdrm RUN_DEPENDS= opencl>=0:devel/opencl \ - clang${LLVMVER}:devel/llvm${LLVMVER} + clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} WRKSRC= ${WRKDIR}/Beignet-${DISTVERSION}-Source USES= cmake ncurses pkgconfig shebangfix USE_XORG= sm ice x11 xext xfixes USE_GL= gl egl USE_LDCONFIG= ${LOCALBASE}/lib/${PORTNAME} SHEBANG_FILES= src/git_sha1.sh backend/kernels/compile.sh ALL_TARGET= all -LLVMVER= ${MESA_LLVM_VER:U60} -CMAKE_ARGS= -DCLANG_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/clang${LLVMVER} \ - -DLLVM_AS_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-as${LLVMVER} \ - -DLLVM_CONFIG_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-config${LLVMVER} \ - -DLLVM_LINK_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-link${LLVMVER} +CMAKE_ARGS= -DCLANG_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ + -DLLVM_AS_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-as${LLVM_DEFAULT} \ + -DLLVM_CONFIG_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} \ + -DLLVM_LINK_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/llvm-link${LLVM_DEFAULT} ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Beignet needs a graphics driver supported by the Intel KMS driver OPTIONS_DEFINE= FP64 OCL20 TEST OPTIONS_DEFAULT= OCL20 OPTIONS_EXCLUDE_i386= OCL20 OPTIONS_SUB= yes FP64_DESC= Double precision (experimental) FP64_CMAKE_BOOL= EXPERIMENTAL_DOUBLE OCL20_DESC= OpenCL 2.0 support OCL20_CMAKE_BOOL= ENABLE_OPENCL_20 TEST_ALL_TARGET= flat_address_space utest_run post-patch: - @${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVMVER}|g; \ - s|clang |clang${LLVMVER} |g' \ + @${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVM_DEFAULT}|g; \ + s|clang |clang${LLVM_DEFAULT} |g' \ ${WRKSRC}/backend/kernels/compile.sh # XXX bug 213732: compiler_device_enqueue() Interrupt signal (SIGSEGV) received. do-test-TEST-on: -@(cd ${TEST_WRKSRC}/utests; . ./setenv.sh; \ ./flat_address_space; ./utest_run; ) pre-install-TEST-on: do-test-TEST-on .include Index: head/lang/beignet/files/patch-llvm8 =================================================================== --- head/lang/beignet/files/patch-llvm8 (nonexistent) +++ head/lang/beignet/files/patch-llvm8 (revision 505425) @@ -0,0 +1,51 @@ +Regressed by https://github.com/llvm/llvm-project/commit/721d95713a9e + +unable to load /usr/local/lib/beignet//libgbeinterp.so which is part of the driver, please check! +ld-elf.so.1: /usr/local/lib/beignet//libgbeinterp.so: Undefined symbol "_ZN4llvm24DisableABIBreakingChecksE" + +Regressed by https://github.com/llvm/llvm-project/commit/4a2d58e16acc + +backend/src/llvm/llvm_gen_backend.cpp:3076:5: error: + unknown type name 'TerminatorInst' + TerminatorInst *term = bb->getTerminator(); + ^ +backend/src/llvm/llvm_gen_backend.cpp:3083:5: error: + unknown type name 'TerminatorInst' + TerminatorInst *term = bb->getTerminator(); + ^ + +--- backend/src/CMakeLists.txt.orig 2017-09-22 08:05:22 UTC ++++ backend/src/CMakeLists.txt +@@ -168,6 +168,7 @@ add_dependencies(gbe beignet_bitcode) + endif (NOT (USE_STANDALONE_GBE_COMPILER STREQUAL "true")) + + add_library(gbeinterp SHARED gbe_bin_interpreter.cpp) ++target_link_libraries(gbeinterp ${LLVM_MODULE_LIBS}) + + if (LLVM_VERSION_NODOT VERSION_EQUAL 34) + find_library(TERMINFO NAMES tinfo ncurses) +--- backend/src/llvm/llvm_gen_backend.cpp.orig 2017-10-24 06:04:48 UTC ++++ backend/src/llvm/llvm_gen_backend.cpp +@@ -3073,14 +3073,22 @@ namespace gbe + + + static unsigned getChildNo(BasicBlock *bb) { ++#if LLVM_VERSION_MAJOR < 8 + TerminatorInst *term = bb->getTerminator(); ++#else ++ Instruction *term = bb->getTerminator(); ++#endif + return term->getNumSuccessors(); + } + + // return NULL if index out-range of children number + static BasicBlock *getChildPossible(BasicBlock *bb, unsigned index) { + ++#if LLVM_VERSION_MAJOR < 8 + TerminatorInst *term = bb->getTerminator(); ++#else ++ Instruction *term = bb->getTerminator(); ++#endif + unsigned childNo = term->getNumSuccessors(); + BasicBlock *child = NULL; + if(index < childNo) { Property changes on: head/lang/beignet/files/patch-llvm8 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/clover/Makefile =================================================================== --- head/lang/clover/Makefile (revision 505424) +++ head/lang/clover/Makefile (revision 505425) @@ -1,40 +1,40 @@ # $FreeBSD$ PORTNAME= clover PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang COMMENT= Mesa "Clover" OpenCL library BUILD_DEPENDS= libclc>=0.3.0:devel/libclc \ opencl>=0:devel/opencl LIB_DEPENDS= libOpenCL.so:devel/ocl-icd RUN_DEPENDS= libclc>=0.3.0:devel/libclc \ opencl>=0:devel/opencl ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Clover needs a GPU supported by the Radeon KMS driver .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" CONFIGURE_ARGS+= --enable-opencl --enable-opencl-icd --disable-dri \ --disable-egl --disable-gbm --disable-gles2 --disable-glx \ --disable-va --disable-vdpau --disable-xvmc \ --with-gallium-drivers=r600,radeonsi # only supported GPUs LDFLAGS_i386= -Wl,-znotext #MESA_BUILD_WRKSRC= src/util src/compiler src/mesa src/gallium MESA_INSTALL_WRKSRC= src/gallium/targets/opencl src/gallium/targets/pipe-loader .include "${MASTERDIR}/Makefile.targets" pre-configure: - @if [ -e ${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} ] && \ - ! [ -e ${LOCALBASE}/bin/clang${MESA_LLVM_VER} ]; then \ - ${ECHO_MSG} "Your llvm${MESA_LLVM_VER} is not built with clang support, which is required."; \ + @if [ -e ${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} ] && \ + ! [ -e ${LOCALBASE}/bin/clang${LLVM_DEFAULT} ]; then \ + ${ECHO_MSG} "Your llvm${LLVM_DEFAULT} is not built with clang support, which is required."; \ ${FALSE}; \ fi .include