History log of /optee_os/mk/compile.mk (Results 1 – 25 of 58)
Revision Date Author Comments
# 6cb664fb 03-Apr-2025 Thomas Bourgoin <thomas.bourgoin@foss.st.com>

mk/compile.mk: fix header dependency for device tree and assembly files

When compiling assembly files and devices trees, dependencies with
header file are not regenerated.
Same issue as
commit acdc3

mk/compile.mk: fix header dependency for device tree and assembly files

When compiling assembly files and devices trees, dependencies with
header file are not regenerated.
Same issue as
commit acdc32afe18f ("mk/compile.mk: fix header dependency in .d file")

Add option -MP used to fix error generated when removing header files.

Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 24dd15fb 04-Mar-2025 Antonio Borneo <antonio.borneo@foss.st.com>

mk/compile.mk: add -undef and -D__DTS__ in dtb-cppflags

Commit 61b2d6e460f7 ("mk/compile.mk: add -Ulinux -Uunix to
dtb-cppflags") addresses some macro enabled by default by the
compiler that could i

mk/compile.mk: add -undef and -D__DTS__ in dtb-cppflags

Commit 61b2d6e460f7 ("mk/compile.mk: add -Ulinux -Uunix to
dtb-cppflags") addresses some macro enabled by default by the
compiler that could impact the pre-processing of the DTS files.

Instead of un-defining each of such macros, use the flag '-undef'
and get rid of all of them in one shot.

Add the macro '__DTS__' specific for DTS pre-processing, as it is
done in Linux and later ported to U-Boot with [1].
This could help sharing include files between DTS and C code.

Link: https://github.com/u-boot/u-boot/commit/f53932addd31 [1]
Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# acdc32af 10-Feb-2025 Thomas Bourgoin <thomas.bourgoin@foss.st.com>

mk/compile.mk: fix header dependency in .d file

Dependency file .o.d are not updated when a header file is removed from
a source file.
Add option -MP used to fix error generated when removing header

mk/compile.mk: fix header dependency in .d file

Dependency file .o.d are not updated when a header file is removed from
a source file.
Add option -MP used to fix error generated when removing header files.

Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 2e480519 19-Sep-2024 Jens Wiklander <jens.wiklander@linaro.org>

mk/subdir.mk: introduce srcs_ext-y and srcs_ext_base-y

Introduce two new variables srcs_ext-y and srcs_ext_base-y to deal with
compiling source code outside of this git (optee_os.git).

srcs_ext_bas

mk/subdir.mk: introduce srcs_ext-y and srcs_ext_base-y

Introduce two new variables srcs_ext-y and srcs_ext_base-y to deal with
compiling source code outside of this git (optee_os.git).

srcs_ext_base-y assigns the root directory of the external source files
to compile. srcs_ext-y works as srcs-y except that it's relative to the
$(srcs_ext_base-y) directory.

Introduce the per source file variable oname-<file name>-y to override
the default output object file name. This helps to shorten and make a
more sane name for the output object file name when the source file is
outside optee_os source tree, for instance, a third-party library.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 4680bb7c 29-Aug-2024 Gatien Chevallier <gatien.chevallier@foss.st.com>

mk/compile.mk: fix pre-processed device tree dependencies file target

The pre-processed device tree dependencies file target should be
<device-tree file>.pre.dts, not <device-tree file>.dtb.

Fixes:

mk/compile.mk: fix pre-processed device tree dependencies file target

The pre-processed device tree dependencies file target should be
<device-tree file>.pre.dts, not <device-tree file>.dtb.

Fixes: f0bb1a5a390f ("mk/compile.mk: separate rule to produce preprocessed dts files")
Link: https://github.com/OP-TEE/optee_os/issues/7015
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# f0bb1a5a 14-Aug-2024 Jerome Forissier <jerome.forissier@linaro.org>

mk/compile.mk: separate rule to produce preprocessed dts files

When compiling a .dts into a .dtb, there is a pre-preprocessing phase
where the C preprocessor is run on the .dts to produce a .pre.dts

mk/compile.mk: separate rule to produce preprocessed dts files

When compiling a .dts into a .dtb, there is a pre-preprocessing phase
where the C preprocessor is run on the .dts to produce a .pre.dts, then
the device tree compiler is called to generate the .dtb. The two phases
are currently bundled into a single makefile recipe, which is not ideal.

Extract the preprocessing commands into a separate recipe to address
this concern. This allows to do for example:

make PLATFORM=stm32mp1-157A_DK1 \
out/arm-plat-stm32mp1/core/arch/arm/dts/stm32mp157a-dk1.pre.dts

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 3597beef 14-Aug-2024 Jerome Forissier <jerome.forissier@linaro.org>

mk/compile.mk: remove duplicate dtc flags

When a .dts is compiled into a .dtb, the flags: '-I dts -O dtb
-Wno-unit_address_vs_reg' are present several times on the command line.
It is visible when b

mk/compile.mk: remove duplicate dtc flags

When a .dts is compiled into a .dtb, the flags: '-I dts -O dtb
-Wno-unit_address_vs_reg' are present several times on the command line.
It is visible when building with "make ... V=1".

Fix this by not appending to DTC_FLAGS but instead use DTC_FLAGS as is
from the environment and add the specific flags once to the compile
command.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 7f1e2acc 14-Aug-2024 Jerome Forissier <jerome.forissier@linaro.org>

mk/compile.mk: print dtc command when V=1

The command that compiles a device tree source file (.dts) into a
binary (.dtb) should be displayed when verbose mode is enabled
(V=1), but it is not the ca

mk/compile.mk: print dtc command when V=1

The command that compiles a device tree source file (.dts) into a
binary (.dtb) should be displayed when verbose mode is enabled
(V=1), but it is not the case. Fix that by replacing the @ with $(q).

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 6f105faf 01-Aug-2024 Mikko Rapeli <mikko.rapeli@linaro.org>

compile.mk: use CFLAGS from environment

Users can set CFLAGS just like AFLAGS, CC,
LD etc and expect them to be used. It's ok to amend
to them but overwriting should not be done.
Build environment l

compile.mk: use CFLAGS from environment

Users can set CFLAGS just like AFLAGS, CC,
LD etc and expect them to be used. It's ok to amend
to them but overwriting should not be done.
Build environment like yocto expect that these
variables are used to call the compiler etc tools.
Linux distro build environments usually set
these variables.

Helps to remove build time paths from generated binaries
since mappings to remove them can be set by the distro
build system in CFLAGS automatically for each SW component
in the build.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>

show more ...


# 29b84ae5 18-Jul-2024 Mikko Rapeli <mikko.rapeli@linaro.org>

mk/compile.mk: remove absolute build time paths

Some generated files get a __FILE_ID__ which include absolute
build time paths. Remove the paths and use plain file name.
Fixes yocto QA check.

Probl

mk/compile.mk: remove absolute build time paths

Some generated files get a __FILE_ID__ which include absolute
build time paths. Remove the paths and use plain file name.
Fixes yocto QA check.

Problem/bug:

$ strings ../image/lib/firmware/tee.elf | grep mikko
__FILE_ID__
_home_mikko_build_core_ta_pub_key_c
__FILE_ID__
_home_mikko_build_core_ldelf_hex_c
__FILE_ID__
_home_mikko_build_core_early_ta_fd02c9da_306c_48c7_a49c_bbd827ae86ee_c

With this patch:

$ strings ../image/lib/firmware/tee.elf | grep mikko
$ strings ../image/lib/firmware/tee.elf | grep FILE_ID | egrep \
"core_ta_pub_key_c|core_ldelf_hex_c|core_early_ta_fd02c9da_306c_4"
__FILE_ID__ core_ta_pub_key_c
__FILE_ID__ core_ldelf_hex_c
__FILE_ID__ core_early_ta_fd02c9da_306c_48c7_a49c_bbd827ae86ee_c

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>

show more ...


# 98bba084 12-May-2023 Jens Wiklander <jens.wiklander@linaro.org>

Add warning options relating to packed structs

Adds the two warning options -Wpacked-not-aligned and
-Waddress-of-packed-member to the default compiler flags.

Signed-off-by: Jens Wiklander <jens.wi

Add warning options relating to packed structs

Adds the two warning options -Wpacked-not-aligned and
-Waddress-of-packed-member to the default compiler flags.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 61b2d6e4 25-Jan-2023 lei zhou <lei.zhou@linaro.org>

mk/compile.mk: add -Ulinux -Uunix to dtb-cppflags

Add -Ulinux and -Uunix to dtb-cppflags to fix two corner cases,
where DTS file might contain properties like following:

dma_coherent: coherent {
c

mk/compile.mk: add -Ulinux -Uunix to dtb-cppflags

Add -Ulinux and -Uunix to dtb-cppflags to fix two corner cases,
where DTS file might contain properties like following:

dma_coherent: coherent {
compatible = "shared-dma-pool";
linux,dma-default;
}

Without these flags, C preprocessor will modify "linux,dma-default"
to "1,dma-default"

Signed-off-by: lei zhou <lei.zhou@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 1dc8870c 23-Nov-2022 Etienne Carriere <etienne.carriere@linaro.org>

mk: compile with -std=gnu11 instead of -std=gnu99

Changes C source build directives to comply with C11 instead of C99.
This change affects core and user applications and libraries. C11 is
supported

mk: compile with -std=gnu11 instead of -std=gnu99

Changes C source build directives to comply with C11 instead of C99.
This change affects core and user applications and libraries. C11 is
supported in GCC since version 4.7, see [1].

This change is initially intended to bring aligned_alloc() support in
OP-TEE.

Link: [1] https://gcc.gnu.org/wiki/C11Status
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 4516e38d 14-Feb-2022 Jens Wiklander <jens.wiklander@linaro.org>

assert.h: add static_assert

Adds the static_assert macro from C11.

Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens W

assert.h: add static_assert

Adds the static_assert macro from C11.

Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# a748f9ed 24-Nov-2021 Jens Wiklander <jens.wiklander@linaro.org>

Add config option CFG_WARN_DECL_AFTER_STATEMENT

Adds configuration option CFG_WARN_DECL_AFTER_STATEMENT which adds the
warning -Wdeclaration-after-statement.

The coding style doesn't allow declarat

Add config option CFG_WARN_DECL_AFTER_STATEMENT

Adds configuration option CFG_WARN_DECL_AFTER_STATEMENT which adds the
warning -Wdeclaration-after-statement.

The coding style doesn't allow declarations after statements in the
code. So add a warning for this to let the compiler catch this before
the review.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 821dd79c 06-Nov-2020 Jens Wiklander <jens.wiklander@linaro.org>

mk/compile.mk: drop -Waggregate-return warning

Drops the -Waggregate-return warning since returning an aggregate type
from a function can be quite useful.

Reviewed-by: Etienne Carriere <etienne.car

mk/compile.mk: drop -Waggregate-return warning

Drops the -Waggregate-return warning since returning an aggregate type
from a function can be quite useful.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 8826a6aa 12-Feb-2021 Jerome Forissier <jerome@forissier.org>

build: core: add missing dependencies when generating assembly constants

The header file <generated/asm-defines.h> is created at build time. It
contains macro definitions for various offsets in C st

build: core: add missing dependencies when generating assembly constants

The header file <generated/asm-defines.h> is created at build time. It
contains macro definitions for various offsets in C structures and is
especially useful for use from assembler code. It is generated from
asm-defines.c, which includes a number of header files, of which two
are also generated at build time: <generated/arm32_sysreg.h> and
<generated/arm32_gicv3_sysreg.h>.

These dependencies are expressed nowhere in the makefiles and therefore
build errors can result. For example:

$ make out/arm-plat-vexpress/core/include/generated/.asm-defines.s
CHK out/arm-plat-vexpress/conf.mk
UPD out/arm-plat-vexpress/conf.mk
CHK out/arm-plat-vexpress/include/generated/conf.h
UPD out/arm-plat-vexpress/include/generated/conf.h
CC out/arm-plat-vexpress/core/include/generated/.asm-defines.s
In file included from core/arch/arm/include/arm.h:99,
from core/arch/arm/include/kernel/thread.h:12,
from core/arch/arm/kernel/asm-defines.c:8:
core/arch/arm/include/arm32.h:167:10: fatal error: generated/arm32_sysreg.h: No such file or directory
167 | #include <generated/arm32_sysreg.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

The error in [1] is believed to have the same root cause: during
parallel build the generated header file might have been created by one
job but not yet written to when another job would open it. The compiler
would see an empty file, thus the missing declarations.

Add the missing dependencies via a new variable at the location where
asm-defines.c is added to the build.

Note that the other core .c files depending on these generated sysreg
headers are not affected because their .o files explicitly depend on
FORCE-GENSRCcore (which generates the headers).

Link: [1] https://ci.linaro.org/job/ledge-oe-premerge-ci/182/DISTRO=rpb,MACHINE=ledge-ti-am572x,label=docker-buster-amd64/console
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 6754fa79 27-Dec-2020 Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

mk/compile.mk: Fix handling of '+' in path for generated include guards

When building with bitbake with gitpkgv class git revision details have
'+' as delimeter.

Version details appears in path and

mk/compile.mk: Fix handling of '+' in path for generated include guards

When building with bitbake with gitpkgv class git revision details have
'+' as delimeter.

Version details appears in path and this causes following warnings during
the OP-TEE OS build:

In file included from core/arch/arm/kernel/entry_a64.S:11:
/build/.../optee-os/devel+gitrAUTOINC+e97c83bd6f-r0/build.zcu102/core/include/generated/asm-defines.h:1:123: warning: extra tokens at end of #ifndef directive
1 | #ifndef _build_..._optee_os_devel+gitrAUTOINC+e97c83bd6f_r0_build_zcu102_core_include_generated_asm_defines_h
| ^
/build/.../optee-os/devel+gitrAUTOINC+e97c83bd6f-r0/build.zcu102/core/include/generated/asm-defines.h:2:9: warning: missing whitespace after the macro name
2 | #define _build_..._optee_os_devel+gitrAUTOINC+e97c83bd6f_r0_build_zcu102_core_include_generated_asm_defines_h
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

show more ...


# be3bc461 21-Jul-2020 Jerome Forissier <jerome@forissier.org>

ta: experimental C++ support

Update the TA makefiles to support C++ (file extension: .cpp).

This allows the use of C++ in TA and libraries, with limitations (see
below). I consider this work experi

ta: experimental C++ support

Update the TA makefiles to support C++ (file extension: .cpp).

This allows the use of C++ in TA and libraries, with limitations (see
below). I consider this work experimental because it was only tested
with simple cases in xtest, introducing the required changes and
addressing issues one after another. Therefore, some features may be
missing for more complex use cases (additional relocation types or
runtime support...).

Tested with the arm-linux-gnueabihf- and aarch64-linux-gnu- toolchains
(GCC 8.3).

Limitations:

- Clang is not supported at the moment
- Exception handling: shared libraries cannot throw, catch or propagate
exceptions. Doing so would require linking the libraries and the main
program with the shared libgcc [1] which is not straightforward due
to the many dependencies on the GNU libc. Exceptions *can* be used in
the main program however, as well as in static libraries directly
linked with the main program.
- ldelf stack unwinding does not support C++ frames so crash/panic
dumps will likely be truncated when they involve C++ code.

Link: [1] https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html see "-shared-libgcc"
Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, QEMUv8, HiKey960)
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 331ebf7e 26-May-2020 Jerome Forissier <jerome@forissier.org>

Allow use of cc-option in core/arch/arm/arm.mk

It can be useful to call the cc-option macro when setting flags in
core/arch/arm/arm.mk. Unfortunately cc-option is defined in
mk/compile.mk which is t

Allow use of cc-option in core/arch/arm/arm.mk

It can be useful to call the cc-option macro when setting flags in
core/arch/arm/arm.mk. Unfortunately cc-option is defined in
mk/compile.mk which is too late to be useful (core/arch/arm/arm.mk is
included by core/core.mk before mk/compile.mk).

This commit addresses the issue by moving the definition of cc-option
to its own file, mk/cc-option.mk, which is then included by
core/arch/arm/arm.mk. There is a dependency on the compiler definitions
(mk/gcc.mk or mk/clang.mk) and on $(arch-bit-$(sm)) so
core/arch/arm/arm.mk is modified accordingly.

Moving cc-option out of mk/compile.mk means that all non-core
submodules would lose the definition unless they include
mk/cc-option.mk; the TA dev kit is modified so that TAs can call
cc-option from within their sub.mk files. As for other submodules, they
are internal and do not use cc-options as of now so they are not
modified.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 49e57c36 20-May-2020 Jerome Forissier <jerome@forissier.org>

mk/compile.mk: fix cc-option macro

There are (at least) three issues with the cc-option macro:

1. When COMPILER=clang: when presented with a supported but unused
option, Clang emits a warning to

mk/compile.mk: fix cc-option macro

There are (at least) three issues with the cc-option macro:

1. When COMPILER=clang: when presented with a supported but unused
option, Clang emits a warning to stderr (and returns a success code
of 0). Therefore it is incorrect to check stderr to determine if an
option is supported or not; we should rely on the return status
instead.
2. When COMPILER=clang, the compile command $(CC$(sm)) contains an
equal sign (e.g., clang --target=arm-linux-gnueabihf). This is not
expected in the cc-option macro, currently only flags are allowed to
potentially contain an equal sign. This messes with the caching of
the test result.
3. The macro should not cache the return value when an option is not
supported. For instance, if we have:
A := $(call cc-option,--not-supported,a)
B := $(call cc-option,--not-supported,b)
...we expect A to be "a" and B to be "b". The current implementation
returns "a" in both cases.

This commit fixes the above problems.

Fixes: 989ac108b0ef ("mk/compile.mk: add cc-option macro")
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 989ac108 18-Dec-2019 Jerome Forissier <jerome@forissier.org>

mk/compile.mk: add cc-option macro

Adds a macro to test the availability of a compiler option. For example:

$(call cc-option,-opt1,-opt2)

...will evaluate to '-opt1' if the C compiler supports op

mk/compile.mk: add cc-option macro

Adds a macro to test the availability of a compiler option. For example:

$(call cc-option,-opt1,-opt2)

...will evaluate to '-opt1' if the C compiler supports option -opt1, or
'-opt2' otherwise. The second argument (-opt2) is optional.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 98d863a5 05-Jul-2019 Jerome Forissier <jerome@forissier.org>

Experimental Clang support

Allows building with Clang with "make COMPILER=clang [other flags...]".
The clang command has to be in the $PATH, as well as the associated
tools (clang-cpp, ld.lld, llvm-

Experimental Clang support

Allows building with Clang with "make COMPILER=clang [other flags...]".
The clang command has to be in the $PATH, as well as the associated
tools (clang-cpp, ld.lld, llvm-ar, llvm-nm, llvm-objcopy and
llvm-readelf).

Tested with Clang built from the master branch of [1] (development
version for 9.0):

mkdir build; cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=~/llvm-install \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD="AArch64;ARM" \
~/llvm-project/llvm
ninja && ninja install

Limitations:

- CFG_CORE_SANITIZE_KADDRESS=y is not supported.
- CFG_WITH_PAGER is supported, but requires that the TEE core be
linked with the GNU linker. The reason is documented in
mk/clang.mk.

Bug:

- ldelf assertion failure in xtest 1019 when CFG_ULIBS_SHARED=y (QEMU)
E/LD: assertion 'maps[map_idx].sz == sz' failed at ldelf/ta_elf.c:1114 in ta_elf_print_mappings()
Prevents ldelf from displaying the TA mappings on abort or panic, but
does not seem to cause any other problem.

Link: [1] https://github.com/llvm/llvm-project/commits/8351c327647
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU pager/no pager)
Tested-by: Jerome Forissier <jerome@forissier.org> (QEMUv8, pager/no pager)
Tested-by: Jerome Forissier <jerome@forissier.org> (HiKey960, 32/64, GP)
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# df7712ba 21-Aug-2019 Jens Wiklander <jens.wiklander@linaro.org>

Remove ASM define for assembly files

Removes the ASM define for assembly files now that they rely on the
predefined macro __ASSEMBLER__ instead.

Reviewed-by: Jerome Forissier <jerome.forissier@lina

Remove ASM define for assembly files

Removes the ASM define for assembly files now that they rely on the
predefined macro __ASSEMBLER__ instead.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# ec295ea0 22-Mar-2019 Jerome Forissier <jerome.forissier@linaro.org>

core: change the pattern used to generate asm-defines.h

This commit prepares support for the Clang compiler.

$O/core/include/generated/asm-defines.h is generated from
core/arch/arm/kernel/asm-defin

core: change the pattern used to generate asm-defines.h

This commit prepares support for the Clang compiler.

$O/core/include/generated/asm-defines.h is generated from
core/arch/arm/kernel/asm-defines.c by the C compiler with the -S flag
(generate assembler code), followed by some light post-processing with
sed.

The intermediate file ($O/core/include/generated/.asm-defines.s) is
actually not a valid assembler file. It contains illegal tokens, which
where chosen to make it easy to parse with sed. For example:

==>SM_CTX_SIZE #256 sizeof(struct sm_ctx) @

...is turned into:

#define SM_CTX_SIZE 256 /* sizeof(struct sm_ctx) */

While this works fine with GCC, the Clang compiler won't accept to
output invalid assembler. This commit slightly modifies the inline
assembler so that the needed information is contained within a .ascii
directive:

.ascii "==>SM_CTX_SIZE 248 sizeof(struct sm_ctx)" @

The 'c' constraint (%c0) is added to avoid the # prefix before an
immediate value, which is not accepted by Clang either.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


123