Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 11 Aug 2017 20:55:05 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] arch/sh/atomic_arch.sh: add missing : in asm()
 statement

On Fri, Jul 28, 2017 at 11:05:54PM +0200, Thomas Petazzoni wrote:
> Due to a missing ":" in an asm() statement, the "memory" statement is
> considered by gcc as input operands and not clobbers, which causes a
> build failure:
> 
> In file included from ./src/internal/atomic.h:6:0,
>                  from ./src/internal/pthread_impl.h:10,
>                  from src/ldso/dlerror.c:4:
> ../arch/sh/atomic_arch.h: In function 'a_barrier':
> ../arch/sh/atomic_arch.h:24:44: error: expected '(' before ')' token
>   __asm__ __volatile__ ("synco" : : "memory");
>                                             ^
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
> ---
>  arch/sh/atomic_arch.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sh/atomic_arch.h b/arch/sh/atomic_arch.h
> index 74444d5..d48a765 100644
> --- a/arch/sh/atomic_arch.h
> +++ b/arch/sh/atomic_arch.h
> @@ -21,7 +21,7 @@ static inline int a_sc(volatile int *p, int v)
>  #define a_barrier a_barrier
>  static inline void a_barrier()
>  {
> -	__asm__ __volatile__ ("synco" : : "memory");
> +	__asm__ __volatile__ ("synco" ::: "memory");
>  }
>  
>  #define a_pre_llsc a_barrier
> -- 
> 2.9.4

Thanks! Applying.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.