Commit Graph

75 Commits (7a315b0b5d6aa91695853a8647383876e4b49a7a)

Author SHA1 Message Date
Felix Fietkau 7a315b0b5d build: implement make check and make package/X/check
This is intended to be used for a wide array of package sanity checks.

The first check that is implemented is for the hash of downloaded files.
It checks:
  - Missing hash
  - Use of SHA256 instead of MD5
  - dl/<file> hash not matching hash in makefile
  - deprecated MD5SUM variable

The deprecated MD5SUM variable check is skipped for feeds/ until OpenWrt
is updated as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 881c5b47ec build: remove duplicate Download/default definition from include/host-build.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich b7f7e9fe42 include/host-build.mk: use STAGING_DIR_HOSTPKG
Instead of hardcoding $(STAGING_DIR)/host, use the new $(STAGING_DIR_HOSTPKG)
variable to refer to the directory.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Alexandru Ardelean 7c8c3226dc build: copy contents of 'src' folder to build dirs (if present)
The normal Prepare step for a build is unpack, apply patches.
But for certain packages, patches contain whole files, which
would be nice to have separately and copied over as a last step
in the Prepare phase.

We need it for some other packages + patches, but I think
the 'hostapd' package can be used as a test for this.

As a quick note:
the reason the condition is being evaluated as
`[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)`
and not with
`[ -d ./src/ ] && $(CP) ./src/* $(HOST_BUILD_DIR)`
is that the latter would translate in a build failure if the `src`
folder is not present (the exit code would be 1).
The first one, succeeds for both cases (if `src` present or not).

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years ago
Matthias Schiffer cb718eb34b
include/host-build.mk: set Host/Exports for Host/Install step
Having a different PATH in Host/Install than in other steps like Host/Build
is confusing and easily leads to mistakes. Setting all of Host/Exports
makes host builds match target builds (Build/Install is part of
$(STAMP_BUILT), which has Build/Exports set).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer 4ada2fd276
include/host-build.mk: fix ACLOCAL_INCLUDE
It seems the intention was to add both $(STAGING_DIR_HOST)/... and
$(STAGING_DIR)/host/... instead of passing $(STAGING_DIR_HOST) twice. This
makes the definition match HOST_CPPFLAGS and HOST_LDFLAGS.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer 7064a849ce
include/host-build.mk: pass HOST_BUILD_PREFIX to Host/install
Using HOST_BUILD_PREFIX instead of STAGING_DIR_HOST will make the argument
work as expected from packages.

Nothing changes for tools, for which HOST_BUILD_PREFIX and STAGING_DIR_HOST
are equivalent.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Felix Fietkau 4170267f5a build: pass $(STAGING_DIR_HOST) to Host/Install
makes it more consistent with package builds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Matthias Schiffer 6fb212f293
build: don't add -j for parallel builds with Make 4.2+
Make usually passes -j and jobserver arguments as part of MAKEFLAGS. LEDE
removes MAKEFLAGS to have better control of the build, and re-adds the
jobserver arguments with -j to the Make commandline where desired.

Make 4.2+ behave differently with these arguments passed on the commandline
than in MAKEFLAGS: -j will override the jobserver argument and the job
count will be unlimited.

Moving the flags to MAKEFLAGS will need many packages to be changed and
tested; therefore, we opt for a less invasive change for now and just
remove -j for Make 4.2+, as the jobserver argument alone is enough to
enable parallel builds for these Make versions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
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 48374a3a9c build: include homebrew include/library directory in cflags/ldflags on mac os x
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47139
9 years ago
Felix Fietkau c99c9f875e build: set CCACHE_DIR for host builds
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45427
9 years ago
Jo-Philipp Wich 60eef7aefd include: use SHELL, not BASH for HOST_CONFIGURE_VARS
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44295
9 years ago
Jo-Philipp Wich 971ec0283c include: remove static tool linking support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44286
9 years ago
Felix Fietkau f6f0984c43 build: prevent spurious host-build re-builds by touching .built after the install command before touching .installed
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43721
10 years ago
Felix Fietkau 1f77bfff96 build: BSD compile fixes
following patch allows to build images for Qemu ARM on
OpenBSD 5.2 amd64 and FreeBSD 9.1 amd64.

Mostly small pieces of code changes to get things right on the
specific platform.

Updated the README to describe better, which tools on the host
are required. Added some kind of prepare scripts to install needed
tools on BSD via packages.

Signed-off-by: Waldemar Brodkorb <mail@waldemar-brodkorb.de>

SVN-Revision: 35900
11 years ago
Felix Fietkau 6d1884c583 build: fix host build stampfile usage, fixes spurious errors with missing opkg host binary after deleting the staging dir
SVN-Revision: 33776
12 years ago
Felix Fietkau ed2bf29be5 build: add the + token to any commands that can pass through the jobserver, fixes parallel build on some systems
SVN-Revision: 33523
12 years ago
Felix Fietkau 1c108d3318 host-build: add HOST_MAKE_FLAGS similar to package MAKE_FLAGS
SVN-Revision: 33509
12 years ago
Felix Fietkau b086475e1e build: ensure that package/host-build build system code does not run in parallel, fixes rare spurious parallel build failures
SVN-Revision: 33445
12 years ago
Felix Fietkau f19dbfff91 build: add jobserver support for host builds
SVN-Revision: 33423
12 years ago
Jo-Philipp Wich 8726a422cd do not pass optimization flags in HOST_CPPFLAGS (#12153)
SVN-Revision: 33351
12 years ago
Jo-Philipp Wich 29b91ef01a introduce a menuconfig option to turn off static linking of host utilities
SVN-Revision: 33154
12 years ago
Jo-Philipp Wich 94a96244f6 host-build.mk: define a variable HOST_STATIC_LINKING which is set to "-static" on non-Darwin systems
SVN-Revision: 33138
12 years ago
Felix Fietkau b50cfbb179 build: add PKG_MIRROR_MD5SUM support for host builds
SVN-Revision: 32082
12 years ago
John Crispin ccb6b0a063 tools: clean up Makefiles / make ccache work
SVN-Revision: 29754
13 years ago
Felix Fietkau d288f855e3 add a missing wrapper for the refresh target for host builds
SVN-Revision: 25193
13 years ago
Jo-Philipp Wich dbf8d9c516 - implement hooks for hostbuilds - use host build hooks to implement fixups for host build - move separator declaration to rules.mk
SVN-Revision: 24551
14 years ago
Felix Fietkau 380ea005e1 use PREFIX/bin instead of PREFIX/sbin for all host builds (fixes e2fsprogs path)
SVN-Revision: 24103
14 years ago
Michael Büsch 050902efd7 deptest: Install of host tools has to be forced for every test, because the host staging dir is cleaned prior a test.
SVN-Revision: 23825
14 years ago
Michael Büsch dc7a68165d Fix typo
SVN-Revision: 23482
14 years ago
Michael Büsch d4807cf557 Support force-disabling per-package parallel build with {PKG,HOST}_BUILD_PARALLEL:=0
SVN-Revision: 23480
14 years ago
Michael Büsch fde498904f Add an option to default the default build rule to parallel build.
SVN-Revision: 22737
14 years ago
Michael Büsch f4daa84832 Also support parallel build for host-packages
SVN-Revision: 22698
14 years ago
Travis Kemen cf7199f48b this patch fixes toolchain parallel build, which reduces build time.
In order to enable parallel build, change line 21 of
include/host-build.mk from:

override MAKEFLAGS=

to:

override MAKEFLAGS=$(MAKE_JOBS)

-Raphael

SVN-Revision: 19995
14 years ago
Lars-Peter Clausen 144fd07cd8 Prevent unnecessary host package rebuilds.
Sometimes `make install` touches a file inside the build directory, so it is
betterr to create the build stamp after calling `make install` otherwise the
package is going to be rebuild even though nothing really changed.

SVN-Revision: 19021
15 years ago
Andy Boyett 1141aecd2a use $(HOST_CFLAGS) when not cross-compiling. Thanks Daniel Gimpelevich
SVN-Revision: 18232
15 years ago
Felix Fietkau 7de1e0f116 host build: do not hide the configure command
SVN-Revision: 17716
15 years ago
Felix Fietkau e3fc6c9b88 fix a typo that prevented host build specific variable exports from working
SVN-Revision: 15512
15 years ago
Nicolas Thill f0a3d4d501 add missing bits from [15451]
SVN-Revision: 15453
15 years ago
Felix Fietkau 63129f9b4c clean up automake/pkg-config handling, move separate host/package variable exports to templates, fix automake path for host builds
SVN-Revision: 15339
15 years ago
Felix Fietkau 729e0fa4d1 move pkg config stuff to per-target exports to prevent interference with host builds
SVN-Revision: 15299
15 years ago
Felix Fietkau 35073025b4 add a default template for Host/Install
SVN-Revision: 15110
15 years ago
Felix Fietkau 0a81b47617 fix calling the update target for host-only builds
SVN-Revision: 14997
15 years ago
Felix Fietkau 9b96b24e32 fix quilt variable and stampfile usage for host builds
SVN-Revision: 14910
15 years ago
Felix Fietkau 7ec4ad271e add PKG_HOST_ONLY variable to prevent target builds
SVN-Revision: 14906
15 years ago
Felix Fietkau ddcfaeb1e5 move host build in packages into a separate namespace: package/<name>/host/<target> this allows dependencies between host and target packages, and saves unnecessary host builds for packages that contain both variants
SVN-Revision: 14905
15 years ago
Felix Fietkau b29f9112df make the compile: host-install dependency independent of the order in which the makefiles were included
SVN-Revision: 14853
15 years ago
Felix Fietkau 252c2229f8 enable Host/Install on compile: if package.mk is included
SVN-Revision: 14852
15 years ago
Andy Boyett 4911754522 readd $(HOST_CONFIGURE_VARS) to Host/Configure/Default, missed in r14699
SVN-Revision: 14724
15 years ago