From 44666af02db2e51399a32344b744774d1cc4ce855398bb9e1e862dee5d3f209a Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Mon, 7 Sep 2015 09:02:55 +0000 Subject: [PATCH] Accepting request 329409 from home:alarrosa:branches:KDE:Qt5 - Add U_mesa-llvm37-rename-r600-to-amdgpu.patch to fix build with llvm 3.7 due to rename of llvm target R600 to AMDGPU OBS-URL: https://build.opensuse.org/request/show/329409 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=467 --- Mesa.changes | 6 ++ Mesa.spec | 3 + U_mesa-llvm37-rename-r600-to-amdgpu.patch | 71 +++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 U_mesa-llvm37-rename-r600-to-amdgpu.patch diff --git a/Mesa.changes b/Mesa.changes index 4f1edc1..a10b340 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 7 03:45:34 UTC 2015 - alarrosa@suse.com + +- Add U_mesa-llvm37-rename-r600-to-amdgpu.patch to fix build with llvm 3.7 + due to rename of llvm target R600 to AMDGPU + ------------------------------------------------------------------- Sat Sep 5 11:45:32 UTC 2015 - idonmez@suse.com diff --git a/Mesa.spec b/Mesa.spec index 88294df..4e3d97e 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -58,6 +58,8 @@ Patch13: u_mesa-8.0.1-fix-16bpp.patch Patch15: u_mesa-8.0-llvmpipe-shmget.patch # Upstream commit to fix build with llvm 3.7 Patch16: U_mesa-llvm37.patch +# Upstream commit to fix build with llvm 3.7 +Patch17: U_mesa-llvm37-rename-r600-to-amdgpu.patch BuildRequires: autoconf >= 2.60 BuildRequires: automake BuildRequires: bison @@ -518,6 +520,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch0 -p1 %endif %patch16 -p1 +%patch17 -p1 ### disabled, but not dropped yet; these still need investigation in ### order to figure out whether the issue is still reproducable and ### hence a fix is required diff --git a/U_mesa-llvm37-rename-r600-to-amdgpu.patch b/U_mesa-llvm37-rename-r600-to-amdgpu.patch new file mode 100644 index 0000000..2d6ea13 --- /dev/null +++ b/U_mesa-llvm37-rename-r600-to-amdgpu.patch @@ -0,0 +1,71 @@ +From patchwork Fri Jun 12 00:36:45 2015 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: [Mesa-dev] radeon/llvm: Handle LLVM backend rename from R600 to AMDGPU +From: Tom Stellard +X-Patchwork-Id: 51706 +Message-Id: <1434069405-11033-1-git-send-email-thomas.stellard@amd.com> +To: +Cc: Tom Stellard +Date: Fri, 12 Jun 2015 00:36:45 +0000 + +--- + configure.ac | 13 ++++++++----- + src/gallium/drivers/radeon/radeon_llvm_emit.c | 8 ++++++++ + 2 files changed, 16 insertions(+), 5 deletions(-) +Reviewed-by: Marek Olšák + + +diff --git a/configure.ac b/configure.ac +index d32aa24..eda8d23 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2048,16 +2048,19 @@ require_egl_drm() { + } + + radeon_llvm_check() { ++ if test ${LLVM_VERSION_INT} -lt 307; then ++ amdgpu_llvm_target_name='r600' ++ else ++ amdgpu_llvm_target_name='amdgpu' ++ fi + if test "x$enable_gallium_llvm" != "xyes"; then + AC_MSG_ERROR([--enable-gallium-llvm is required when building $1]) + fi + llvm_check_version_for "3" "4" "2" $1 +- if test true && $LLVM_CONFIG --targets-built | grep -qvw 'R600' ; then +- AC_MSG_ERROR([LLVM R600 Target not enabled. You can enable it when building the LLVM +- sources with the --enable-experimental-targets=R600 +- configure flag]) ++ if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then ++ AC_MSG_ERROR([LLVM $amdgpu_llvm_target_name not enabled in your LLVM build.]) + fi +- LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader ipo" ++ LLVM_COMPONENTS="${LLVM_COMPONENTS} $amdgpu_llvm_target_name bitreader ipo" + NEED_RADEON_LLVM=yes + if test "x$have_libelf" != xyes; then + AC_MSG_ERROR([$1 requires libelf when using llvm]) +diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c +index 624077c..25580b6 100644 +--- a/src/gallium/drivers/radeon/radeon_llvm_emit.c ++++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c +@@ -86,10 +86,18 @@ static void init_r600_target() + { + static unsigned initialized = 0; + if (!initialized) { ++#if HAVE_LLVM < 0x0307 + LLVMInitializeR600TargetInfo(); + LLVMInitializeR600Target(); + LLVMInitializeR600TargetMC(); + LLVMInitializeR600AsmPrinter(); ++#else ++ LLVMInitializeAMDGPUTargetInfo(); ++ LLVMInitializeAMDGPUTarget(); ++ LLVMInitializeAMDGPUTargetMC(); ++ LLVMInitializeAMDGPUAsmPrinter(); ++ ++#endif + initialized = 1; + } + }