toolchain: xcc: define __deprecated only if not already defined

Some tests explicitly test for deprecated functions and they
override the macro __deprecated to avoid compiler warnings.
So, for xcc/xt-clang, only define __deprecated if it has not
already been defined.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2025-05-27 11:44:18 -07:00 committed by Dan Kalowsky
commit 26ea29ddba

View file

@ -15,7 +15,9 @@
* XCC does not support using deprecated attribute in enum,
* so just nullify it here to avoid compilation errors.
*/
#ifndef __deprecated
#define __deprecated
#endif
#define __in_section_unique(seg) \
__attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__))))