kumquat-buildroot/support/scripts
Yann E. MORIN 2a82bb8a90 support/check-kernel-headers: fix old custom toolchains without -print-sysroot
Old toolchains, with old gcc that do not support -print-sysroot, break the
kernel-headers version check script: it fails to find the sysroot of the
toolchain, and thus ends up including the host's linux/version.h.

Most of the time, this will break early, since the host's kernel headers
will not match the toolchain settings.

But it can happen that the check is succesful, although the configuration
of the toolchain is wrong:

  - the custom toolchain has kernel headers vX.Y
  - the user selected vX.Z  (Z!=Y)
  - the host has headers vX.Y

In this case, the check passes OK, but the build of some packages later on
will break (which is exactly what those _AT_LEAST_XXX options were added to
avoid).

Fix that by passing the sysroot to the check script, instead of the cross
compiler.

We get the sysroot as thus:

  - for custom toolchains, we use the macro toolchain_find_sysroot. We can
    do that, because we already have a complete sysroot with libc.a at that
    time.

  - for internal toolchain using a custom kernel headers version, we just
    use $(STAGING_DIR). We can't use the macro as for custom toolchains
    above, because at the time we install the kernel headers, we do not yet
    have a complete sysroot with a libc.a.  But we can just use
    $(STAGING_DIR), since we're only interested in the kernel headers.

For all other types of toolchains, we already have the _AT_LEAST_XXX options
properly set, so we need not add a check in this case.

Fixes:
    http://autobuild.buildroot.net/results/f33/f331a6eff0b0b93c73af52db3a6b43e4e598577e/
    http://autobuild.buildroot.net/results/a57/a5797c025bec50c10efdcff74945aab4021d05e4/
    [...]

[Thanks to Thomas for pointing out the toolchain_find_sysroot macro!]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-04-09 01:38:10 +02:00
..
apply-patches.sh apply-patches.sh: make scan_patchdir work recursively 2014-02-08 22:26:16 +01:00
build-ext3-img
check-kernel-headers.sh support/check-kernel-headers: fix old custom toolchains without -print-sysroot 2014-04-09 01:38:10 +02:00
eclipse-register-toolchain eclipse support: document script and add checks 2013-01-14 21:45:09 +01:00
gen-manual-lists.py deprecated handling: introduce BR2_DEPRECATED_SINCE_xxxx_xx 2014-01-10 15:03:53 +01:00
graph-build-time graphs: support generating png graphs 2013-12-29 12:13:25 +01:00
graph-depends Merge branch 'next' 2013-06-02 16:33:05 +02:00
kconfiglib.py manual: fix manual generation in preparation for BR2_EXTERNAL support 2013-12-08 22:32:02 +01:00
mkmakefile Makefile: fix out-of-tree builds with multiple targets with 'all' 2013-11-06 23:24:47 +01:00
mkusers support/mkusers: fix warnings when adding a new user 2014-04-05 18:39:16 +02:00
pkg-stats pkg-stats: update set of files to skip 2013-09-11 13:00:58 +02:00
readme.kconfiglib support: add kconfiglib python module 2013-05-04 12:27:00 +02:00
scancpan script/scancpan: add -host & -target options 2014-04-04 23:31:06 +02:00
setlocalversion setlocalversion: sync with Linux kernel version (2.6.34) 2013-09-04 11:58:12 +02:00
xorg-release scripts: xorg-release: handle case when version needs downgrade 2014-02-04 10:32:11 +01:00

Readme
======

Kconfiglib
----------

This python module, developped by Ulf Magnusson and released under the ISC
license, is fetched from:

https://github.com/ulfalizer/Kconfiglib
commit: 02103fba9ae32a78291af53e50ee5d4bb3f69c1e

Kconfiglib license
~~~~~~~~~~~~~~~~~~

License (ISC)

Copyright (c) 2011-2013, Ulf Magnusson <ulfalizer@gmail.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.