selftests:resctrl: Fix build failure on archs without __cpuid_count()
Subsystems (2)
Shuah Khan
maintainerPATCH 1/1 selftests:resctrl: Fix build failure on archs without __cpuid_count()
When resctrl is built on architectures without __cpuid_count() support, build fails. resctrl uses __cpuid_count() defined in kselftest.h.
Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call __cpuid_count() do so from x86/x86_64 code paths when _i386__ or __x86_64__ are defined. resctrl is an exception.
Fix the problem by defining __cpuid_count() only when __i386__ or __x86_64__ are defined in kselftest.h and changing resctrl to call __cpuid_count() only when __i386__ or __x86_64__ are defined.
In file included from resctrl.h:24,
from cat_test.c:11:
In function ‘arch_supports_noncont_cat’,
inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6:
../kselftest.h:74:9: error: impossible constraint in ‘asm’
74 | __asm__ __volatile__ ("cpuid\n\t" \
| ^~~~~~~
cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’
304 | __cpuid_count(0x10, 1, eax, ebx, ecx, edx);
| ^~~~~~~~~~~~~
../kselftest.h:74:9: error: impossible constraint in ‘asm’
74 | __asm__ __volatile__ ("cpuid\n\t" \
| ^~~~~~~cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
306 | __cpuid_count(0x10, 2, eax, ebx, ecx, edx);
--- tools/testing/selftests/kselftest.h | 2 ++ tools/testing/selftests/resctrl/cat_test.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
tools/testing/selftests/kselftest.h +2 -0
@@ -61,6 +61,7 @@#define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]))#endif +#if defined(__i386__) || defined(__x86_64__)/* arch */ /* * gcc cpuid.h provides __cpuid_count() since v4.4. * Clang/LLVM cpuid.h provides __cpuid_count() since v3.4.0.
@@ -75,6 +76,7 @@ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count))#endif +#endif /* end arch */ /* define kselftest exit codes */ #define KSFT_PASS 0
tools/testing/selftests/resctrl/cat_test.c +4 -2
@@ -290,12 +290,12 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_paramstatic bool arch_supports_noncont_cat (const struct resctrl_test *test) { -unsigned int eax, ebx, ecx, edx; -/* AMD always supports non-contiguous CBM. */ if (get_vendor () ==ARCH_AMD )return true; +#if defined(__i386__) || defined(__x86_64__)/* arch */ +unsigned int eax, ebx, ecx, edx;/* Intel support for non-contiguous CBM needs to be discovered. */ if (!strcmp (test->resource,"L3" ))__cpuid_count (0x10 ,1 , eax, ebx, ecx, edx);
@@ -305,6 +305,8 @@ static bool arch_supports_noncont_cat(const struct resctrl_test *test)return false;return ((ecx >>3 ) &1 ); +#endif /* end arch */ +return false; } static int noncont_cat_run_test(const struct resctrl_test *test,
Signature · 1 line
2.40.1
Hi Shuah,
Thank you very much for looking into this.
Quoted 30 lines · Shuah Khan
When resctrl is built on architectures without
__cpuid_count()support, build fails. resctrl uses__cpuid_count()defined inkselftest.h.Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call
__cpuid_count()do so from x86/x86_64 code paths when _i386__ or__x86_64__are defined. resctrl is an exception.Fix the problem by defining
__cpuid_count()only when__i386__or__x86_64__are defined inkselftest.hand changing resctrl to call__cpuid_count()only when__i386__or__x86_64__are defined.In file included from resctrl.h:24,
from cat_test.c:11: In function ‘arch_supports_noncont_cat’, inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6: ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~ cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’ 304 | __cpuid_count(0x10, 1, eax, ebx, ecx, edx); | ^~~~~~~~~~~~~ ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~
Quoted 3 lines
cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
306 |__cpuid_count(0x10, 2, eax, ebx, ecx, edx);
If needing to know where this fix is needed, there can be a:
Quoted 1 line
Reported-by Muhammad Usama Anjum <[email protected]>
Perhaps:
Quoted 47 lines
Reported-by Ilpo Järvinen <[email protected]>Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/kselftest.h | 2 ++ tools/testing/selftests/resctrl/cat_test.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-)tools/testing/selftests/kselftest.h +2
-0@@ -61,6 +61,7 @@#define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]))#endif +#if defined(__i386__) || defined(__x86_64__)/* arch */ /* * gcc cpuid.h provides __cpuid_count() since v4.4. * Clang/LLVM cpuid.h provides __cpuid_count() since v3.4.0. @@ -75,6 +76,7 @@ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count))#endif +#endif /* end arch */ /* define kselftest exit codes */ #define KSFT_PASS 0tools/testing/selftests/resctrl/cat_test.c +2
-2@@ -290,12 +290,12 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_paramstatic bool arch_supports_noncont_cat (const struct resctrl_test *test) { -unsigned int eax, ebx, ecx, edx; -/* AMD always supports non-contiguous CBM. */ if (get_vendor () ==ARCH_AMD )return true; +#if defined(__i386__) || defined(__x86_64__)/* arch */ +unsigned int eax, ebx, ecx, edx;/* Intel support for non-contiguous CBM needs to be discovered. */ if (!strcmp (test->resource,"L3" ))__cpuid_count (0x10 ,1 , eax, ebx, ecx, edx);
tools/testing/selftests/resctrl/cat_test.c static bool arch_supports_noncont_cat(const struct resctrl_test *test) · line 312
Quoted 8 lines
tools/testing/selftests/resctrl/cat_test.c +2
-0@@ -305,6 +305,8 @@ static bool arch_supports_noncont_cat(const struct resctrl_test *test)return false;return ((ecx >>3 ) &1 ); +#endif /* end arch */ +return false; } static int noncont_cat_run_test(const struct resctrl_test *test,
Thank you very much.
Reinette
Shuah Khan
maintainerQuoted 39 lines · Reinette Chatre
Hi Shuah,
Thank you very much for looking into this.
Quoted 17 lines · Shuah Khan
When resctrl is built on architectures without
__cpuid_count()support, build fails. resctrl uses__cpuid_count()defined inkselftest.h.Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call
__cpuid_count()do so from x86/x86_64 code paths when _i386__ or__x86_64__are defined. resctrl is an exception.Fix the problem by defining
__cpuid_count()only when__i386__or__x86_64__are defined inkselftest.hand changing resctrl to call__cpuid_count()only when__i386__or__x86_64__are defined.Quoted 16 lines
In file included from resctrl.h:24,
from cat_test.c:11:
In function ‘arch_supports_noncont_cat’,
inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6:../kselftest.h:74:9: error: impossible constraint in ‘asm’
74 |__asm____volatile__("cpuid\n\t" \
| ^~~~~~~
cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’
304 |__cpuid_count(0x10, 1, eax, ebx, ecx, edx); | ^~~~~~~~~~~~~../kselftest.h:74:9: error: impossible constraint in ‘asm’
74 |__asm____volatile__("cpuid\n\t" \
| ^~~~~~~
cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
306 |__cpuid_count(0x10, 2, eax, ebx, ecx, edx);
Quoted 2 lines
If needing to know where this fix is needed, there can be a:
Fixes ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test")
Thanks - will add it when I apply the patch.
Quoted 5 lines
Quoted 2 lines
Reported-by Muhammad Usama Anjum <[email protected]>Perhaps:
Thanks. I will add it when I apply the patch.
Quoted 53 lines
Quoted 44 lines
Reported-by Ilpo Järvinen <[email protected]>Signed-off-by Shuah Khan <[email protected]>---
tools/testing/selftests/kselftest.h | 2 ++tools/testing/selftests/resctrl/cat_test.c| 6 ++++--2 files changed, 6 insertions(+), 2 deletions(-)tools/testing/selftests/kselftest.h +2
-0@@ -61,6 +61,7 @@ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) #endif +#if defined(__i386__) || defined(__x86_64__)/* arch */ /** gcc cpuid.h provides __cpuid_count() since v4.4. * Clang/LLVM cpuid.h provides __cpuid_count() since v3.4.0. @@ -75,6 +76,7 @@ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count)) #endif +#endif /* end arch */ /* define kselftest exit codes */ #define KSFT_PASS 0tools/testing/selftests/resctrl/cat_test.c +2
-2@@ -290,12 +290,12 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_param static bool arch_supports_noncont_cat(const struct resctrl_test *test) { - unsigned int eax, ebx, ecx, edx; - /* AMD always supports non-contiguous CBM. */ if (get_vendor() == ARCH_AMD) return true; +#if defined(__i386__) || defined(__x86_64__)/* arch */ + unsigned int eax, ebx, ecx, edx; /* Intel support for non-contiguous CBM needs to be discovered. */ if (!strcmp(test->resource, "L3")) __cpuid_count(0x10, 1, eax, ebx, ecx, edx);tools/testing/selftests/resctrl/cat_test.c static bool arch_supports_noncont_cat(const struct resctrl_test *test) · line 310
Quoted 6 lines
tools/testing/selftests/resctrl/cat_test.c +2
-0@@ -305,6 +305,8 @@ static bool arch_supports_noncont_cat(const struct resctrl_test *test) return false; return ((ecx >> 3) & 1); +#endif /* end arch */ + return false; } static int noncont_cat_run_test(const struct resctrl_test *test,Thank you very much.
Quoted 2 lines
Acked-by Reinette Chatre <[email protected]>
thanks,
-- Shuah
Hi Shuah,
Thank you for fixing it.
Quoted 30 lines · Shuah Khan
When resctrl is built on architectures without
__cpuid_count()support, build fails. resctrl uses__cpuid_count()defined inkselftest.h.Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call
__cpuid_count()do so from x86/x86_64 code paths when _i386__ or__x86_64__are defined. resctrl is an exception.Fix the problem by defining
__cpuid_count()only when__i386__or__x86_64__are defined inkselftest.hand changing resctrl to call__cpuid_count()only when__i386__or__x86_64__are defined.In file included from resctrl.h:24,
from cat_test.c:11: In function ‘arch_supports_noncont_cat’, inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6: ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~ cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’ 304 | __cpuid_count(0x10, 1, eax, ebx, ecx, edx); | ^~~~~~~~~~~~~ ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~
Quoted 6 lines
cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
306 |__cpuid_count(0x10, 2, eax, ebx, ecx, edx);Reported-by Muhammad Usama Anjum <[email protected]>Reported-by Ilpo Järvinen <[email protected]>Signed-off-by Shuah Khan <[email protected]>
LGTM
...
Quoted 20 lines
tools/testing/selftests/resctrl/cat_test.c +2
-2@@ -290,12 +290,12 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_paramstatic bool arch_supports_noncont_cat (const struct resctrl_test *test) { -unsigned int eax, ebx, ecx, edx; -/* AMD always supports non-contiguous CBM. */ if (get_vendor () ==ARCH_AMD )return true; +#if defined(__i386__) || defined(__x86_64__)/* arch */ +unsigned int eax, ebx, ecx, edx;/* Intel support for non-contiguous CBM needs to be discovered. */ if (!strcmp (test->resource,"L3" ))__cpuid_count (0x10 ,1 , eax, ebx, ecx, edx);
tools/testing/selftests/resctrl/cat_test.c static bool arch_supports_noncont_cat(const struct resctrl_test *test) · line 309
Quoted 5 lines
tools/testing/selftests/resctrl/cat_test.c +2
-0@@ -305,6 +305,8 @@ static bool arch_supports_noncont_cat(const struct resctrl_test *test)return false;return ((ecx >>3 ) &1 ); +#endif /* end arch */ +return false;
nit: empty line before return
Quoted 3 lines
tools/testing/selftests/resctrl/cat_test.c +0
-0} static int noncont_cat_run_test(const struct resctrl_test *test,
Signature · 2 lines
BR, Muhammad Usama Anjum
Shuah Khan
maintainerQuoted 38 lines · Muhammad Usama Anjum
Hi Shuah,
Thank you for fixing it.
Quoted 33 lines · Shuah Khan
When resctrl is built on architectures without
__cpuid_count()support, build fails. resctrl uses__cpuid_count()defined inkselftest.h.Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call
__cpuid_count()do so from x86/x86_64 code paths when _i386__ or__x86_64__are defined. resctrl is an exception.Fix the problem by defining
__cpuid_count()only when__i386__or__x86_64__are defined inkselftest.hand changing resctrl to call__cpuid_count()only when__i386__or__x86_64__are defined.In file included from resctrl.h:24,
from cat_test.c:11: In function ‘arch_supports_noncont_cat’, inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6: ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~ cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’ 304 | __cpuid_count(0x10, 1, eax, ebx, ecx, edx); | ^~~~~~~~~~~~~ ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
306 |__cpuid_count(0x10, 2, eax, ebx, ecx, edx);
Quoted 5 lines
Quoted 3 lines
Reported-by Muhammad Usama Anjum <[email protected]>Reported-by Ilpo Järvinen <[email protected]>Signed-off-by Shuah Khan <[email protected]>LGTM
Reviewed-by Muhammad Usama Anjum <[email protected]>
Thank you for the review and finding the problem to begin with. Much appreciated.
Quoted 24 lines
...
Quoted 22 lines
tools/testing/selftests/resctrl/cat_test.c +2
-2@@ -290,12 +290,12 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_paramstatic bool arch_supports_noncont_cat (const struct resctrl_test *test) { -unsigned int eax, ebx, ecx, edx; -/* AMD always supports non-contiguous CBM. */ if (get_vendor () ==ARCH_AMD )return true; +#if defined(__i386__) || defined(__x86_64__)/* arch */ +unsigned int eax, ebx, ecx, edx;/* Intel support for non-contiguous CBM needs to be discovered. */ if (!strcmp (test->resource,"L3" ))__cpuid_count (0x10 ,1 , eax, ebx, ecx, edx);@@ -305,6 +305,8 @@ static bool arch_supports_noncont_cat(const struct resctrl_test *test)return false;
Quoted 4 lines
tools/testing/selftests/resctrl/cat_test.c static bool arch_supports_noncont_cat(const struct resctrl_test *test) · line 309
Quoted 3 lines
tools/testing/selftests/resctrl/cat_test.c +2
-0return ((ecx >>3 ) &1 ); +#endif /* end arch */ +return false;nit: empty line before return
Will do.
Quoted 5 lines
tools/testing/selftests/resctrl/cat_test.c static bool arch_supports_noncont_cat(const struct resctrl_test *test) · line 312
Quoted 4 lines
tools/testing/selftests/resctrl/cat_test.c +0
-0} static int noncont_cat_run_test(const struct resctrl_test *test,
thanks,
-- Shuah
Quoted 30 lines · Shuah Khan
When resctrl is built on architectures without
__cpuid_count()support, build fails. resctrl uses__cpuid_count()defined inkselftest.h.Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call
__cpuid_count()do so from x86/x86_64 code paths when _i386__ or__x86_64__are defined. resctrl is an exception.Fix the problem by defining
__cpuid_count()only when__i386__or__x86_64__are defined inkselftest.hand changing resctrl to call__cpuid_count()only when__i386__or__x86_64__are defined.In file included from resctrl.h:24,
from cat_test.c:11: In function ‘arch_supports_noncont_cat’, inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6: ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~ cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’ 304 | __cpuid_count(0x10, 1, eax, ebx, ecx, edx); | ^~~~~~~~~~~~~ ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~
Quoted 6 lines
cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
306 |__cpuid_count(0x10, 2, eax, ebx, ecx, edx);Reported-by Muhammad Usama Anjum <[email protected]>Reported-by Ilpo Järvinen <[email protected]>Signed-off-by Shuah Khan <[email protected]>
When the small things from Muhammad and Reinette addressed, this seems okay.
Thanks for the solution.
I'm still left to wonder if the x86 selftest is supposed to clobber CFLAGS? It seems that problem is orthogonal to this cpuid/resctrl problem. I mean this question from the perspective of coherency in the entire kselftest framework, lib.mk seems to want to adjust CFLAGS but those changes will get clobbered in the case of x86 selftest.
Signature · 1 line
i.
Quoted 54 lines
--- tools/testing/selftests/kselftest.h | 2 ++ tools/testing/selftests/resctrl/cat_test.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-)tools/testing/selftests/kselftest.h +2
-0@@ -61,6 +61,7 @@#define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]))#endif +#if defined(__i386__) || defined(__x86_64__)/* arch */ /* * gcc cpuid.h provides __cpuid_count() since v4.4. * Clang/LLVM cpuid.h provides __cpuid_count() since v3.4.0. @@ -75,6 +76,7 @@ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count))#endif +#endif /* end arch */ /* define kselftest exit codes */ #define KSFT_PASS 0tools/testing/selftests/resctrl/cat_test.c +4
-2@@ -290,12 +290,12 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_paramstatic bool arch_supports_noncont_cat (const struct resctrl_test *test) { -unsigned int eax, ebx, ecx, edx; -/* AMD always supports non-contiguous CBM. */ if (get_vendor () ==ARCH_AMD )return true; +#if defined(__i386__) || defined(__x86_64__)/* arch */ +unsigned int eax, ebx, ecx, edx;/* Intel support for non-contiguous CBM needs to be discovered. */ if (!strcmp (test->resource,"L3" ))__cpuid_count (0x10 ,1 , eax, ebx, ecx, edx);@@ -305,6 +305,8 @@ static bool arch_supports_noncont_cat(const struct resctrl_test *test)return false;return ((ecx >>3 ) &1 ); +#endif /* end arch */ +return false; } static int noncont_cat_run_test(const struct resctrl_test *test,
Shuah Khan
maintainerQuoted 35 lines · Ilpo Järvinen
Quoted 33 lines · Shuah Khan
When resctrl is built on architectures without
__cpuid_count()support, build fails. resctrl uses__cpuid_count()defined inkselftest.h.Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call
__cpuid_count()do so from x86/x86_64 code paths when _i386__ or__x86_64__are defined. resctrl is an exception.Fix the problem by defining
__cpuid_count()only when__i386__or__x86_64__are defined inkselftest.hand changing resctrl to call__cpuid_count()only when__i386__or__x86_64__are defined.In file included from resctrl.h:24,
from cat_test.c:11: In function ‘arch_supports_noncont_cat’, inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6: ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~ cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’ 304 | __cpuid_count(0x10, 1, eax, ebx, ecx, edx); | ^~~~~~~~~~~~~ ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
306 |__cpuid_count(0x10, 2, eax, ebx, ecx, edx);
Quoted 9 lines
Quoted 3 lines
Reported-by Muhammad Usama Anjum <[email protected]>Reported-by Ilpo Järvinen <[email protected]>Signed-off-by Shuah Khan <[email protected]>When the small things from Muhammad and Reinette addressed, this seems okay.
Reviewed-by Ilpo Järvinen <[email protected]>
Will do. Thank you for the review.
Quoted 9 lines
Thanks for the solution.
I'm still left to wonder if the x86 selftest is supposed to clobber CFLAGS? It seems that problem is orthogonal to this cpuid/resctrl problem. I mean this question from the perspective of coherency in the entire kselftest framework, lib.mk seems to want to adjust CFLAGS but those changes will get clobbered in the case of x86 selftest.
This isn't the case x86 clobbering the CFLAGS. This falls into the case of x86 customizing the flags for the test and the ones set by the common lib.mk might interfere with the flags it needs.
There isn't anything here to fix based on the history of this test and lib.mk.
thanks,
-- Shuah