[PATCH] Annocheck: Skip TEST_PIC on Clang

Nick Clifton nickc@redhat.com
Mon Jun 8 08:27:05 GMT 2026


Hi Tulio,

> The annobin-for-clang plugin is still disabled on Rawhide and CentOS
> Streams 10. 

Which is a shame, but understandable.

> However TEST_PIC can only succeed if the plugin records if
> PIC was enabled.
> 
> With this change, TEST_PIC will succeed if annobin-for-clang was used
> with -fPIC or -fpic.
> It will fail if annobin-for-clang was used without these arguments.
> But it will skip it if no information was generated from clang.

OK, that makes sense.  I did however make one small change to your
patch...

> +	      else if (C_compiler_used () && LLVM_compiler_used ())
> +		skip (data, i, SOURCE_FINAL_SCAN, "Annobin plugin is not currently required for LLVM compilers");
>   	      else if (C_compiler_used ())
 >		fail (data, i, SOURCE_FINAL_SCAN, "no indication that -fPIC was used");

I saw no reason for calling C_compiler_used() twice, so I changed the
code to:
	      else if (C_compiler_used ())
		{
		  if (LLVM_compiler_used ())
		    skip (data, i, SOURCE_FINAL_SCAN, "Annobin plugin is not currently required for LLVM compilers");
		  else
		    fail (data, i, SOURCE_FINAL_SCAN, "no indication that -fPIC was used");
		}

Cheers
   Nick



More information about the Annobin mailing list