[STree] Pulled stree 'common-tool'
[STree] Pulled stree 'common-tool'

Squashed commit of the following:

commit 4f2ba31e80f9469441bff3c8dcffd9e66e8cacd2
Merge: abe6504 5a76dd8
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Wed Jun 17 09:47:50 2015 +1000

    Merge branch 'add-archives' of https://github.com/winksaville/common-tool into master

commit 5a76dd8e98b6dadfd8ff3421d029b7c0a165e438
Author: Wink Saville <wink@saville.com>
Date:   Sat Jun 13 10:44:12 2015 -0700

    Add ARCHIVES so .elf targets are rebuilt if a library archive changes.

commit abe6504fed64b227c5070ff7483ada787de7e2f4
Author: Anna Lyons <Anna.Lyons@nicta.com.au>
Date:   Wed Jun 10 10:42:23 2015 +1000

    Revert "Fix: Disable removal of intermediate artefacts in apps/libs."

    This reverts commit e2c7338ffbf19b78257eee247fa68aa1fe10e5d0, which caused
    the build system to fail to detect changes to libraries.

commit bbe19ea7e9fd88fd459dead6be1d2ffe6ce8e694
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Tue Jun 2 12:05:36 2015 +1000

    Remove `TOOLSUFFIX`.

    This is not set by any Kconfig variable, so is not currently available for
    users anyway. Additionally some other Makefiles and fragments directly refer to
    the compiler as `${TOOLPREFIX}gcc` so setting `TOOLSUFFIX` will not actually
    result in using the indicated compiler consistently. This includes the kernel's
    Makefile.

commit 97a6bc077602a76e5d8c147ee9eb78f2f63df1b6
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Jun 2 11:50:59 2015 +1000

    Export the x86 architecture for all x86 builds, not just IA32 ones, and export a build time symbol for 32-bit builds

commit 6debd43b0c986ee0673d59689a9e714fbc64f18b
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Jun 2 08:53:18 2015 +1000

    Name 32-bit x86 target files as ia32 to preserve backwards compatibility

commit 7199e1c4ad1fea0d2d89987c0759628705a19ca5
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Thu May 28 14:21:48 2015 +1000

    Sanitize the definitions that are exported and make x86 the architecture for IA32 builds

commit 479a099ab8df51fb0768cb86d660e801ed30882d
Author: Siwei Zhuang <siwei.zhuang@nicta.com.au>
Date:   Thu May 21 14:45:50 2015 +1000

    Avoid calling "grep" from build system.

commit 8ad7c988c75f553cae5860871e2d47eb6defabd2
Author: Siwei Zhuang <siwei.zhuang@nicta.com.au>
Date:   Thu May 21 14:19:58 2015 +1000

    Fixed typo. The gcc flag for armv7 with visualization extension should be
    "armv7ve".
    See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html for details.

commit e2c7338ffbf19b78257eee247fa68aa1fe10e5d0
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Mon May 18 20:23:35 2015 +1000

    Fix: Disable removal of intermediate artefacts in apps/libs.

    The main user-visible effect of this commit is that repeated builds without an
    intermediate `make clean` will no longer cause unnecessary re-compilation of C
    sources in applications and libraries.

    ----

    It seems many artefacts in applications and libraries are depended upon in
    multiple ways, some directly and some indirectly. If anything non-final is
    first discovered by Make via a chain of implicit rules, it is marked as an
    intermediate. As a consequence, it is deleted after a successful build (see
    section 10.4 of the GNU Make docs for a more thorough discussion of this).

    The next time a build is run, the implicit chain leading to that
    intermediate artefact is never considered because the final target of this
    already exists. Sometimes the same artefact (e.g. a .o file) is discovered as a
    target of a direct rule and gets rebuilt, but this time not deleted because it
    was not part of an implicit chain. From now on, builds do not redo this work
    because the intermediate exists. This paragraph is my speculation based on what
    I understand about GNU Make and what I've observed the build system doing, not
    directly from the GNU Make docs, and as such may be inaccurate.

    Rather than try to diagnose which rules are causing this behaviour, this commit
    retains any such intermediates, avoiding the problem entirely. The cost is an
    inflated build/ directory, but the user may wish to inspect these intermediate
    artefacts when debugging anyway. Relatedly, it was surprising to me to discover
    that we do not disable GNU Make's built-in rules (`SUFFIXES:`). With complex
    and inclusive Makefiles, I suspect the problematic behaviour is actually caused
    by a combination of explicit and built-in rules.

    Closes GINCA #16

commit 044fd1553f1878d25e0533ebac2d65009301d72e
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Mon May 11 18:46:58 2015 +1000

    Actually export the whole program optimisation option to the kernel

commit 1f9167c826c04e93613b3c3a8a99444b13a08533
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Mon May 11 15:12:07 2015 +1000

    Correctly calculate OUTPUT_FILE in files_to_obj.sh. Not using basename results in a bogus path in some circumstances

commit c03b5ef6d78e0411ab062df9ff516e07c574164f
Author: Nikhil Benesch <nikhil.benesch@gmail.com>
Date:   Sun May 10 12:40:06 2015 -0400

    remove --ignore-fail-on-nonempty flag to rmdir for posix compatibility

commit ad0c7af6aa301e9335a50ce45decaa971a13a538
Author: Nikhil Benesch <nikhil.benesch@gmail.com>
Date:   Sun May 10 12:37:33 2015 -0400

    remove -u flag to cp for posix compatibility

    cp -u is a GNU coreutils extension that's not present in the BSD
    versions of the tools. There's no portable equivalent to `cp -u` that I
    can find (without introducing a dependency on rsync), so just drop the
    flag and copy all files every time. In my tests, this has a negligible
    impact upon build time.

commit 17e3ff1d9880ef9e0fceff9419d93dd2e3bb4e78
Author: Nikhil Benesch <nikhil.benesch@gmail.com>
Date:   Sun May 10 12:24:58 2015 -0400

    replace realpath with posix utility equivalent

    realpath(1) wasn't added to GNU coreutils until v8.15 (January 2012) and
    is thus missing from a number of notable distributions, including OS X
    and CentOS. Its cousin readlink(1) is missing the necessary -f option to
    resolve symlinks on OS X.

    So replace realpath with `cd && pwd -P`, which is necessarily supported
    on all POSIX-compatible systems.

commit 7f016c43ea8ad2ce6b9d3536ee76740ef668e85e
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Tue Apr 28 14:29:09 2015 +1000

    Remove support for old CapDL loader and deprecated 'modules' concept.

    Previously there were two CapDL initialisers; the mainline verification target
    and an experimental version with device support. Only the first remains, which
    now has full support for devices and the experimental kernel's API. This commit
    removes build system support for the latter. To my knowledge, no one is
    currently using the deprecated initialiser or the build system concept of seL4
    modules.

    See also Github PR #1.

commit 11b3ecb2c1e3186aacd10c0ef31e37d160bdc70d
Author: Nikhil Benesch <nikhil.benesch@gmail.com>
Date:   Sat Apr 25 16:58:39 2015 -0400

    replace `echo -n` with `printf` for POSIX compatibility

    /bin/sh on OS X notably lacks support for `echo -n`, and `echo -n` is
    explicitly defined as not-portable by the POSIX standard. On shells
    whose echo lacks the `-n` flag, make output is garbled:

        [libs/libsel4utils] building...
         [HEADERS]
         -n  [STAGE]
         -n sel4utils

    Replace all instances of `echo -n` with `printf`, which is
    POSIX-compatible.

commit 392da986ac01e6a3c31e6057aef959bad10cefd4
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Tue Feb 24 18:21:11 2015 +1100

    Add a tool for manipulating .config files.

commit 39faa87bd8fbce1d9c2d1718eda8677c939a1262
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Feb 17 12:30:06 2015 +1100

    Revert "files_to_obj.sh: strip elf files before creating cpio."

    This reverts commit 30cc25937634704e81f935d51918e8059e5e7bdb.

    Blindly stripping user supplied files is not correct as the user
    may have wanted to use symbols in these files.

commit 30cc25937634704e81f935d51918e8059e5e7bdb
Author: akroh <Alexander.Kroh@nicta.com.au>
Date:   Sun Feb 15 21:03:28 2015 +1100

    files_to_obj.sh: strip elf files before creating cpio.

commit eca774a9ab731cb3079b7320a3e91b3a543399d1
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Jan 13 11:23:52 2015 +1100

    Make comment on binary file staging more clear

commit 33bcbc8043794e7efb0b64196e4b869ef2293fa3
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Jan 13 11:23:24 2015 +1100

    Add build expansions and paths for C++ files

commit 06f93186d0baa18ef2bf5dae457fa2c6f5dc2f53
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Jan 13 11:22:54 2015 +1100

    Use gnu98 by default instead of c++11 to avoid conflicts with muslc

commit 0ff66b77d31e8dfa4ec73cdf7009700dc7dec1b3
Author: akroh <Alexander.Kroh@nicta.com.au>
Date:   Thu Dec 18 10:49:01 2014 +1100

    Add support for zynq

commit 4dbf5c44f5e1b465102d15da7918a2ea7b3f0c98
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Mon Dec 8 09:38:40 2014 +1100

    common.mk: Add `sponge` to the accessible tools.

    This is useful for scenarios where you're running an external tool that has no
    ability to modify a file in-place but you want to do this anyway. Currently
    used in CAmkES, but lifted to here because it is generally applicable.

commit f0b356faf431dd6ee5ed0bcd69124897c9c6ad61
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Tue Dec 2 09:30:42 2014 +1100

    Remove Goanna build system options.

    These options were for enabling the Goanna static analyser within seL4 project
    builds. Wrapping each compiler invocation like this is now unnecessary and
    Goanna can be applied project-wide by building at the top-level with:

     `goannamake --with-cc=... --with-cxx=... --license-server=...`

commit 6c7707ffb55c12671e5640947575a03d3f71de3c
Merge: e3e9ab4 7a69e12
Author: Anna Lyons <anna.lyons@nicta.com.au>
Date:   Thu Nov 6 15:29:29 2014 +1100

    Merge pull request #8 from mfernandez/fmt

    Add FMT tool for reflowing C/C++ code.

commit e3e9ab4f50b1f1c9f37afd814fc160ab5db9d37c
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Thu Oct 23 15:57:15 2014 +1100

    Switch to gnu11 as the default C standard.

commit 7a69e12309b926b037c870bc89bf50f8bc44629c
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Wed Oct 22 15:12:30 2014 +1100

    Remove mistakenly committed warning.

commit 9996366da60e6e0b4fa1048017f7bfdbadfeb918
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Wed Oct 22 12:14:28 2014 +1100

    Add FMT tool for reflowing C/C++ code.

    For CAmkES it is often desirable to reformat our generated code to ease
    readability when debugging. The best tool I have found for doing this is
    clang-format. I have added it here to the common build system because there is
    nothing CAmkES-specific about the usage of this tool and I thought it might be
    of interest to others. This is opt-in and should have no effect on existing
    build system users.

commit 902bc60a1386c0ee31eb0197754269add7093c5a
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Mon Oct 20 13:55:09 2014 +1100

    cpio-strip: Remove libcpio workaround.

    fb50b5f4e0eedf1da877989a7a22b38ee3e77f4d of libcpio resolves the issue we were
    working around.

commit 5eb8ad64fe2882cafeb2fadfafc0d00a178d8e41
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Fri Oct 17 16:01:23 2014 +1100

    Test result of 'which cpio-strip' instead of 'set'

commit 551121f2d09f4e0fbce8ca21be0c56bc22a867d3
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Fri Oct 17 14:05:43 2014 +1100

    Remove reference to internal issue tracker.

    As per comments from Adrian on GINCA pull request #5.

commit ad218184de132ec09da3aaedaf54b7b0b4814393
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Fri Oct 17 14:03:06 2014 +1100

    Add licence header.

    Addressing Adrian's comments from GINCA pull request #5.

commit c5fcb291322005c00a196f152fdf5cd3eaf0a2e2
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Sat Oct 4 18:21:28 2014 +1000

    files_to_obj: Disable exit-on-error for as brief as possible.

    In particular, prior to this commit the failure of cpio-strip would not be
    noticed.

commit c2a5fc1322200464ac86c012b66ecd14e977bebc
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Sat Oct 4 18:21:09 2014 +1000

    cpio-strip: Use consistent method of bailing out.

commit 1c8ef6d79673749879d2850cc90a195915282526
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Sat Oct 4 18:04:40 2014 +1000

    cpio-strip: Enable full build warnings.

commit 86fbbf29c7a872334c1303d8778d08ae489b6459
Author: Matthew Fernandez <matthew.fernandez@nicta.com.au>
Date:   Sat Oct 4 15:18:16 2014 +1000

    Add code for optionally stripping CPIO archives.

    This is work towards repeatable builds of seL4 projects.

    JIRA: CAMKES-280

commit f3e5bd3cce7205da5e0df81209c8aa01f1889b37
Merge: 9ebf704 b2e734a
Author: Alexander Kroh <Alexander.Kroh@nicta.com.au>
Date:   Thu Oct 16 10:14:44 2014 +1100

    Merge pull request #6 from pchubb/master

    Add support for Odroid XU3

commit b2e734a557ddc7b5f6bd734f288e13701bf47e6e
Author: Peter Chubb <peter.chubb@nicta.com.au>
Date:   Wed Oct 15 13:04:07 2014 +1100

    Add support for Odroid XU3

    Define new flag, PLAT_EXYNOS54XX, as well as ...5422 and ...5410

commit 9ebf704c47a7a564829483fdf6e22b16a3846b4d
Author: akroh <Alexander.Kroh@nicta.com.au>
Date:   Mon Sep 29 15:54:41 2014 +1000

    Fix A15 AS flags: replaced -mtune with -mcpu.

commit fd716d21c1f1cee49fd38487e0ba534c98418b0d
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Sep 23 16:58:14 2014 +1000

    Correct A15 assembly flags

commit e774a5e6d1123609d3861bf0b74a19f8b24e7d8a
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Sep 23 16:35:53 2014 +1000

    Add asflags for cortex a9 and a15

commit 59fa79ac84685288b5485694db070edcde73d28e
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Tue Sep 16 12:41:46 2014 +1000

    Refactor build system flags and add C++ support

    We now assume all flags (CFLAGS, LDFLAGS and ASFLAGS) will be passed via the
    gcc layer in both kernel and non-kernel build and so will always have -Wl
    and -Wa prefixes respectively.

    Through Makefile.flags a CCFLAGS variable is used to represent flags that
    will eventually be appended to both C and CXX flags as it is expected these
    targets will have most of their flags in common.

    Most flags are common between both kernel and non-kernel builds and instead
    of building up two sets of flags the whole time common variables are used
    that are assigned to both

commit 06e8627241445fee576de34f65e1d1b808fcad64
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Thu Aug 28 10:15:58 2014 +1000

    Make entry point configurable and link against standard CRT files if provided by the C library

commit 7c8c863430e5ab73d6095fdbc3ed62ee190e36e8
Author: Peter Chubb <peter.chubb@nicta.com.au>
Date:   Fri Aug 8 13:46:04 2014 +1000

    Fix apq8064 build

    apq8064 was missing from teh list of supported arm platforms in file_to_obj.sh

commit fa27da00c97992b665b5dbc7552eabcf7b5212a8
Author: Gerwin Klein <gerwin.klein@nicta.com.au>
Date:   Wed Aug 6 19:06:35 2014 +1000

    Remove unsupported integratorcp platform.

    As suggested by @jserv on https://github.com/seL4/seL4/issues/1

commit 69183cec7f1f058b3a6e58c660a0dbbdd74ec675
Author: Peter Chubb <peter.chubb@nicta.com.au>
Date:   Tue Aug 5 14:34:25 2014 +1000

    Don't include .note.gnu.build-id in final link

    arm-linux-gnueabi-gcc tools add an extra section, .note.gnu.build-id, at the start
    of an ELF file.  Unfortunately, the Program header includes this , preventing
    REFOS from being able to run the program.  This patch adds --Wl,--build-id=none
    to the non-kernel link flags on ARM.

commit 770b9f9544a88f5a567c4f8ae80f364dbe4aa0b5
Author: Peter Chubb <peter.chubb@nicta.com.au>
Date:   Fri Jul 25 14:30:17 2014 +1000

    More CFLAGS fixes.

    Removing CFLAGS setting in the kernel exposed problems in the ones
    generated in Makefile.flags, on some platforms.

commit 7be323b7be304171949a9c121477d7d79d89cabf
Author: Peter Chubb <peter.chubb@nicta.com.au>
Date:   Fri Jul 25 11:17:14 2014 +1000

    Use armv7e for cortex-a15

    The cortex-a15 is armv7e not armv7-a --- but not all compilers accept this.
    Set NK_CFLAGS to something sane for all cases.

commit 4677080a43a4feb41aae2b015d87ec7ebc1e577f
Author: Adrian Danis <Adrian.Danis@nicta.com.au>
Date:   Thu Jul 24 12:06:06 2014 +1000

    Allow empty cpio archives to be generated

commit 4b57fbd89af91160540e24dcd888b009955ffeb8
Author: TrustworthySystems <gatekeeper@sel4.systems>
Date:   Tue Jul 22 14:37:37 2014 +1000

    Release snapshot

winksaville/sel4-minimal-helloworld,winksaville/sel4-minimal-helloworld,winksaville/sel4-minimal-helloworld,winksaville/sel4-minimal-helloworld,winksaville/sel4-minimal-helloworld