History log of /optee_os/lib/libutils/isoc/newlib/sub.mk (Results 1 – 18 of 18)
Revision Date Author Comments
# e906cbe7 28-Mar-2022 Jorge Ramirez-Ortiz <jorge@foundries.io>

libutils: Import strtok_r() from newlib

Import strtok_r() from newlib.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jer

libutils: Import strtok_r() from newlib

Import strtok_r() from newlib.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 9b0773cb 11-Sep-2020 Jerome Forissier <jerome@forissier.org>

libutils: fix memset(), memcpy(), memmove() with -O3

When libutils is built with optimization -O3 (make CFG_CC_OPT_LEVEL=3),
memset() may cause infinite recursion. This bug was observed with GCC
8.3

libutils: fix memset(), memcpy(), memmove() with -O3

When libutils is built with optimization -O3 (make CFG_CC_OPT_LEVEL=3),
memset() may cause infinite recursion. This bug was observed with GCC
8.3 with QEMUv8. The reason is, at this optimization level the compiler
may decide to replace loops with calls to memset(), which is obviously
not valid when the loop is in the memset function itself. This behavior
can be turned off with -fno-tree-loop-distribute-patterns.

Therefore, add the appropriate build flag to memset.c. Note that a
similar fix was introduced in upstream newlib [1] but since it depends
on the newlib build script to detect compiler support, the patch is not
directly applicable. Instead $(call cc-option,...) is used here.

Although I have not observed any issue with memcpy() and memmove(),
upstream did apply the compiler flag to these functions too [1], [2],
which seems quite reasonable so do the same here.

Link: [1] https://github.com/bminor/newlib/commit/10e4d79a191f07999bc94b21535fba5d7c04f419
Link: [2] https://github.com/bminor/newlib/commit/82dfae9ab0734b9946321590162dc6021057fec1
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# ebc961da 11-Sep-2020 Jerome Forissier <jerome@forissier.org>

libutils: memset(): add -O2 only if optimization is -Os

Commit 5b2aaa117eee ("libutee: optimize memcpy() for speed") added -O2
to memset.c to exclude the slower implementation which would be selecte

libutils: memset(): add -O2 only if optimization is -Os

Commit 5b2aaa117eee ("libutee: optimize memcpy() for speed") added -O2
to memset.c to exclude the slower implementation which would be selected
when level is -Os (in which case __OPTIMIZE_SIZE__ is defined).

Since the optimization level can now be selected globally with
CFG_CC_OPT_LEVEL, -O2 should not be forced unconditionally or it could
actually reduce the desired level (when CFG_CC_OPT_LEVEL=3).

Therefore, add -O2 only if the global optimization is -Os.

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

show more ...


# 5b2aaa11 30-Mar-2020 Jens Wiklander <jens.wiklander@linaro.org>

libutee: optimize memcpy() for speed

Overrides the -Os flag with -O2 in order to compile a speed optimized
version of memcpy().

Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-b

libutee: optimize memcpy() for speed

Overrides the -Os flag with -O2 in order to compile a speed optimized
version of memcpy().

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

show more ...


# e3d56a52 05-Jul-2019 Jerome Forissier <jerome.forissier@linaro.org>

libutils: import bcmp() from newlib

Recent versions of Clang (later than 8.0.0) may replace calls to
memcmp() by bcmp(). Therefore, provide an implementation of this
function to avoid unresolved sym

libutils: import bcmp() from newlib

Recent versions of Clang (later than 8.0.0) may replace calls to
memcmp() by bcmp(). Therefore, provide an implementation of this
function to avoid unresolved symbol errors.
The same issue was fixed in a similar way in the Linux kernel [1].

Link: [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5f074f3e192f10c9fade898b9b3b8812e3d83342
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# b6d69a43 25-Mar-2019 Jerome Forissier <jerome.forissier@linaro.org>

libutils: ctype.h: do not define functions as builtins

Our <ctype.h> defines a number of functions as macros that evaluate to
the builtin function of the same name, for instance:

#define isalpha(_

libutils: ctype.h: do not define functions as builtins

Our <ctype.h> defines a number of functions as macros that evaluate to
the builtin function of the same name, for instance:

#define isalpha(__c) __builtin_isalpha(__c)

There are two problems with this:

1. It gets in the way of the application developer and makes some
compiler flags irrelevant (-fno-builtin*, [1]).
2. Different compilers do not support the same set of builtin functions
so having the defines can result in build errors.

Therefore, user regular prototypes in <ctype.h>. Also build libutils
without the -ffreestanding flag because it implies -fno-builtin and
therefore may needlessly disable optimizations. The libutils
environment cannot be considered "free standing" since it implements
the standard header files with the expected semantics.

Our implementations of the <ctypes.h> functions (isalnum(), isalpha(),
etc.) are defined with the __builtin_ prefix. This is not needed and
is arguably wrong. Indeed, we want the functions in libutils to be
present without the prefix, which GCC happens to be doing regardless.
However, this __builtin_ prefix in the .c files makes things more
complicated to support Clang. Therefore, remove it.

Link: [1] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html (-fno-builtin)
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 146a256b 05-Jul-2019 Jerome Forissier <jerome.forissier@linaro.org>

libutils/newlib: sort sub.mk in alphabetical order

Sort "src-y" lines by alphabetical order.

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

libutils/newlib: sort sub.mk in alphabetical order

Sort "src-y" lines by alphabetical order.

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

show more ...


# b38854bd 09-Nov-2018 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

libutils: Import strtoul from newlib

This patch imports strtoul from newlib which the latest version of libfdt
depends on.

Some modification of the original source is required to do this,
specifica

libutils: Import strtoul from newlib

This patch imports strtoul from newlib which the latest version of libfdt
depends on.

Some modification of the original source is required to do this,
specifically:

This is an import of the newlib 1.19.0 version of strtoul dropping

- Headers and prototypes for re-entrancy

- Any reliance on errno

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# da1d55f3 09-Nov-2018 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

libutils: Import strrchr from newlib

libfdt 1.4.7 depends on strrchr, this patch imports the same from newlib.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Etienne Carr

libutils: Import strrchr from newlib

libfdt 1.4.7 depends on strrchr, this patch imports the same from newlib.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 5b01430c 07-May-2018 Jens Wiklander <jens.wiklander@linaro.org>

libutils: import strcpy() and strncpy()

Imports strcpy() and strncpy() from newlib with license added

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@

libutils: import strcpy() and strncpy()

Imports strcpy() and strncpy() from newlib with license added

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 03368b7b 07-May-2018 Jens Wiklander <jens.wiklander@linaro.org>

libutils: import strstr() from newlib

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.

libutils: import strstr() from newlib

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 51932e38 26-May-2016 Jens Wiklander <jens.wiklander@linaro.org>

libutils/newlib: clean sub.mk

As most newlib source files needs more or less the same flags to
compile, apply the flags with cflags-y and clags-remove-y instead of
individual flags for each file.

R

libutils/newlib: clean sub.mk

As most newlib source files needs more or less the same flags to
compile, apply the flags with cflags-y and clags-remove-y instead of
individual flags for each file.

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

show more ...


# f46a4a4a 25-May-2016 Jens Wiklander <jens.wiklander@linaro.org>

libutils: add strchr()

Imports strchr() from newlib.

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


# 2ecdb4d7 25-Apr-2016 Joakim Bech <joakim.bech@linaro.org>

newlib: Add -ffreestanding to newlib files

When doing builds with –O3, the GCC compiler in some cases generates
re-entrant code for memset() function which can result in calling itself
infinitely ca

newlib: Add -ffreestanding to newlib files

When doing builds with –O3, the GCC compiler in some cases generates
re-entrant code for memset() function which can result in calling itself
infinitely causing overflow of stack & data corruption. One way to
prevent this from happening is to enable the -ffreestanding compiler
flag.

Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU)
Suggested-by: Alexei Fedorov <alexei.fedorov@arm.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>

show more ...


# a31f13fb 27-Mar-2016 Jens Wiklander <jens.wiklander@linaro.org>

libutils: add abs()

Imports abs() from newlib.

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.fo

libutils: add abs()

Imports abs() from newlib.

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP Aarch64)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# f4c0a293 23-Jun-2015 SY Chiu <sy.chiu@linaro.org>

Secure Storage: Implemented atomic operations

The following operations should be atomic:

- Write
- Rename
- Create/Delete
- Truncate

Signed-off-by: SY Chiu <sy.chiu@linaro.org>
Tested-by: SY Chiu

Secure Storage: Implemented atomic operations

The following operations should be atomic:

- Write
- Rename
- Create/Delete
- Truncate

Signed-off-by: SY Chiu <sy.chiu@linaro.org>
Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU)
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# cebdec51 18-Sep-2014 Jens Wiklander <jens.wiklander@linaro.org>

Reenable warnings for all non-3rd party code

* Reenables warnings for all non-3rd party code
* Renames dprintf macro to dprintf_level


# b0104773 12-Jun-2014 Pascal Brand <pascal.brand@st.com>

Open-source the TEE Core

Signed-off-by: Pascal Brand <pascal.brand@st.com>