mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: musl@lists.openwall.com
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: [PATCH] arch/sh/atomic_arch.sh: add missing : in asm() statement
Date: Fri, 28 Jul 2017 23:05:54 +0200	[thread overview]
Message-ID: <20170728210554.6391-1-thomas.petazzoni@free-electrons.com> (raw)

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@free-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



             reply	other threads:[~2017-07-28 21:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 21:05 Thomas Petazzoni [this message]
2017-08-12  0:55 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170728210554.6391-1-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).