libc and libm are provided by the xcc toolchain.
They are not available from the gcc toolchain.
To build with gcc, libc and libm should be provided
under third_party_libraries.
Signed-off-by: Ben Zhang <benzh@chromium.org>
Makes even CONFIG_DEBUG builds (locally) deterministic by
default: (re)building twice produces the same binaries. Also a partial
fix for incremental builds: running "make" twice in a row now recompiles
fewer files because version.h does not keep changing.
Also makes sure non-debug builds can't use uninitialized strings in some
future security accident.
Fixes:
./scripts/checkpatch.pl -g 'aa85e2c0e956c'
ERROR: Use of the '__DATE__' macro makes the build non-deterministic
+ .date = __DATE__,
ERROR: Use of the '__TIME__' macro makes the build non-deterministic
+ .time = __TIME__,
The previous behavior can be restored using any standard CMake
configuration method, example:
./scripts/xtensa-build-all.sh apl
cmake -B build_apl_gcc/ -DBUILD_COUNTERS=1
make -C build_apl_gcc
https://reproducible-builds.org/
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Allows the mocks to be built only for xtensa GCC. i.e a build test only.
Running on qemu requires more work.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Allows the mocks to be quickly run on the host with full access to host
debug and development tooling.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add cmake -DINIT_CONFIG= option that can point at any initial file.
"make clean" does not delete .config any more.
Note reconfiguration does NOT causes recompilation because -imacros
hides the generated .h from CMake's dependency scan. This is not a
regression, that problems exists since -imacros was introduced. At least
it's now possible to "make clean" and rebuild without losing the .config
file.
Fix for #3617
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
oss-fuzz does not support dynamic linking, therefore we need to add
support for static builds
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Change generated config.h default name to autoconfig.h to catch any
remaining #include config.h left in any other PR, branch or any other
concurrent work in progress unknown to this.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
No functional change for now.
This is needed because SOF is a CMake sub/"external" project when
building some host tools. We want to switch all projects to "-imacros
config.h" but subprojects cannot inform parents where their files are
located. So make parents able to dictate where config.h is instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In new version of rimage software, headers are located in
rimage/src/include/rimage directory to make it easily accessible
from another source code without include path collision.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This adds the necessary bits to update git submodules when
cmake is run, with the option to turn this behavior off if
needed. This is in preparation to use fw.h and manifest.h
from the rimage repo to prevent having two copies of each
file in two different repos. Obviously, the files in
the submodules must exist before building the firmware,
so run git submodule update to checkout the files.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add option for building FW for clang's scan-build.
This static analyzer works out-of-the-box only for compilers
compatible with Clang. For most of embedded compilers
there will be some adjustment needed when BUILD_CLANG_SCAN
is enabled. This flag is not suitable for every build scenario,
it has to be supported for given toolchain / architecture.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Use RELATIVE_FILE because __FILE__ makes binary output
dependent on project location.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Target dependencies have to be added in the same CMakeLists in which
they are declared. CMake interface library is needed to enable adding
static libraries to sof target from subdirectories.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
In function target_link_libraries visibility modifiers have to be
consistent, otherwise we will get error while trying to use modifier,
if it wasn't used in root CMakeLists.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit updates paths of installed headers to match
new headers folders structure.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>