History log of /seL4-test-master/tools/seL4/cmake-tool/helpers/environment_flags.cmake
Revision Date Author Comments
# 06881d14 04-Nov-2020 Axel Heider <axelheider@gmx.de>

CMake: remove debug output artifact

The variable CMAKE_C_COMPILER_VERSION should be set by CMake already,
printing the generic's gcc output seems just an artifact from testing.
If the output of this command should be captured to overwrite the
variable CMAKE_C_COMPILER_VERSION, then the keyword OUTPUT_VARIABLE is
missing. But even then, the proper cross compiler must be called using
${CROSS_COMPILER_PREFIX}gcc for this to make sense.

Signed-off-by: Axel Heider <axelheider@gmx.de>


# affb08ed 04-Nov-2020 Axel Heider <axelheider@gmx.de>

trivial: fix style

Signed-off-by: Axel Heider <axelheider@gmx.de>


# 6404a788 10-Sep-2020 Oliver Scott <Oliver.Scott@data61.csiro.au>

gcc-10: Add compiler flag

This prevents undefined reference to`__getauxval` error.
https://www.spinics.net/lists/kvm-arm/msg41652.html

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>


# ccc38660 21-Jul-2020 Kent McLeod <Kent.Mcleod@data61.csiro.au>

environment_flags: Prevent undef. variable deref

CMAKE_BUILD_TYPE isn't guaranteed to be defined so this allows it to be
expanded into an empty string

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>


# 5ec6b173 09-Jul-2020 Kent McLeod <Kent.Mcleod@data61.csiro.au>

cmake: Disable unaligned memory access on Arm

The two variants of compilation options prevent the compiler from
performing unaligned memory accesses. The architecture allows unaligned
access to normal memory, but when seL4 creates uncached memory mappings
it configures the mapping attributes in a way that requires alignment
checking and so any unaligned accesses cause faults.

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>


# 9f904ed2 06-Mar-2020 Gerwin Klein <gerwin.klein@data61.csiro.au>

convert license headers to SPDX

Includes license review of 3rd-party files, adding missing upstream
headers, and moving the UNSW OZPLB license into its own file rather
than replicating it in the header.


# 7dfd349e 10-Feb-2020 Matthew <matt.phillips121@gmail.com>

Remove the clang check in preparation for clang-8

Clang 8 and above supports the mtls-direct-seg-refs flag.
Add this in by default in preparation for clang updating
in the docker files


# 134f2ee5 05-Feb-2020 Matthew <matt.phillips121@gmail.com>

Remove unsupported flags

Clang does not support some of the flags used for gcc.
Disable these flags for clang and remove for gcc if unused


# a0f4d06e 16-Dec-2019 Matthew <matt.phillips121@gmail.com>

Pass the target triple through when using clang

Whenever clang is invoked in a custom setting (not generated by CMake),
make sure to pass the triple as a flag


# bf366a02 11-Dec-2019 Matthew <matt.phillips121@gmail.com>

trivial: Cmake style fixes


# e1ff2fcf 11-Dec-2019 Matthew <matt.phillips121@gmail.com>

Do not add the mtls-direct-seg-refs if using clang

`mtls-direct-seg-refs` is an unsupported flag in clang so ignore it if
using the `LLVM_TOOLCHAIN`


# 9ba5a669 08-Dec-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

add_fpu_compilation_options: More accurate checks

The FPU checks need to check that the compiler can compile programs with
the desired FPU options AND link against compiler runtime libraries with
the correct FPU ABI. If either of these conditions aren't met, then we
can't build programs correctly.

We use the standard check_c_source_runs CMake function which inherits
the compilation options that have been set already. Unfortunately it
doesn't inherit any changes to CMAKE_<LANG>_LINK_EXECUTABLE variables
which is what we use to set the compiler libraries and so we need to
specify those again manually. This both compiles and links our test
program. In cross-compiling environments, the run stage will be
skipped; yet this is still sufficient to pick up ABI mismatches.


# da8b93f9 04-Dec-2019 maybe-sybr <58414429+maybe-sybr@users.noreply.github.com>

Fix style complaints in `environment_flags.cmake`

Unrelated to the rest of the changeset on this branch but a good
opportunity to make the code quality checks happy.


# a33ace78 03-Dec-2019 maybe-sybr <58414429+maybe-sybr@users.noreply.github.com>

Don't attempt to build hosted programs to test GCC

By building a program which provides `main()`, we were assuming that
there is a libc available to compiler. This is not the case for the Red
Hat provided cross-compilers which are intended for use in freestanding
environments (the example given is kernel code). Given that the seL4
build system assumes a freestanding environment it is sensible to only
check that the compiler being used is capable of building such programs.

This change alters the code built when testing compiler options in
`environment_flags.cmake`, and also adds fixed options to force the
compiler to not link against the stdlib or include crt objects. By doing
so we avoid any requirement for a target libc on the build host.


# 22d3eea8 12-Sep-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

trivial: Mark CMake cache variables advanced


# 941182b4 03-Sep-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

cmake-tool: Create environment_flags.cmake module

This new module contains macros for defining compilation flags that get
inherited in targets in the current directory or below. This module is
intended to be used in modules that define system environments.