[vlc-devel] [PATCH] contrib: harfbuzz: Pass -mbig-obj to the assembler

Steve Lhomme robux4 at ycbcr.xyz
Tue Mar 31 11:58:21 CEST 2020



On 2020-03-31 11:39, Hugo Beauzée-Luyssen wrote:
> On Tue, Mar 31, 2020, at 8:37 AM, Steve Lhomme wrote:
>> It looks OK but looking at our contribs it seems
>> CHECK_CXX_COMPILER_FLAG() should use lower case. Also
>> add_compile_options() seems cleaner than setting just the CXX flags
>> manually.
>>
>> On 2020-03-30 17:20, Hugo Beauzée-Luyssen wrote:
>>> Which fixes non-optimized win64 builds
>>> ---
>>>    ...Enable-big-objects-support-for-win64.patch | 31 +++++++++++++++++++
>>>    contrib/src/harfbuzz/rules.mak                |  1 +
>>>    2 files changed, 32 insertions(+)
>>>    create mode 100644 contrib/src/harfbuzz/0001-CMakeLists-Enable-big-objects-support-for-win64.patch
>>>
>>> diff --git a/contrib/src/harfbuzz/0001-CMakeLists-Enable-big-objects-support-for-win64.patch b/contrib/src/harfbuzz/0001-CMakeLists-Enable-big-objects-support-for-win64.patch
>>> new file mode 100644
>>> index 0000000000..eb0a556b27
>>> --- /dev/null
>>> +++ b/contrib/src/harfbuzz/0001-CMakeLists-Enable-big-objects-support-for-win64.patch
>>> @@ -0,0 +1,31 @@
>>> +From d36fe71173f213307de41711415f56861c71e62c Mon Sep 17 00:00:00 2001
>>> +From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
>>> +Date: Mon, 30 Mar 2020 16:06:18 +0200
>>> +Subject: [PATCH] CMakeLists: Enable big objects support for win64
>>> +
>>> +---
>>> + CMakeLists.txt | 8 ++++++++
>>> + 1 file changed, 8 insertions(+)
>>> +
>>> +diff --git a/CMakeLists.txt b/CMakeLists.txt
>>> +index 2cdfd4b3..6442d9b6 100644
>>> +--- a/CMakeLists.txt
>>> ++++ b/CMakeLists.txt
>>> +@@ -499,6 +499,14 @@ if (UNIX OR MINGW)
>>> +   endif()
>>> + endif ()
>>> +
>>> ++if (MINGW)
>>> ++  if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
>>> ++    CHECK_CXX_COMPILER_FLAG("-Wa,-mbig-obj" COMPILER_SUPPORTS_BIG_OBJ)
>>> ++    if (COMPILER_SUPPORTS_BIG_OBJ)
>>> ++      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj")
>>> ++    endif()
>>> ++  endif()
>>> ++endif()
>>> +
>>> + ## Define harfbuzz-gobject library
>>> + if (HB_HAVE_GOBJECT)
>>> +--
>>> +2.20.1
>>> +
>>> diff --git a/contrib/src/harfbuzz/rules.mak b/contrib/src/harfbuzz/rules.mak
>>> index 374a4ff1da..09e7ccc5da 100644
>>> --- a/contrib/src/harfbuzz/rules.mak
>>> +++ b/contrib/src/harfbuzz/rules.mak
>>> @@ -21,6 +21,7 @@ harfbuzz: harfbuzz-$(HARFBUZZ_VERSION).tar.xz .sum-harfbuzz
>>>    	$(APPLY) $(SRC)/harfbuzz/harfbuzz-fix-coretext-detection.patch
>>>    	#Missing Frameworks in the pkgconfig file
>>>    	$(APPLY) $(SRC)/harfbuzz/harfbuzz-create-pkgconfig-file.patch
>>> +	$(APPLY) $(SRC)/harfbuzz/0001-CMakeLists-Enable-big-objects-support-for-win64.patch
>>>    	$(MOVE)
>>>    
>>>    DEPS_harfbuzz = freetype2 $(DEPS_freetype2)
> 
> I only tried to match the existing CMakeLists.txt :)
> For what it's worth, they are moving to meson, so their next release should be able to be built without cmake

OK if they already use the functions that way, go for it.


More information about the vlc-devel mailing list