[clang] [MinGW] MinGW dynamicbase (PR #74979)

εΎζŒζ’ Xu Chiheng via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 13 08:10:48 PST 2023


xu-chiheng wrote:


> > In Cygwin with binutils 2.41, --dynamicbase make a difference, so I thought MinGW also need it.
> 
> No, MinGW does not need it, as it has been enabled by default since binutils 2.36.
> 
> Apparently that change, https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=514b4e191d5f46de8e142fe216e677a35fa9c4bb, didn't apply to Cygwin but only to MinGW. But if Cygwin works with dynamicbase (I think it might have issues with it but I'm not sure?) then perhaps binutils should be changed to enable dynamicbase by default there, instead of changing compilers to pass the option by default.

Cygwin GCC and Clang must use dynamicbase, otherwise, there are errors like :
      0 [main] clang-17 1506 child_info_fork::abort: \??\D:\cygwin64-packages\clang\bin\cygclangLex-17git.dll: Loaded to different address: parent(0x16E0000) != child(0x5C12D0000)
clang++: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
      0 [main] clang-17 1507 child_info_fork::abort: \??\D:\cygwin64-packages\clang\bin\cygLLVMRISCVCodeGen-17git.dll: Loaded to different address: parent(0xE60000) != child(0xEC0000)
clang++: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable


https://github.com/llvm/llvm-project/pull/74979


More information about the cfe-commits mailing list