Bug#827651: vulkan: FTBFS on mips64el -- relocation truncated to fit: R_MIPS_CALL16

2016-07-15 Thread Dejan Latinovic


Hi,

I have created and attached a patch that adds -mxgot flag for mips64 in 
layers/CMakeLists.txt.
The flag is used only for compilation of core_validation.cpp.

With this patch I was able to build vulkan successfully for mips64el.


Regards,
Dejan--- vulkan-1.0.8.0+dfsg1.orig/layers/CMakeLists.txt
+++ vulkan-1.0.8.0+dfsg1/layers/CMakeLists.txt
@@ -96,6 +96,12 @@ if (NOT WIN32)
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith")
 endif()
 
+if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips64")
+if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+set_source_files_properties(core_validation.cpp PROPERTIES COMPILE_FLAGS -mxgot)
+endif()
+endif()
+
 add_custom_command(OUTPUT vk_dispatch_table_helper.h
 	COMMAND ${PYTHON_CMD} ${PROJECT_SOURCE_DIR}/vk-generate.py ${DisplayServer} dispatch-table-ops layer > vk_dispatch_table_helper.h
 	DEPENDS ${PROJECT_SOURCE_DIR}/vk-generate.py ${PROJECT_SOURCE_DIR}/vulkan.py)


Bug#827651: vulkan: FTBFS on mips64el -- relocation truncated to fit: R_MIPS_CALL16

2016-06-21 Thread Julien Cristau
On Sun, Jun 19, 2016 at 09:53:52 +0100, James Cowgill wrote:

> Source: vulkan
> Version: 1.0.8.0+dfsg1-1
> Severity: important
> Tags: patch
> 
> Hi,
> 
> vulakn FTBFS on mips64el because the libVkLayer_core_validation.so
> library contains too many symbols and overflows the default GOT. This
> is what causes the relocation errors. This can be fixed by compiling
> vulkan with the -mxgot flag, although this does have a performance
> penalty.
> 
> Before this can happen, the validation layer CMakeLists.txt file must
> be updated so it doesn't clobber the CXXFLAGS variable.
> 
> Patches to do both of these tasks are attached.
> 
Is there any way this can be made non-Debian-specific?  Either by having
core_validation.cpp not need such a large GOT, or by adding the flag in
CMakeLists rather than debian/rules?

Cheers,
Julien



Bug#827651: vulkan: FTBFS on mips64el -- relocation truncated to fit: R_MIPS_CALL16

2016-06-19 Thread James Cowgill
Source: vulkan
Version: 1.0.8.0+dfsg1-1
Severity: important
Tags: patch

Hi,

vulakn FTBFS on mips64el because the libVkLayer_core_validation.so
library contains too many symbols and overflows the default GOT. This
is what causes the relocation errors. This can be fixed by compiling
vulkan with the -mxgot flag, although this does have a performance
penalty.

Before this can happen, the validation layer CMakeLists.txt file must
be updated so it doesn't clobber the CXXFLAGS variable.

Patches to do both of these tasks are attached.

Thanks,
JamesDescription: Don't clobber CXXFLAGS when building validation layers
Author: James Cowgill 
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -91,7 +91,7 @@ if (WIN32)
 set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_CRT_SECURE_NO_WARNINGS /bigobj")
 endif()
 if (NOT WIN32)
-set (CMAKE_CXX_FLAGS "-std=c++11")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpointer-arith")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith")
 endif()
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,10 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 
+ifeq ($(DEB_HOST_ARCH),mips64el)
+export DEB_CXXFLAGS_MAINT_APPEND := -mxgot
+endif
+
 # main packaging script based on dh7 syntax
 %:
 	dh $@ --with quilt --builddirectory=build/


signature.asc
Description: This is a digitally signed message part