diff mbox series

[urcu,4/4] Don't force a target and optimization level on ARMv7

Message ID 20201215162850.78638-4-mjeanson@efficios.com
State New
Headers show
Series [urcu,1/4] Cleanup: Move ARM specific code to urcu/arch/arm.h | expand

Commit Message

Michael Jeanson Dec. 15, 2020, 4:28 p.m. UTC
We shouldn't force a specific target cpu for the compiler on ARMv7 but
let the system or the user choose it. If some of our code depends on a
specific target CPU features, it should be compile tested.

Also remove the default optimisation level of O1, it's potentially a
workaround to an early armv7 compiler performance problem and anyway
most builds will have an optimisation level flag set in the CFLAGS which
will override this one.

Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
Cc: Paul E. McKenney <paulmck at kernel.org>
Change-Id: I1d1bb5cc0fa0be8f8b1d6a9ad7bf063809be1aef
---
 configure.ac | 4 ----
 1 file changed, 4 deletions(-)

Comments

Paul E. McKenney Dec. 15, 2020, 4:39 p.m. UTC | #1
On Tue, Dec 15, 2020 at 11:28:50AM -0500, Michael Jeanson wrote:
> We shouldn't force a specific target cpu for the compiler on ARMv7 but
> let the system or the user choose it. If some of our code depends on a
> specific target CPU features, it should be compile tested.
> 
> Also remove the default optimisation level of O1, it's potentially a
> workaround to an early armv7 compiler performance problem and anyway
> most builds will have an optimisation level flag set in the CFLAGS which
> will override this one.

Indeed, the original was based on advice from ARM that has undoubtedly
changed over time, so...

> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> Cc: Paul E. McKenney <paulmck at kernel.org>

Acked-by: Paul E. McKenney <paulmck at kernel.org>

> Change-Id: I1d1bb5cc0fa0be8f8b1d6a9ad7bf063809be1aef
> ---
>  configure.ac | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index daa967a..f477425 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -119,10 +119,6 @@ AS_CASE([$host],[*-cygwin*],
>  	[AM_CONDITIONAL(USE_CYGWIN, false)]
>  )
>  
> -AS_IF([test "$host_cpu" = "armv7l"],[
> -	AM_CFLAGS="$AM_CFLAGS -mcpu=cortex-a9 -mtune=cortex-a9 -O1"
> -])
> -
>  # Search for clock_gettime
>  AC_SEARCH_LIBS([clock_gettime], [rt], [
>  	AC_DEFINE([CONFIG_RCU_HAVE_CLOCK_GETTIME], [1])
> -- 
> 2.29.2
>
Mathieu Desnoyers Dec. 17, 2020, 1:30 p.m. UTC | #2
Merged in liburcu master, thanks!

Mathieu

----- On Dec 15, 2020, at 11:28 AM, Michael Jeanson mjeanson at efficios.com wrote:

> We shouldn't force a specific target cpu for the compiler on ARMv7 but
> let the system or the user choose it. If some of our code depends on a
> specific target CPU features, it should be compile tested.
> 
> Also remove the default optimisation level of O1, it's potentially a
> workaround to an early armv7 compiler performance problem and anyway
> most builds will have an optimisation level flag set in the CFLAGS which
> will override this one.
> 
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> Cc: Paul E. McKenney <paulmck at kernel.org>
> Change-Id: I1d1bb5cc0fa0be8f8b1d6a9ad7bf063809be1aef
> ---
> configure.ac | 4 ----
> 1 file changed, 4 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index daa967a..f477425 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -119,10 +119,6 @@ AS_CASE([$host],[*-cygwin*],
> 	[AM_CONDITIONAL(USE_CYGWIN, false)]
> )
> 
> -AS_IF([test "$host_cpu" = "armv7l"],[
> -	AM_CFLAGS="$AM_CFLAGS -mcpu=cortex-a9 -mtune=cortex-a9 -O1"
> -])
> -
> # Search for clock_gettime
> AC_SEARCH_LIBS([clock_gettime], [rt], [
> 	AC_DEFINE([CONFIG_RCU_HAVE_CLOCK_GETTIME], [1])
> --
> 2.29.2
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index daa967a..f477425 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,10 +119,6 @@  AS_CASE([$host],[*-cygwin*],
 	[AM_CONDITIONAL(USE_CYGWIN, false)]
 )
 
-AS_IF([test "$host_cpu" = "armv7l"],[
-	AM_CFLAGS="$AM_CFLAGS -mcpu=cortex-a9 -mtune=cortex-a9 -O1"
-])
-
 # Search for clock_gettime
 AC_SEARCH_LIBS([clock_gettime], [rt], [
 	AC_DEFINE([CONFIG_RCU_HAVE_CLOCK_GETTIME], [1])