1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2025-11-03 01:33:16 +03:00

binutils (as): Enable -mbig-obj by default

This format was introduced in VS 2005, and Binutils began supporting it
for x86-64 in 2013 and i386 in 2020. The format is now 20 years old and
well-established. An increasing amount of software is hitting the old,
meager COFF limitations. Rather than enable bigobj case-by-case, simply
switch to the new format by default.

This reduces compatibility with old linkers, but compatibility between
COFF toolchains has always been iffy. Even ignoring bigobj, Binutils and
MSVC link.exe already have limited object file compatibility for various
reasons.

A significant potential problem with changing the default is that the
Binutils developers didn't have the foresight to also add -mno-big-obj
at the same time, and so any change to the default at the very least
results in a flag day. This change does not introduce -mno-big-obj, so
it is not possible to produce objects in the old format.
This commit is contained in:
Christopher Wellons
2024-12-31 13:36:08 -05:00
parent ae1c0b677d
commit c9c9c07351

View File

@@ -68,6 +68,7 @@ WORKDIR /binutils-$BINUTILS_VERSION
COPY src/binutils-*.patch $PREFIX/src/
RUN sed -ri 's/(static bool insert_timestamp = )/\1!/' ld/emultempl/pe*.em \
&& sed -ri 's/(int pe_enable_stdcall_fixup = )/\1!!/' ld/emultempl/pe*.em \
&& sed -ri 's/(static int use_big_obj = )/\1!/' gas/config/tc-i386.c \
&& cat $PREFIX/src/binutils-*.patch | patch -p1
WORKDIR /x-binutils
RUN /binutils-$BINUTILS_VERSION/configure \