[PATCH] devtools: forbid use of compiler pragmas

Thomas Monjalon thomas at monjalon.net
Tue Feb 4 16:59:28 CET 2025


30/01/2025 09:37, David Marchand:
> Using pragma must be prevented to avoid breaking builds with other
> compilers.
> Let EAL use them (like for abstraction macros).
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
> +	# forbid use of #pragma
> +	awk -v FOLDERS='lib drivers app examples' \
> +		-v SKIP_FILES='lib/eal/include/rte_common.h' \
> +		-v EXPRESSIONS='(#pragma|_Pragma)' \
> +		-v RET_ON_FAIL=1 \
> +		-v MESSAGE='Using compilers pragma is not allowed' \
> +		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
> +		"$1" || res=1

Acked-by: Thomas Monjalon <thomas at monjalon.net>




More information about the dev mailing list