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 autotools.mk: add a gettext-version PKG_FIXUP (#11236) 2012-10-10 17:53:51 +00:00
cmake.mk build: use gcc-provided ar, nm and ranlib where appropriate 2014-12-27 12:59:59 +00:00
debug.mk build: undefine debug helper templates used by subdir.mk if the DEBUG variable is empty, speeds up "make prereq" by 25% when lots of packages are installed 2011-04-03 03:40:01 +00:00
depends.mk change the recursive dependency template to use more make evaluation - the shell command got so long that it triggered "Argument list too long" on some systems (#8231) 2010-11-24 14:07:12 +00:00
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 build: move the XARGS variable out of the host checks, since a working xargs is built in tools/ 2013-07-10 15:11:29 +00:00
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 nls.mk: fix build dependency on gettext (#11829) 2012-07-11 10:05:00 +00:00
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 quilt: add a NO_RECONFIGURE override for compiling a package without re-running Build/Configure 2012-02-13 15:31:28 +00:00
scan.mk Revert "build: use ONESHELL to speed up scanning and the toplevel makefile" 2014-10-22 10:47:26 +00:00
scons.mk fix up scons vs ccache 2012-07-28 21:06:59 +00:00
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 toolchain: enable parallel build for uClibc, remove the obsolete TOOLCHAIN_PARALLEL config symbol 2012-10-17 13:03:08 +00:00
toplevel.mk Fix build when TAR_OPTIONS env variable is set 2014-10-06 04:53:14 +00:00
uclibc++.mk toolchain: eliminate the INSTALL_LIBSTDCPP config symbol and make c++ support mandatory - fixes recursive config symbol dependency issues 2013-05-09 20:50:49 +00:00
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 build: make the color of the 'configuration out of sync' warning red to make it harder for users to overlook 2013-03-17 21:12:02 +00:00
version.mk base-files: properly escape strings for version info 2014-07-29 13:30:23 +00:00