Skip to content

Commit 103b45d

Browse files
committed
Disable LTO in both toolchains
LTO support on Windows is buggy, and occasionally I need to turn it off (-fno-lto) to avoid problems, so just disable it entirely. Also shaves about 9MiB off the distribution.
1 parent 41aff0c commit 103b45d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ RUN cat $PREFIX/src/gcc-*.patch | patch -d/gcc-$GCC_VERSION -p1 \
111111
--enable-version-specific-runtime-libs \
112112
--disable-dependency-tracking \
113113
--disable-nls \
114+
--disable-lto \
114115
--disable-multilib \
115116
CFLAGS_FOR_TARGET="-Os" \
116117
CXXFLAGS_FOR_TARGET="-Os" \
@@ -269,6 +270,7 @@ RUN /gcc-$GCC_VERSION/configure \
269270
--enable-threads=posix \
270271
--enable-version-specific-runtime-libs \
271272
--disable-dependency-tracking \
273+
--disable-lto \
272274
--disable-multilib \
273275
--disable-nls \
274276
--disable-win32-registry \
@@ -282,7 +284,7 @@ RUN /gcc-$GCC_VERSION/configure \
282284
&& make -j$(nproc) \
283285
&& make install \
284286
&& rm -rf $PREFIX/$ARCH/bin/ $PREFIX/bin/$ARCH-* \
285-
$PREFIX/bin/ld.bfd.exe $PREFIX/bin/c++.exe $PREFIX/bin/lto-dump.exe \
287+
$PREFIX/bin/ld.bfd.exe $PREFIX/bin/c++.exe \
286288
&& $ARCH-gcc -DEXE=g++.exe -DCMD=c++ \
287289
-Os -fno-asynchronous-unwind-tables \
288290
-Wl,--gc-sections -s -nostdlib \

0 commit comments

Comments
 (0)