1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00
openwrt/include
Felix Fietkau 9a46799804 build: use gcc-provided ar, nm and ranlib where appropriate
Since GCC 4.7, GCC provides its own wrappers around ar, nm and ranlib, which
should be used for builds with link-time optimization. Since GCC 4.9, using them
actually necessary for LTO builds using convenience libraries to succeed.

There are some packages which try to automatically detect if gcc-{ar,nm,ranlib}
exist (one example is my package "fastd" in the package repository, which tries
to use LTO). This breaks because the OpenWrt build system explicitly sets the
binutils versions of these tools.

As it doesn't cause any issues to use gcc-{ar,nm,ranlib} instead of
{ar,nm,ranlib} even without LTO, this patch just makes OpenWrt use the
GCC-provided versions by default, which fixes the build of such packages with
GCC 4.9.

(I know that builds fail though when clang is used with -flto and
gcc-{ar,nm,ranlib}, but as all OpenWrt toolchains are based on GCC, this isn't
a real issue.)

Completely cleaning the tree (or at least `make clean toolchain/clean`) is
necessary to get a consistent state after the binutils plugins support patch and
this one (as trying to use gcc-{ar,nm,ranlib} with a binutils built without
plugin support will definitely lead to a build failure).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 43784
2014-12-27 12:59:59 +00:00
..
site aarch64: add initial support 2014-11-24 06:33:13 +00:00
autotools.mk
cmake.mk build: use gcc-provided ar, nm and ranlib where appropriate 2014-12-27 12:59:59 +00:00
debug.mk
depends.mk
device_table.txt image: ensure that /dev/console exist in rootfs images 2013-08-27 12:02:58 +00:00
download.mk include/download.mk: Add download mirrors for tools from GNU Savannah (bug #15184) 2014-10-08 08:01:39 +00:00
feeds.mk build: improve feed handling for opkg.conf 2014-10-16 10:30:16 +00:00
host-build.mk build: prevent spurious host-build re-builds by touching .built after the install command before touching .installed 2014-12-15 20:14:27 +00:00
host.mk
image.mk don't copy initramfs.elf unconditionally 2014-12-26 14:31:45 +00:00
kernel-build.mk kernel-build.mk: add .NOTPARALLEL 2014-10-12 15:00:19 +00:00
kernel-defaults.mk kernel: allow specifying kernel images to be copied separately from kernel make command line 2014-12-11 15:29:33 +00:00
kernel-version.mk kernel: update linux 3.18 to final release 2014-12-08 13:16:35 +00:00
kernel.mk kernel.mk: Handle the x86_64 LINUX_KARCH case 2014-12-12 18:28:13 +00:00
netfilter.mk kernel: add a patch to make netfilter conntrack cache routing information 2014-12-09 11:01:49 +00:00
nls.mk
package-bin.mk include: remove SDK exception from package install targets 2014-07-02 11:39:28 +00:00
package-defaults.mk build: add support for declaring package CONFLICTS which only affect selecting built-in packages 2014-10-05 16:41:33 +00:00
package-dumpinfo.mk generate list of license information for packages 2014-10-26 16:57:33 +00:00
package-ipkg.mk include: unbreak conffiles, postinst & prerm exports 2014-10-24 09:24:51 +00:00
package.mk build: clean up and optimize ipkg control generator code 2014-10-22 08:57:16 +00:00
prereq-build.mk prereq-build: rename the openssl check to libssl, add back the old check - it is required after all 2014-10-20 09:23:55 +00:00
prereq.mk prereq.mk: only define .NOTPARALLEL when processing prereq checks 2014-10-12 15:00:41 +00:00
quilt.mk
scan.mk Revert "build: use ONESHELL to speed up scanning and the toplevel makefile" 2014-10-22 10:47:26 +00:00
scons.mk
shell.sh Revert "include/shell.sh: remove getvar()" 2014-10-26 16:18:24 +00:00
subdir.mk build: do not process built-in rules for make subdirs 2014-10-22 08:57:11 +00:00
target.mk target.mk: add default packages for NAS device-type 2014-11-26 08:59:49 +00:00
toolchain-build.mk
toplevel.mk Fix build when TAR_OPTIONS env variable is set 2014-10-06 04:53:14 +00:00
uclibc++.mk
unpack.mk partially revert "build: remove check for nonexistant CONFIG_TAR_VERBOSITY variable and move TAR_OPTIONS to unpack.mk" 2014-03-22 19:52:48 +00:00
verbose.mk
version.mk base-files: properly escape strings for version info 2014-07-29 13:30:23 +00:00