Skip to content

Commit cd131c7

Browse files
committed
Enabled LTO
1 parent 818eb68 commit cd131c7

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

Diff for: avr-gcc-patches/0001-gcc-lto-wrapper.patch

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- gcc/lto-wrapper.c.orig 2016-06-14 21:13:06.985134945 +0200
2+
+++ gcc/lto-wrapper.c 2016-06-14 21:15:37.825167119 +0200
3+
@@ -594,7 +594,7 @@
4+
filename[p - argv[i]] = '\0';
5+
file_offset = (off_t) loffset;
6+
}
7+
- fd = open (argv[i], O_RDONLY);
8+
+ fd = open (argv[i], O_RDONLY|O_BINARY);
9+
if (fd == -1)
10+
continue;
11+
sobj = simple_object_start_read (fd, file_offset, "__GNU_LTO",

Diff for: binutils.build.bash

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ CONFARGS=" \
5656
--disable-werror \
5757
--enable-install-libiberty \
5858
--enable-install-libbfd \
59+
--enable-lto \
60+
--enable-plugins\
61+
--with-pic \
5962
--target=avr"
6063

6164
CFLAGS="-w -O2 -g0 $CFLAGS" CXXFLAGS="-w -O2 -g0 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" ../binutils/configure $CONFARGS

Diff for: gcc.build.bash

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ pushd gcc
6161
#cat avr-mcus.def | awk -f genmultilib.awk FORMAT="Makefile" > t-multilib
6262
#popd
6363
pushd gcc
64+
for p in ../../avr-gcc-patches/*.patch
65+
do
66+
echo Applying $p
67+
patch -p1 < $p
68+
done
6469
autoconf
6570
popd
6671
popd

0 commit comments

Comments
 (0)