Clang-r475365b error

From JCRDoc
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Fix error based on clang-r475365b , implemented on some roms as of now

  • General Info
    • Device: all devices on specific roms
    • Codename: all devices
    • Rom: YAAP & some more
    • Android Version: 13
    • Security Patch: Feb
    • Description: some roms use clang 16.0.2 , so fix is for them. ROMS WHICH DO NOT USE CLANG 16.0.2 WON'T FACE IT

Error:

 prebuilts/clang/host/linux-x86/clang-r475365b/lib/clang/16.0.2/include/arm_acle.h:615:10: error: '__builtin_arm_crc32cb' needs 
 target feature crc
 return __builtin_arm_crc32cb(__a, __b); 

Solution:

In your BoardConfig.mk , by default most of the devices have these flags:

   TARGET_CPU_VARIANT := generic
   TARGET_2ND_CPU_VARIANT := generic 

However change THEM to the value of

   TARGET_CPU_VARIANT_RUNTIME
   TARGET_2ND_CPU_VARIANT_RUNTIME


Example: If your flags are:

   TARGET_CPU_VARIANT := generic
   TARGET_CPU_VARIANT_RUNTIME := cortex-a76
   TARGET_2ND_CPU_VARIANT := generic
   TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a55

Change Them to:

   TARGET_CPU_VARIANT := cortex-a76
   TARGET_CPU_VARIANT_RUNTIME := cortex-a76
   TARGET_2ND_CPU_VARIANT := cortex-a55
   TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a55

by dreAd1811