Skip to content

Commit 658685a

Browse files
committed
depends: default to using GCC tool wrappers (with GCC)
This improves support for LTO by using gcc wrappers for ar, nm, ranlib, that correctly setup plugin arguments for LTO. Other HOSTS are using clang.
1 parent 6fdc13c commit 658685a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

depends/hosts/linux.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ ifneq ($(LTO),)
55
linux_CFLAGS += -flto
66
linux_CXXFLAGS += -flto
77
linux_LDFLAGS += -flto
8+
9+
linux_AR = $(host_toolchain)gcc-ar
10+
linux_NM = $(host_toolchain)gcc-nm
11+
linux_RANLIB = $(host_toolchain)gcc-ranlib
812
endif
913

1014
linux_release_CFLAGS=-O2

depends/hosts/mingw32.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ ifneq ($(LTO),)
99
mingw32_CFLAGS += -flto
1010
mingw32_CXXFLAGS += -flto
1111
mingw32_LDFLAGS += -flto
12+
13+
mingw32_AR = $(host_toolchain)gcc-ar
14+
mingw32_NM = $(host_toolchain)gcc-nm
15+
mingw32_RANLIB = $(host_toolchain)gcc-ranlib
1216
endif
1317

1418
mingw32_release_CFLAGS=-O2

depends/hosts/netbsd.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ ifneq ($(LTO),)
55
netbsd_CFLAGS += -flto
66
netbsd_CXXFLAGS += -flto
77
netbsd_LDFLAGS += -flto
8+
9+
netbsd_AR = $(host_toolchain)gcc-ar
10+
netbsd_NM = $(host_toolchain)gcc-nm
11+
netbsd_RANLIB = $(host_toolchain)gcc-ranlib
812
endif
913

1014
netbsd_CXXFLAGS=$(netbsd_CFLAGS)

0 commit comments

Comments
 (0)