Commit Graph

200 Commits (05d73a2a73794f8a978300eac75e25deae6d0626)

Author SHA1 Message Date
Felix Fietkau c8cbe7aba2 build: disable the use of -iremap for UML (#21851)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48718
8 years ago
Jo-Philipp Wich 064761d1db rules.mk: add TARGET_INIT_PATH toplevel variables
Add a new variable TARGET_INIT_PATH which holds the default $PATH variable
value configured in menuconfig.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48676
8 years ago
Felix Fietkau c5d74630c5 build: filter out -fno-plt for the kernel build, fixes #21712
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48515
8 years ago
Felix Fietkau b737686b2c build: use -iremap feature to replace __FILE__ absolute path names in packages with ones relative to $(BUILD_DIR)
improves reproducible builds

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48489
8 years ago
Felix Fietkau 579e9620c6 rules.mk: make the locked template available even if flock has not been built yet (fall back to unlocked shell command)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48414
8 years ago
Felix Fietkau c7308bc9f1 build: use a separate variable checking the subdir path (for host packages)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48410
8 years ago
Felix Fietkau 03bc8d94f0 host-build.mk: change default installation prefix of package/* host builds to staging_dir/target-*/host
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48401
8 years ago
Felix Fietkau 36502c5a6f build: move host build directories of package/* to build_dir/target-*/host/
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48400
8 years ago
Felix Fietkau 0628630664 build: add pure make tolower/toupper funtions that do not require shell calls
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48105
8 years ago
Felix Fietkau f7939f5e74 gcc: remove version 4.6, it is no longer needed
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47443
9 years ago
Felix Fietkau 940bc81bc2 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>

SVN-Revision: 47440
9 years ago
Felix Fietkau 279c8bee8d rules.mk: export STAGING_DIR_HOST to sub-makefiles and shells
Certains host packages (like quilt) need to know the previously used
install location at run-time. They currently use $STAGING_DIR, which
causes issues on cleaned environment, where $STAGING_DIR doesn't exist
yet.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 47409
9 years ago
Felix Fietkau 3bbb927728 build: Allow kernel modules to set build ID debug symbol
This change adds support for specifying a build ID for kernel modules.
This is done by setting PKG_BUILD_ID to a hexadecimal string, which will
then be passed to the kernel linker. In addition, when this flag is set,
the build ID debug symbol (.note.gnu.build-id) will not be stripped from
the kernel module. This symbol is exported in sysfs by the kernel (if
the kernel is compiled with CONFIG_KALLSYMS) and so can be used to
uniquely identify a version of a kernel module in a running kernel. This
is useful for keeping track of different versions of a module when doing
experiments and development.

Modules that specify the build ID will be ~100 bytes larger (depending
on the length of the build ID specified). There is no size difference
for kernel modules that do not set this variable.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>

SVN-Revision: 47290
9 years ago
Felix Fietkau 59bffdaa64 rules.mk: remove GCC 4.4 and GCC 4.5 conditional
gcc 4.4 was removed in r44957 gcc: remove 4.4.7 (only used by avr32)
gcc 4.5 was removed in r36149

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46722
9 years ago
Steven Barth 55fe8b2988 toolchain: only use fortify-headers for musl
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46138
9 years ago
Steven Barth 2738526a16 toolchain: add fortify-headers, enable FORTIFY_SOURCE by default
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46117
9 years ago
Felix Fietkau a778060392 toolchain: switch to musl by default, except for mips64
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45995
9 years ago
Felix Fietkau beca028bd6 build: add integration for managing opkg package feed keys
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45286
9 years ago
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
9 years ago
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
9 years ago
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
9 years ago
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
9 years ago
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
9 years ago
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
9 years ago
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
10 years ago
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
10 years ago
Felix Fietkau d081edf7eb build: clean up and optimize ipkg control generator code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43017
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
11 years ago
Imre Kaloz f0721fa502 allow configuration of the target directory for binaries
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 38890
11 years ago
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
11 years ago
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
11 years ago
Felix Fietkau 73c4d73d6d build: unify target independent optimization options
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37600
11 years ago
Felix Fietkau 5d1c80f002 build: add required exports for dependency tracking
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37387
11 years ago
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
11 years ago
Felix Fietkau e3a28f415b rules.mk: use qstrip to reduce syntax highlighting issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37225
11 years ago
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
11 years ago
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
11 years ago
Florian Fainelli e032922266 toolchain: allow choosing the MIPS64 user-land ABI
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 36205
11 years ago
Florian Fainelli 348cae15d2 buildroot: factor knowledge of a 64bits architecture
Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 36204
11 years ago
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
11 years ago
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
11 years ago
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
11 years ago
Felix Fietkau 3d6093c275 build: add a HOSTCXX variable pointing at the c++ compiler
SVN-Revision: 36109
11 years ago