From: "Thomas Frohwein" Subject: Re: [sparc64] unbreak spirv-tools build To: "Theo Buehler" , ports@openbsd.org Cc: jca@openbsd.org, "Kurt Mosiejczuk" , "Thomas Frohwein" Date: Tue, 21 May 2024 08:56:53 -0400 ok with += On Tue, May 21, 2024, at 4:25 AM, Theo Buehler wrote: > On Tue, May 21, 2024 at 10:00:23AM +0200, Theo Buehler wrote: >> As can be seen on >> >> http://build-failures.rhaalovely.net/sparc64/2024-05-18/summary.log >> >> spirv-tools is the immediate blocker for many missing ports on sparc64. >> It needs to link against stdc++fs with ports-gcc: >> >> http://build-failures.rhaalovely.net/sparc64/2024-05-18/graphics/spirv-tools.log >> >> The diff below uses the same approach as the one used by jca for glslang >> >> https://github.com/openbsd/ports/commit/eb51153047ff2fdba5334b386c814557b77857ba >> >> Packages on sparc64 and arm64. >> >> Index: Makefile >> =================================================================== >> RCS file: /cvs/ports/graphics/spirv-tools/Makefile,v >> diff -u -p -r1.20 Makefile >> --- Makefile 20 May 2024 15:46:33 -0000 1.20 >> +++ Makefile 21 May 2024 07:57:39 -0000 >> @@ -31,7 +31,16 @@ BUILD_DEPENDS = graphics/spirv-headers >> >> CONFIGURE_ARGS = -DSPIRV-Headers_SOURCE_DIR="${LOCALBASE}" >> >> +SUBST_VARS = ADDITIONAL_LIBRARIES > > changed to += > >> + >> +pre-configure: >> + ${SUBST_CMD} ${WRKSRC}/tools/CMakeLists.txt >> + >> # effcee is missing to build tests >> NO_TEST = Yes >> >> .include >> + >> +.if ${CHOSEN_COMPILER} == ports-gcc >> +ADDITIONAL_LIBRARIES = stdc++fs >> +.endif >> Index: patches/patch-tools_CMakeLists_txt >> =================================================================== >> RCS file: patches/patch-tools_CMakeLists_txt >> diff -N patches/patch-tools_CMakeLists_txt >> --- /dev/null 1 Jan 1970 00:00:00 -0000 >> +++ patches/patch-tools_CMakeLists_txt 21 May 2024 07:58:40 -0000 >> @@ -0,0 +1,14 @@ >> +Add -lstdc++fs for ports-gcc >> + >> +Index: tools/CMakeLists.txt >> +--- tools/CMakeLists.txt.orig >> ++++ tools/CMakeLists.txt >> +@@ -74,7 +74,7 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES}) >> + objdump/extract_source.cpp >> + util/cli_consumer.cpp >> + ${COMMON_TOOLS_SRCS} >> +- LIBS ${SPIRV_TOOLS_FULL_VISIBILITY}) >> ++ LIBS ${SPIRV_TOOLS_FULL_VISIBILITY} ${ADDITIONAL_LIBRARIES}) >> + target_include_directories(spirv-objdump PRIVATE ${spirv-tools_SOURCE_DIR} >> + ${SPIRV_HEADER_INCLUDE_DIR}) >> + set(SPIRV_INSTALL_TARGETS ${SPIRV_INSTALL_TARGETS} spirv-objdump) >>