This is an automated email from the ASF dual-hosted git repository. leginee pushed a commit to branch win10-msvc-trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 0616b4c7addba942de7f10bf55bd677a9ab8040f Author: Peter Kovacs <[email protected]> AuthorDate: Sun Aug 23 00:02:46 2026 +0200 solenv: /SAFESEH is x86-only, so gate it in the dmake path too LNK1246: /SAFESEH is not compatible with target machine "x64" -- x64 SEH is table-driven and the linker rejects the flag outright. shell's ooofilt.dll was the first DLL to reach it. set_wntx64.mk predates a full x64 build: it was written to cross-build the x64 shell extension from an x86 build, where the _X64-suffixed variables were the x64 link and plain LINKFLAGS was still the host x86 link. With the whole build targeting x64 that assumption inverts. gbuild's platform/windows.mk already gates the same flag on CPUNAME, handing -SAFESEH -NXCOMPAT -DYNAMICBASE to INTEL and only the latter two to X86_64 -- which is why every gbuild library linked fine. Same guard here. expat and extensions/activex include this file too; expat did not trip it because it builds only static libs, so no linker ever sees the flag. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrM7EMKgiuyVcCUe9nSbZR --- main/solenv/inc/set_wntx64.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/solenv/inc/set_wntx64.mk b/main/solenv/inc/set_wntx64.mk index 919384c7f4..5df0f55770 100644 --- a/main/solenv/inc/set_wntx64.mk +++ b/main/solenv/inc/set_wntx64.mk @@ -83,7 +83,14 @@ LINKFLAGS_X64=/MAP /OPT:NOREF .ENDIF # exception handling protection +# /SAFESEH is x86-only -- x64 SEH is table-driven and the linker rejects the +# flag outright with LNK1246. This file predates a full x64 build: it was +# written to cross-build the x64 shell extension from an x86 build, where +# plain LINKFLAGS was still the x86 link. gbuild's windows.mk already gates +# -SAFESEH on CPUNAME==INTEL; the dmake path needs the same guard. +.IF "$(CPUNAME)"=="INTEL" LINKFLAGS+=-safeseh +.ENDIF # enable DEP LINKFLAGS+=-nxcompat
