Go to file
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
config packages: fix typo in OpenWrt name 2014-12-07 16:53:30 +00:00
docs docs: update remaining references to functions.sh 2012-12-20 15:29:33 +00:00
include build: use gcc-provided ar, nm and ranlib where appropriate 2014-12-27 12:59:59 +00:00
package hostapd: add support for configuring supported rates 2014-12-27 12:59:47 +00:00
scripts scripts/config: fix segfault introduced in r43652 2014-12-13 14:01:26 +00:00
target fix mvneta vlan tagging 2014-12-26 14:48:33 +00:00
toolchain binutils: enable plugin support 2014-12-27 12:59:53 +00:00
tools tools/mtd-utils: add mirror md5sum 2014-12-22 13:52:58 +00:00
.gitattributes add .gitattributes to prevent the git autocrlf option from messing with CRLF/LF in files 2012-05-08 13:30:49 +00:00
.gitignore add git-src to .gitignore 2014-01-12 12:06:39 +00:00
BSDmakefile add missing copyright header 2007-02-26 01:05:09 +00:00
Config.in move menuconfig options into separate files 2013-11-22 14:30:40 +00:00
LICENSE finally move buildroot-ng to trunk 2016-03-20 17:29:15 +01:00
Makefile Revert "build: use ONESHELL to speed up scanning and the toplevel makefile" 2014-10-22 10:47:26 +00:00
README Add 'subversion' build dependency to README 2014-08-31 12:06:32 +00:00
feeds.conf.default Move telephony feed to github 2014-12-11 10:30:51 +00:00
rules.mk build: use gcc-provided ar, nm and ranlib where appropriate 2014-12-27 12:59:59 +00:00

README

This is the buildsystem for the OpenWrt Linux distribution.

Please use "make menuconfig" to configure your appreciated
configuration for the toolchain and firmware.

You need to have installed gcc, binutils, bzip2, flex, python, perl, make,
find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers.

Run "./scripts/feeds update -a" to get all the latest package definitions
defined in feeds.conf / feeds.conf.default respectively
and "./scripts/feeds install -a" to install symlinks of all of them into
package/feeds/.

Use "make menuconfig" to configure your image.

Simply running "make" will build your firmware.
It will download all sources, build the cross-compile toolchain, 
the kernel and all choosen applications.

You can use "scripts/flashing/flash.sh" for remotely updating your embedded
system via tftp.

The OpenWrt system is documented in docs/. You will need a LaTeX distribution
and the tex4ht package to build the documentation. Type "make -C docs/" to build it.

To build your own firmware you need to have access to a Linux, BSD or MacOSX system
(case-sensitive filesystem required). Cygwin will not be supported because of
the lack of case sensitiveness in the file system.


Sunshine!
	Your OpenWrt Project
	http://openwrt.org