Felix Fietkau
86605d34c4
build: add -Wno-error=unused-result to target cflags
...
Many glibc functions have __warn_unused_result__ in so many different
core functions, and failing the build for all of those simply does not
make any sense
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of r47440
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47607 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-11-23 14:03:03 +00:00
Felix Fietkau
741a0576ad
build: add integration for managing opkg package feed keys
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45286 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-04-06 19:39:51 +00:00
John Crispin
eff9c0f696
rules.mk: add newline definition
...
To be used for stuff like $(subst $(space),$(newline),$(SOME_VAR))
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44796 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-03-15 19:47:46 +00:00
Jo-Philipp Wich
88dfba73ef
rules.mk: don't add staging_dir/host/bin/ path again
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44379 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-10 15:49:36 +00:00
Jo-Philipp Wich
6da5c89178
scripts: extend rstrip.sh to remove bad rpaths
...
Remove all rpath entries which do not point to a location below /lib or
/usr/lib and which do not begin with '$ORIGIN'.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44377 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-10 15:48:48 +00:00
Jo-Philipp Wich
f40bdb6b86
rules.mk: use relative paths for BASH, TAR, FIND, PATCH, PYTHON
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44294 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-06 12:35:36 +00:00
Jo-Philipp Wich
b65868e954
include: declare variables formerly set in tmp/.host.mk
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44272 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-02-05 16:57:18 +00:00
Felix Fietkau
81fceec185
build: do not assume that gcc-{ar,ranlib,nm} is usable with an external toolchain
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43911 3c298f89-4303-0410-b956-a3cf2f4a3e73
2015-01-10 16:14:25 +00:00
Felix Fietkau
6c2782f025
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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43784 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-12-27 12:59:59 +00:00
Felix Fietkau
3da7d95965
rules.mk: reduce shexport to one line to allow it to be put in a target context
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43018 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-10-22 08:57:20 +00:00
Felix Fietkau
09976aa562
build: clean up and optimize ipkg control generator code
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43017 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-10-22 08:57:16 +00:00
John Crispin
ff763853bc
build: add $(STAGING_DIR_HOST)/usr/{include, lib} to build search path.
...
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42987 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-10-20 06:29:21 +00:00
Felix Fietkau
0b67a9fef5
build: override hardcoded paths to bison and m4 to make the SDK more relocatable
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42300 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-08-26 12:15:50 +00:00
Felix Fietkau
e7a9ff8b70
partially revert "build: remove check for nonexistant CONFIG_TAR_VERBOSITY variable and move TAR_OPTIONS to unpack.mk"
...
This complicates the evaluation order for some packages
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40006 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-03-22 19:52:48 +00:00
Felix Fietkau
0406a37593
build: remove GREP_OPTIONS export from rules.mk, defining it in the top-level Makefile is enough
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39982 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-03-21 15:54:14 +00:00
Felix Fietkau
6b7bcb9292
build: remove check to nonexistant CONFIG_ENABLE_LOCALE variable and move DISABLE_NLS to package-defaults.mk
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39980 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-03-21 15:54:07 +00:00
Felix Fietkau
adc4005450
build: remove check for nonexistant CONFIG_TAR_VERBOSITY variable and move TAR_OPTIONS to unpack.mk
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39979 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-03-21 15:54:03 +00:00
Felix Fietkau
9f91b508aa
build: add a variable for the name of the {build,staging}_dir/{target,toolchain}-* directories
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39857 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-03-10 11:12:32 +00:00
Imre Kaloz
0fdebf9347
FPU type should not interfere with the ABI selection.
...
Also make sure we either do real soft-float or hard-float on ARM, with the right options.
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38943 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-29 10:59:51 +00:00
Imre Kaloz
3f7b7dc29e
allow configuration of the target directory for binaries
...
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38890 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-22 09:39:41 +00:00
Felix Fietkau
be6662ecdf
build: include the cpu type as part of the toolchain/target directory name
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38214 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-09-26 17:53:32 +00:00
Felix Fietkau
64584aa1fc
build: decouple the mips16 support flag from the toolchain
...
Add the flags from package.mk instead, and leave libc and gcc
unaffected.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37770 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-08-14 13:02:29 +00:00
Felix Fietkau
01695667a8
build: unify target independent optimization options
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37600 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-29 09:38:29 +00:00
Felix Fietkau
61b763d414
build: add required exports for dependency tracking
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37387 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-18 11:18:37 +00:00
Felix Fietkau
920880de04
build: move the XARGS variable out of the host checks, since a working xargs is built in tools/
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37228 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-10 15:11:29 +00:00
Felix Fietkau
ac72309525
rules.mk: use qstrip to reduce syntax highlighting issues
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37225 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-10 14:51:09 +00:00
Felix Fietkau
30e9f35428
toolchain: eliminate the INSTALL_LIBSTDCPP config symbol and make c++ support mandatory - fixes recursive config symbol dependency issues
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36594 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-05-09 20:50:49 +00:00
John Crispin
d8eb7a4caf
rules.mk: add _dsp to ARCH_SUFFIX if the dsp ase is used
...
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36566 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-05-06 16:45:51 +00:00
Florian Fainelli
a4fbc42a5a
toolchain: allow choosing the MIPS64 user-land ABI
...
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36205 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-04-05 12:36:23 +00:00
Florian Fainelli
d32ac499b8
buildroot: factor knowledge of a 64bits architecture
...
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36204 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-04-05 12:36:19 +00:00
Florian Fainelli
e861f11c45
buildroot: allow enabling MIPS16 user-space build
...
Enabling MIPS16 is made conditional on advertising the "mips16" feature
for a specific target since it requires support from the CPU
(HAS_MIPS16) and the actual use of MIPS16 for building packages
(USE_MIPS16).
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36202 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-04-05 12:36:12 +00:00
Florian Fainelli
f04de2f5d2
rules.mk: MIPS16 builds get a different toolchain
...
To be safe, build "m16" into the toolchain and target architecture the
same way mips32r2 does:
target-mips_r2_m16_uClibc-0.9.33.2
toolchain-mips_r2_m16_gcc-4.6-linaro_uClibc-0.9.33.2
Signed-off-by: Jay Carlson <nop@nop.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36198 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-04-05 12:35:56 +00:00
Florian Fainelli
a5e7050033
rules.mk: Create TARGET_ASFLAGS; force -mno-mips16
...
Create and use a TARGET_ASFLAGS, defaulting to TARGET_CFLAGS.
MIPS .S files reasonably assume they are not in mips16 mode. Because
"-mips16 -mno-mips16" results in -mno-mips16, I can append that to the
TARGET_ASFLAGS. This should be done with $(filter-out)?
Signed-off-by: Jay Carlson <nop@nop.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36197 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-04-05 12:35:53 +00:00
Felix Fietkau
cd9eb981de
build: add a HOSTCXX variable pointing at the c++ compiler
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36109 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-03-22 12:52:17 +00:00
Gabor Juhos
65da6815b3
fix ARCH_SUFFIX for mips64{,el}r2
...
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35688 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-02-20 06:49:02 +00:00
Jo-Philipp Wich
dd62d0cc9c
rules.mk: only select latest libgcc.a with wildcard match ( #12798 )
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35144 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-01-13 20:59:51 +00:00
Jo-Philipp Wich
77febe3142
rules.mk: don't use $(realpath) in file_copy, the destination directory might not exist yet - spotted while doing a fresh build
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34447 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-12-02 15:15:07 +00:00
Jo-Philipp Wich
0e9a69f081
rules.mk: provide a macro "file_copy" which removes any symlink in the destination dir that would be overwritten
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34437 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-12-02 12:20:34 +00:00
Jo-Philipp Wich
689c9782b3
rules.mk: fix misspelled config symbol introduced by r34300
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34304 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-11-23 10:12:18 +00:00
Jo-Philipp Wich
c596ba2220
rules.mk: append libc implementation to bin directory name if not using uClibc
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34300 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-11-22 13:43:30 +00:00
Felix Fietkau
6683f47568
build: rework the package/install step - collect package install lists during package/compile, then install all packages at once
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33631 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-10-06 16:01:06 +00:00
Felix Fietkau
0c12b233e7
rules.mk: add TARGET_AR and TARGET_RANLIB
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33508 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-09-22 20:10:24 +00:00
Jo-Philipp Wich
9c8ed9e702
[buildroot] do not pass optimization flags in HOST_CPPFLAGS ( #12153 )
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33351 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-09-09 21:35:42 +00:00
John Crispin
df21869cae
[rules.mk] remove duplicate HOSTCC_NOCACHE
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33088 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-08-10 19:07:03 +00:00
Florian Fainelli
8c0856ac4c
[buildroot] move LIB_SUFFIX from base-files to rules.mk
...
Some packages are going to need fixups based on LIB_SUFFIX
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33080 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-08-10 14:15:06 +00:00
John Crispin
7c4db9ed38
[include] fix up scons vs ccache
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32902 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-28 21:06:59 +00:00
John Crispin
b6e06ce98b
add and export HOSTCC_NOCACHE
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32466 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-20 07:48:47 +00:00
Felix Fietkau
8da44b5fc9
make librpc compatible with eglibc, unconditionally enable it for packages that need rpc support
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32129 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-08 15:10:18 +00:00
John Crispin
e84fbcf5bc
[tools] add ccache wrapper
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32075 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-06 13:27:11 +00:00
John Crispin
45879534fd
[include] Use build suffix on build_dir paths
...
Adds BUILD_SUFFIX to STAGING_DIR
Signed-off-by: Tathagata Das <tathagata@alumnux.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31233 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-04-10 10:55:55 +00:00