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


Hi Jose,

On Sat, Aug 17, 2019 at 02:50:53AM +0200, Jose E. Marchesi wrote:
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -526,7 +526,8 @@ proc check_effective_target_trampolines { } {
>  	 || [istarget nvptx-*-*]
>  	 || [istarget hppa2.0w-hp-hpux11.23]
>  	 || [istarget hppa64-hp-hpux11.23]
> -	 || [istarget pru-*-*] } {
> +	 || [istarget pru-*-*]
> +         || [istarget bpf-*-*] } {

There is some whitespace damage here.

> @@ -538,6 +539,9 @@ proc check_effective_target_stack_size { } {
>      if [target_info exists gcc,stack_size] {
>  	return 1
>      }
> +    if [istarget bpf-*-*] {
> +	return 1
> +    }

You should still set the proper stack size in your board file, so does
this help you at all?

> @@ -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]
> +	    }

Yeah okay...  Can't you directly override the gcc,stack_size setting,
instead of doing that in every(?) place it is checked?


Segher


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