public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Add missing vxworks filters to lib/target-supports.exp functions
@ 2020-12-22 21:32 Alexandre Oliva
  2020-12-29 10:26 ` Richard Sandiford
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2020-12-22 21:32 UTC (permalink / raw)
  To: gcc-patches


Explicitly disable some vxworks-missing features in the testsuite, that
the current feature tests detect as present.

Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2.
Ok to install?


from Olivier Hainque <hainque@adacore.com>
for  gcc/testsuite/ChangeLog

	* lib/target-supports.exp (check_weak_available,
	check_fork_available, check_effective_target_lto,
	check_effective_target_mempcpy): Add vxworks filters.
---
 gcc/testsuite/lib/target-supports.exp |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 11343d0192fcb..6b1d13b105da7 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -326,6 +326,12 @@ proc check_weak_available { } {
 	return 0
     }
 
+    # VxWorks hardly supports it (vx7 RTPs only)
+
+    if { [istarget *-*-vxworks*] } {
+	return 0
+    }
+
     # ELF and ECOFF support it. a.out does with gas/gld but may also with
     # other linkers, so we should try it
 
@@ -2606,6 +2612,11 @@ proc check_function_available { function } {
 # Returns true iff "fork" is available on the target system.
 
 proc check_fork_available {} {
+    if { [istarget *-*-vxworks*] } {
+	# VxWorks doesn't have fork but our way to test can't
+	# tell as we're doing partial links for kernel modules.
+	return 0
+     }    
     return [check_function_available "fork"]
 }
 
@@ -9295,6 +9306,11 @@ proc check_effective_target_gld { } {
 # (LTO) support.
 
 proc check_effective_target_lto { } {
+    if { [istarget *-*-vxworks*] } {
+	# No LTO on VxWorks, with kernel modules
+	# built with partial links
+	return 0
+    }
     if { [istarget nvptx-*-*]
 	 || [istarget amdgcn-*-*] } {
 	return 0;
@@ -9514,6 +9530,11 @@ proc check_effective_target_run_expensive_tests { } {
 # Returns 1 if "mempcpy" is available on the target system.
 
 proc check_effective_target_mempcpy {} {
+    if { [istarget *-*-vxworks*] } {
+	# VxWorks doesn't have mempcpy but our way to test fails
+	# to detect as we're doing partial links for kernel modules.
+	return 0
+     }
     return [check_function_available "mempcpy"]
 }
 


-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Add missing vxworks filters to lib/target-supports.exp functions
  2020-12-22 21:32 Add missing vxworks filters to lib/target-supports.exp functions Alexandre Oliva
@ 2020-12-29 10:26 ` Richard Sandiford
  2021-01-11  8:23   ` Olivier Hainque
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Sandiford @ 2020-12-29 10:26 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches

Alexandre Oliva <oliva@adacore.com> writes:
> Explicitly disable some vxworks-missing features in the testsuite, that
> the current feature tests detect as present.
>
> Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2.
> Ok to install?
>
>
> from Olivier Hainque <hainque@adacore.com>
> for  gcc/testsuite/ChangeLog
>
> 	* lib/target-supports.exp (check_weak_available,
> 	check_fork_available, check_effective_target_lto,
> 	check_effective_target_mempcpy): Add vxworks filters.

This comes under Olivier's maintainership, but LGTM.

Richard

> ---
>  gcc/testsuite/lib/target-supports.exp |   21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 11343d0192fcb..6b1d13b105da7 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -326,6 +326,12 @@ proc check_weak_available { } {
>  	return 0
>      }
>  
> +    # VxWorks hardly supports it (vx7 RTPs only)
> +
> +    if { [istarget *-*-vxworks*] } {
> +	return 0
> +    }
> +
>      # ELF and ECOFF support it. a.out does with gas/gld but may also with
>      # other linkers, so we should try it
>  
> @@ -2606,6 +2612,11 @@ proc check_function_available { function } {
>  # Returns true iff "fork" is available on the target system.
>  
>  proc check_fork_available {} {
> +    if { [istarget *-*-vxworks*] } {
> +	# VxWorks doesn't have fork but our way to test can't
> +	# tell as we're doing partial links for kernel modules.
> +	return 0
> +     }    
>      return [check_function_available "fork"]
>  }
>  
> @@ -9295,6 +9306,11 @@ proc check_effective_target_gld { } {
>  # (LTO) support.
>  
>  proc check_effective_target_lto { } {
> +    if { [istarget *-*-vxworks*] } {
> +	# No LTO on VxWorks, with kernel modules
> +	# built with partial links
> +	return 0
> +    }
>      if { [istarget nvptx-*-*]
>  	 || [istarget amdgcn-*-*] } {
>  	return 0;
> @@ -9514,6 +9530,11 @@ proc check_effective_target_run_expensive_tests { } {
>  # Returns 1 if "mempcpy" is available on the target system.
>  
>  proc check_effective_target_mempcpy {} {
> +    if { [istarget *-*-vxworks*] } {
> +	# VxWorks doesn't have mempcpy but our way to test fails
> +	# to detect as we're doing partial links for kernel modules.
> +	return 0
> +     }
>      return [check_function_available "mempcpy"]
>  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Add missing vxworks filters to lib/target-supports.exp functions
  2020-12-29 10:26 ` Richard Sandiford
@ 2021-01-11  8:23   ` Olivier Hainque
  0 siblings, 0 replies; 3+ messages in thread
From: Olivier Hainque @ 2021-01-11  8:23 UTC (permalink / raw)
  To: Richard Sandiford; +Cc: Olivier Hainque, Alexandre Oliva, gcc-patches



> On 29 Dec 2020, at 11:26, Richard Sandiford via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> 
> Alexandre Oliva <oliva@adacore.com> writes:
>> Explicitly disable some vxworks-missing features in the testsuite, that
>> the current feature tests detect as present.
>> 
>> Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2.
>> Ok to install?
>> 
>> 
>> from Olivier Hainque <hainque@adacore.com>
>> for  gcc/testsuite/ChangeLog
>> 
>> 	* lib/target-supports.exp (check_weak_available,
>> 	check_fork_available, check_effective_target_lto,
>> 	check_effective_target_mempcpy): Add vxworks filters.
> 
> This comes under Olivier's maintainership, but LGTM.

(With a bit of delay after the end-of-year break and
backlog + activity recovery ...)

Thanks for your input on this Richard.

We're discussing possible ways to improve symbol availability
detection, so we could get rid of the bits like:

>> proc check_effective_target_mempcpy {} {
>> +    if { [istarget *-*-vxworks*] } {
>> +	# VxWorks doesn't have mempcpy but our way to test fails
>> +	# to detect as we're doing partial links for kernel modules.
>> +	return 0
>> +     }
>>     return [check_function_available "mempcpy"]
>> }

Olivier


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-11  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 21:32 Add missing vxworks filters to lib/target-supports.exp functions Alexandre Oliva
2020-12-29 10:26 ` Richard Sandiford
2021-01-11  8:23   ` Olivier Hainque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).