Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
When cross-compiling for Windows with the -O0
optimization level the build fails.
The error can be fixed by the -Wa,-mbig-obj
assembler flag. However, @theuni suggested:
We should definitely look into breaking up that object.
Expected behaviour
The build completes with no error.
Steps to reproduce
0$ make -C depends HOST=x86_64-w64-mingw32 DEBUG=1 NO_QT=1
1$ ./configure CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site --enable-debug CFLAGS=-O0 CXXFLAGS=-O0
2$ make
Relevant log output
0...
1/usr/bin/x86_64-w64-mingw32-as: wallet/libbitcoin_wallet_a-wallet.o: too many sections (46006)
2{standard input}: Assembler messages:
3{standard input}: Fatal error: can't write 47 bytes to section .text of wallet/libbitcoin_wallet_a-wallet.o: 'file too big'
4/usr/bin/x86_64-w64-mingw32-as: wallet/libbitcoin_wallet_a-wallet.o: too many sections (46006)
5{standard input}: Fatal error: wallet/libbitcoin_wallet_a-wallet.o: file too big
6...
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
master@5608e1d3b4ba3a23c05937918046e428be890505
Operating system and version
Ubuntu 23.04
Machine specifications
No response