This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH V2 5/8] bpf: make target-supports.exp aware of eBPF


On 8/16/19 6:50 PM, Jose E. Marchesi wrote:
> This patch makes the several effective target checks in
> target-supports.exp to be aware of eBPF targets.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* lib/target-supports.exp (check_effective_target_malloc): New
> 	function.
> 	(check_effective_target_trampolines): Adapt to eBPF.
> 	(check_effective_target_stack_size): Likewise.
> 	(dg-effective-target-value): Likewise.
> 	(check_effective_target_indirect_jumps): Likewise.
> 	(check_effective_target_nonlocal_goto): Likewise.
> 	(check_effective_target_global_constructor): Likewise.
> 	(check_effective_target_return_address): Likewise.
> ---
>  gcc/testsuite/ChangeLog               | 11 +++++++++++
>  gcc/testsuite/lib/target-supports.exp | 27 +++++++++++++++++++--------
>  2 files changed, 30 insertions(+), 8 deletions(-)
> 
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 300d22a2d65..8b6168626d8 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
>  
> @@ -546,7 +550,11 @@ proc check_effective_target_stack_size { } {
>  proc dg-effective-target-value { effective_target } {
>      if { "$effective_target" == "stack_size" } {
>  	if [check_effective_target_stack_size] {
> -	    return [target_info gcc,stack_size]
> +	    if [istarget bpf-*-*] {
> +		return "512"
> +	    } else {
> +		return [target_info gcc,stack_size]
> +	    }
>  	}
>      }
Shouldn't the BPF stack size be defined be in your target files?


The ChangeLog mentions check_effective_target_malloc, but I don't see it
in the patch itself.  Note that it needs to be documented in
gcc/doc/sourcebuild.texi as well if you are adding a new
check_effective_target_<whatever>

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]