On Sun, May 03, 2020 at 02:52:27PM +1000, Jonathan Gray wrote:
> On Fri, May 01, 2020 at 11:44:39PM +0100, Stuart Henderson wrote:
> > On 2020/04/28 22:11, Jonathan Gray wrote:
> > > CVSROOT:  /cvs
> > > Module name:      ports
> > > Changes by:       [email protected]    2020/04/28 22:11:29
> > > 
> > > Modified files:
> > >   graphics/vulkan-loader: Makefile 
> > >   graphics/vulkan-loader/patches: patch-loader_CMakeLists_txt 
> > > 
> > > Log message:
> > > backport a patch to fix build when there is no as(1)
> > > fixes build on aarch64
> > > 
> > > ok phessler@ maintainer thfr@ does not have time to review but is fine
> > > with this going in
> > > 
> > 
> > This breaks i386:
> 
> > <instantiation>:13:17: error: cannot use more than one symbol in memory 
> > operand
> >     push offset termin_error_string@GOT # Push the error string (fourth arg)
> >                 ^
> 
> The builtin assembler in clang 8.0 can not handle 'offset' here,
> support was added in clang 10.0.
> 
> While it should be possible to build with -fno-integrated-as on i386 to
> force the use of gas this currently results in not being able to find
> the generated gen_defines.asm file.  I've not yet been able to convince
> cmake to do the right thing with include paths.  The file can not be
> found even with an explicit -I${WRKBUILD}/loader/.

So for release here is a revert.

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/vulkan-loader/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile    29 Apr 2020 04:11:29 -0000      1.5
+++ Makefile    3 May 2020 05:12:47 -0000
@@ -38,7 +38,5 @@ NO_TEST =     Yes
 
 pre-configure:
        ${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
-       cp ${WRKSRC}/loader/unknown_ext_chain_gas.asm \
-           ${WRKSRC}/loader/unknown_ext_chain_gas.S
 
 .include <bsd.port.mk>
Index: patches/patch-loader_CMakeLists_txt
===================================================================
RCS file: 
/cvs/ports/graphics/vulkan-loader/patches/patch-loader_CMakeLists_txt,v
retrieving revision 1.2
diff -u -p -r1.2 patch-loader_CMakeLists_txt
--- patches/patch-loader_CMakeLists_txt 29 Apr 2020 04:11:29 -0000      1.2
+++ patches/patch-loader_CMakeLists_txt 3 May 2020 05:14:21 -0000
@@ -2,9 +2,6 @@ $OpenBSD: patch-loader_CMakeLists_txt,v 
 
 Avoid vulkan-validation-layers vk_loader_platform.h being used.
 
-loader: move to using gcc for asm compiles on Linux.
-85836796b3574fa8fa593a1da4d2a710f3467168
-
 Index: loader/CMakeLists.txt
 --- loader/CMakeLists.txt.orig
 +++ loader/CMakeLists.txt
@@ -17,37 +14,7 @@ Index: loader/CMakeLists.txt
  
  # Check for the existance of the secure_getenv or __secure_getenv commands
  include(CheckFunctionExists)
-@@ -148,22 +148,16 @@ elseif(APPLE)
-     set_source_files_properties(${OPT_LOADER_SRCS} PROPERTIES COMPILE_FLAGS 
-O)
-     add_custom_target(loader_asm_gen_files) # This causes no assembly files 
to be generated.
- else(UNIX AND NOT APPLE) # i.e.: Linux
--    enable_language(ASM-ATT)
--    set(CMAKE_ASM-ATT_COMPILE_FLAGS "${CMAKE_ASM-ATT_COMPILE_FLAGS} 
$ENV{ASFLAGS}")
--    set(CMAKE_ASM-ATT_COMPILE_FLAGS "${CMAKE_ASM-ATT_COMPILE_FLAGS} 
-I\"${CMAKE_CURRENT_BINARY_DIR}\"")
-+    enable_language(ASM)
-+    set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}")
- 
--    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/asm_test.asm
-+    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/asm_test.S
-                ".intel_syntax noprefix\n.text\n.global sample\nsample:\nmov 
ecx, [eax + 16]\n")
--    # try_compile uses the C/C++ linker flags even for ASM,
--    # while they're not valid for ASM and making linking fail.
--    set(TMP_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
--    set(CMAKE_EXE_LINKER_FLAGS "")
--    try_compile(ASSEMBLER_WORKS ${CMAKE_CURRENT_BINARY_DIR} 
${CMAKE_CURRENT_BINARY_DIR}/asm_test.asm)
--    set(CMAKE_EXE_LINKER_FLAGS ${TMP_EXE_LINKER_FLAGS})
--    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/asm_test.asm)
-+    set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
-+    try_compile(ASSEMBLER_WORKS ${CMAKE_CURRENT_BINARY_DIR} 
${CMAKE_CURRENT_BINARY_DIR}/asm_test.S)
-+    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/asm_test.S)
-     if(ASSEMBLER_WORKS)
--        set(CMAKE_ASM-ATT_FLAGS "$ENV{ASFLAGS} 
-I\"${CMAKE_CURRENT_BINARY_DIR}\"")
--        set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas.asm)
-+        set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas.S)
-         add_executable(asm_offset asm_offset.c)
-         add_dependencies(asm_offset generate_helper_files loader_gen_files)
-         target_link_libraries(asm_offset Vulkan::Headers)
-@@ -247,7 +241,7 @@ else()
+@@ -247,7 +247,7 @@ else()
                                       "1"
                                       VERSION
                                       
"${VulkanHeaders_VERSION_MAJOR}.${VulkanHeaders_VERSION_MINOR}.${VulkanHeaders_VERSION_PATCH}")

Reply via email to