| #
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 ...
|
| #
9e4ebcdc |
| 26-May-2020 |
Jerome Forissier <jerome@forissier.org> |
Cleanup unused comp-cflags$(sm) from libgcc lookup commands
The compiler is not expected to need any flag from $(comp-cflags$(sm)) to locate the compiler runtime libraries, and in fact this variable
Cleanup unused comp-cflags$(sm) from libgcc lookup commands
The compiler is not expected to need any flag from $(comp-cflags$(sm)) to locate the compiler runtime libraries, and in fact this variable is always undefined at the point it is used. Indeed, comp-cflags$(sm) is set in mk/compile.mk, i.e., after mk/gcc.mk (or mk/clang.mk) has been included.
Therefore, remove the useless flags.
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 ...
|
| #
6d1a620a |
| 19-Jul-2017 |
Yongqin Liu <yongqin.liu@linaro.org> |
mk/gcc.mk: define LD to bfd version by default
In some cases, ld is linked to gold version, and it will cause compiling error for 32bit like following:
prebuilts/gcc/linux-x86/arm/arm-linux-android
mk/gcc.mk: define LD to bfd version by default
In some cases, ld is linked to gold version, and it will cause compiling error for 32bit like following:
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: fatal error: --sort-section=alignment: must take one of the following arguments: none, name
with the bfd version ld, there will be no such error reported.
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
b09cddca |
| 24-Feb-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Introduce CFLAGS32 and CFLAGS64
Previously, compile.mk and gcc.mk were using $(CFLAGS) which cannot properly handle 32-bit and 64-bit compiles. This commit introduces CFLAGS32 and CFLAGS64 instead,
Introduce CFLAGS32 and CFLAGS64
Previously, compile.mk and gcc.mk were using $(CFLAGS) which cannot properly handle 32-bit and 64-bit compiles. This commit introduces CFLAGS32 and CFLAGS64 instead, which are set to $(CFLAGS) by defaut for convenience.
For each submodule (core, ta_arm32, ta_arm64) a new internal variable is defined in the architecture makefile (core/arch/arm/arm.mk): arch-bits-$(sm). Its value is either 32 or 64. This can later be used to reference the proper CFLAGS.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
92db3e0c |
| 23-Feb-2016 |
Zoltan Kuscsik <zoltan.kuscsik@linaro.org> |
Add CFLAGS to libgcc lookup command
GCC may require the --sysroot command line parameter to find libgcc.a
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.f
Add CFLAGS to libgcc lookup command
GCC may require the --sysroot command line parameter to find libgcc.a
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Zoltan Kuscsik <zoltan.kuscsik@linaro.org> Signed-off-by: Zoltan Kuscsik <zoltan.kuscsik@linaro.org>
show more ...
|
| #
1b4eb4f5 |
| 02-Feb-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Separate compiler for core and user TA
Enables compilation with different compilers for core and user TA.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.w
Separate compiler for core and user TA
Enables compilation with different compilers for core and user TA.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| #
b0104773 |
| 12-Jun-2014 |
Pascal Brand <pascal.brand@st.com> |
Open-source the TEE Core
Signed-off-by: Pascal Brand <pascal.brand@st.com>
|