<div dir="ltr"><div>Hi Rui,<br><br></div>When building lld with a gcc compiler I get cast errors on |= for characteristics<br><div><div><br></div><div>What kinds of casts are acceptable to use in lld to be accepted to fix this <br></div><div><br>[ 82%] [ 82%] C:/msys64/home/Martell/MINGW-packages/mingw-w64-clang-git/src/llvm/tools/lld/COFF/Writer.cpp: In member function 'void lld::coff::OutputSection::addPermissions(uint32_t)':<br>C:/msys64/home/Martell/MINGW-packages/mingw-w64-clang-git/src/llvm/tools/lld/COFF/Writer.cpp:87:26: error: no match for 'operator|=' (operand types are 'llvm::support::ulittle32_t {aka llvm::support::detail::packed_endian_specific_integral<unsigned int, (llvm::support::endianness)1u, 1u>}' and 'uint32_t {aka unsigned int}')<br>   Header.Characteristics |= C & PermMask;<br>                          ^<br>Built target X86CommonTableGen<br>Built target LLVMPasses<br>C:/msys64/home/Martell/MINGW-packages/mingw-w64-clang-git/src/llvm/tools/lld/COFF/Writer.cpp: In member function 'void lld::coff::Writer::writeHeader()':<br>C:/msys64/home/Martell/MINGW-packages/mingw-w64-clang-git/src/llvm/tools/lld/COFF/Writer.cpp:245:25: error: no match for 'operator|=' (operand types are 'llvm::support::ulittle16_t {aka llvm::support::detail::packed_endian_specific_integral<short unsigned int, (llvm::support::endianness)1u, 1u>}' and 'llvm::COFF::Characteristics')<br>   COFF->Characteristics |= IMAGE_FILE_LARGE_ADDRESS_AWARE;<br>                         ^<br>C:/msys64/home/Martell/MINGW-packages/mingw-w64-clang-git/src/llvm/tools/lld/COFF/Writer.cpp:247:27: error: no match for 'operator|=' (operand types are 'llvm::support::ulittle16_t {aka llvm::support::detail::packed_endian_specific_integral<short unsigned int, (llvm::support::endianness)1u, 1u>}' and 'llvm::COFF::Characteristics')<br>     COFF->Characteristics |= IMAGE_FILE_RELOCS_STRIPPED;<br>                           ^<br><br></div><div>Many Thanks<br></div><div>Martell<br></div></div></div>