Commit Graph

186 Commits

Author SHA1 Message Date
Steven Barth
55fe8b2988 toolchain: only use fortify-headers for musl
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46138
2015-06-29 06:47:49 +00:00
Steven Barth
2738526a16 toolchain: add fortify-headers, enable FORTIFY_SOURCE by default
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46117
2015-06-23 14:38:03 +00:00
Felix Fietkau
a778060392 toolchain: switch to musl by default, except for mips64
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45995
2015-06-15 23:05:08 +00:00
Felix Fietkau
beca028bd6 build: add integration for managing opkg package feed keys
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45286
2015-04-06 19:39:51 +00:00
John Crispin
6c434d5f06 rules.mk: add newline definition
To be used for stuff like $(subst $(space),$(newline),$(SOME_VAR))

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 44796
2015-03-15 19:47:46 +00:00
Jo-Philipp Wich
24f49b170e rules.mk: don't add staging_dir/host/bin/ path again
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44379
2015-02-10 15:49:36 +00:00
Jo-Philipp Wich
2efe776ab0 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>

SVN-Revision: 44377
2015-02-10 15:48:48 +00:00
Jo-Philipp Wich
1162d6b721 rules.mk: use relative paths for BASH, TAR, FIND, PATCH, PYTHON
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44294
2015-02-06 12:35:36 +00:00
Jo-Philipp Wich
78f476ed02 include: declare variables formerly set in tmp/.host.mk
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44272
2015-02-05 16:57:18 +00:00
Felix Fietkau
60629e1695 build: do not assume that gcc-{ar,ranlib,nm} is usable with an external toolchain
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43911
2015-01-10 16:14:25 +00:00
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
Felix Fietkau
20a3814a9c 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>

SVN-Revision: 43018
2014-10-22 08:57:20 +00:00
Felix Fietkau
d081edf7eb build: clean up and optimize ipkg control generator code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43017
2014-10-22 08:57:16 +00:00
John Crispin
7557afa9a5 build: add $(STAGING_DIR_HOST)/usr/{include, lib} to build search path.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 42987
2014-10-20 06:29:21 +00:00
Felix Fietkau
c541b31e40 build: override hardcoded paths to bison and m4 to make the SDK more relocatable
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42300
2014-08-26 12:15:50 +00:00
Felix Fietkau
627e974c99 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

SVN-Revision: 40006
2014-03-22 19:52:48 +00:00
Felix Fietkau
e71ec4cb55 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>

SVN-Revision: 39982
2014-03-21 15:54:14 +00:00
Felix Fietkau
51ae801ee3 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>

SVN-Revision: 39980
2014-03-21 15:54:07 +00:00
Felix Fietkau
00bcebeb4c build: remove check for nonexistant CONFIG_TAR_VERBOSITY variable and move TAR_OPTIONS to unpack.mk
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39979
2014-03-21 15:54:03 +00:00
Felix Fietkau
318052e03c build: add a variable for the name of the {build,staging}_dir/{target,toolchain}-* directories
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39857
2014-03-10 11:12:32 +00:00
Imre Kaloz
f6b57149af 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>

SVN-Revision: 38943
2013-11-29 10:59:51 +00:00
Imre Kaloz
f0721fa502 allow configuration of the target directory for binaries
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 38890
2013-11-22 09:39:41 +00:00
Felix Fietkau
e0189ccef4 build: include the cpu type as part of the toolchain/target directory name
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38214
2013-09-26 17:53:32 +00:00
Felix Fietkau
a1a5f59ea3 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>

SVN-Revision: 37770
2013-08-14 13:02:29 +00:00
Felix Fietkau
73c4d73d6d build: unify target independent optimization options
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37600
2013-07-29 09:38:29 +00:00
Felix Fietkau
5d1c80f002 build: add required exports for dependency tracking
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37387
2013-07-18 11:18:37 +00:00
Felix Fietkau
1c742fb388 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>

SVN-Revision: 37228
2013-07-10 15:11:29 +00:00
Felix Fietkau
e3a28f415b rules.mk: use qstrip to reduce syntax highlighting issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37225
2013-07-10 14:51:09 +00:00
Felix Fietkau
2430e9a4f5 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>

SVN-Revision: 36594
2013-05-09 20:50:49 +00:00
John Crispin
c2c1f9ae73 rules.mk: add _dsp to ARCH_SUFFIX if the dsp ase is used
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36566
2013-05-06 16:45:51 +00:00
Florian Fainelli
e032922266 toolchain: allow choosing the MIPS64 user-land ABI
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 36205
2013-04-05 12:36:23 +00:00
Florian Fainelli
348cae15d2 buildroot: factor knowledge of a 64bits architecture
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 36204
2013-04-05 12:36:19 +00:00
Florian Fainelli
9e1d2c15d9 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>

SVN-Revision: 36202
2013-04-05 12:36:12 +00:00
Florian Fainelli
be5d8e6c87 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>

SVN-Revision: 36198
2013-04-05 12:35:56 +00:00
Florian Fainelli
5b3445c60b 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>

SVN-Revision: 36197
2013-04-05 12:35:53 +00:00
Felix Fietkau
3d6093c275 build: add a HOSTCXX variable pointing at the c++ compiler
SVN-Revision: 36109
2013-03-22 12:52:17 +00:00
Gabor Juhos
2d9e89b24c fix ARCH_SUFFIX for mips64{,el}r2
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35688
2013-02-20 06:49:02 +00:00
Jo-Philipp Wich
236c369a89 rules.mk: only select latest libgcc.a with wildcard match (#12798)
SVN-Revision: 35144
2013-01-13 20:59:51 +00:00
Jo-Philipp Wich
993ac4600a rules.mk: don't use $(realpath) in file_copy, the destination directory might not exist yet - spotted while doing a fresh build
SVN-Revision: 34447
2012-12-02 15:15:07 +00:00
Jo-Philipp Wich
828597693e rules.mk: provide a macro "file_copy" which removes any symlink in the destination dir that would be overwritten
SVN-Revision: 34437
2012-12-02 12:20:34 +00:00
Jo-Philipp Wich
2371c6542e rules.mk: fix misspelled config symbol introduced by r34300
SVN-Revision: 34304
2012-11-23 10:12:18 +00:00
Jo-Philipp Wich
a21fbec006 rules.mk: append libc implementation to bin directory name if not using uClibc
SVN-Revision: 34300
2012-11-22 13:43:30 +00:00
Felix Fietkau
44cd20b802 build: rework the package/install step - collect package install lists during package/compile, then install all packages at once
SVN-Revision: 33631
2012-10-06 16:01:06 +00:00
Felix Fietkau
28665d55cd rules.mk: add TARGET_AR and TARGET_RANLIB
SVN-Revision: 33508
2012-09-22 20:10:24 +00:00
Jo-Philipp Wich
8726a422cd do not pass optimization flags in HOST_CPPFLAGS (#12153)
SVN-Revision: 33351
2012-09-09 21:35:42 +00:00
John Crispin
1c53dda443 remove duplicate HOSTCC_NOCACHE
SVN-Revision: 33088
2012-08-10 19:07:03 +00:00
Florian Fainelli
fb9023bb8a move LIB_SUFFIX from base-files to rules.mk
Some packages are going to need fixups based on LIB_SUFFIX

SVN-Revision: 33080
2012-08-10 14:15:06 +00:00
John Crispin
370894e594 fix up scons vs ccache
SVN-Revision: 32902
2012-07-28 21:06:59 +00:00
John Crispin
f6ef96fab2 add and export HOSTCC_NOCACHE
SVN-Revision: 32466
2012-06-20 07:48:47 +00:00
Felix Fietkau
4d8cd3afc0 make librpc compatible with eglibc, unconditionally enable it for packages that need rpc support
SVN-Revision: 32129
2012-06-08 15:10:18 +00:00