Received: from eggs.gnu.org ([2001:4830:134:3::10]:57251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byeVr-0005P4-3e for qemu-devel@nongnu.org; Mon, 24 Oct 2016 08:38:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byeVm-0000Tl-Qg for qemu-devel@nongnu.org; Mon, 24 Oct 2016 08:37:59 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:35679) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byeVm-0000TT-K6 for qemu-devel@nongnu.org; Mon, 24 Oct 2016 08:37:54 -0400 Received: by mail-wm0-x235.google.com with SMTP id c78so102157825wme.0 for ; Mon, 24 Oct 2016 05:37:53 -0700 (PDT) Sender: Paolo Bonzini References: <1477170324-17783-1-git-send-email-rth@twiddle.net> From: Paolo Bonzini Message-ID: <4878da77-9ded-a07d-feda-89d3b9b78353@redhat.com> Date: Mon, 24 Oct 2016 14:37:48 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 00/35] cmpxchg atomic operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Richard Henderson Cc: QEMU Developers On 24/10/2016 12:51, Peter Maydell wrote: > On 22 October 2016 at 22:04, Richard Henderson wrote: >> This is v7, with the additional fix for gcc 4.2, as on Centos 6. >> >> >> r~ >> >> >> The following changes since commit da158a86c407fa7b9da848b571356a26809d8df9: >> >> Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2016-10-20-1' into staging (2016-10-20 14:46:19 +0100) >> >> are available in the git repository at: >> >> git://github.com/rth7680/qemu.git tags/pull-atomic-20161022 >> >> for you to fetch changes up to 278c5beb29ef8b6747a7c9bde403e9fe90cdad9c: >> >> target-alpha: Emulate LL/SC using cmpxchg helpers (2016-10-20 11:00:46 -0700) >> >> ---------------------------------------------------------------- >> cmpxchg atomic operations >> >> ---------------------------------------------------------------- > > This fails to build with clang (OSX and linux): > > /Users/pm215/src/qemu-for-merges/target-arm/translate.c:1019:1: error: > unused function 'gen_aa32_ld16ua > ' [-Werror,-Wunused-function] > DO_GEN_LD(16ua, MO_UW | MO_ALIGN) > ^ > /Users/pm215/src/qemu-for-merges/target-arm/translate.c:954:20: note: > expanded from macro 'DO_GEN_LD' > static inline void gen_aa32_ld##SUFF(DisasContext *s, TCGv_i32 val, \ > ^ > :130:1: note: expanded from here > gen_aa32_ld16ua > ^ > /Users/pm215/src/qemu-for-merges/target-arm/translate.c:1020:1: error: > unused function 'gen_aa32_ld32ua > ' [-Werror,-Wunused-function] > DO_GEN_LD(32ua, MO_UL | MO_ALIGN) > ^ > /Users/pm215/src/qemu-for-merges/target-arm/translate.c:954:20: note: > expanded from macro 'DO_GEN_LD' > static inline void gen_aa32_ld##SUFF(DisasContext *s, TCGv_i32 val, \ > ^ > :131:1: note: expanded from here > gen_aa32_ld32ua > ^ > > The other builds passed OK. LLVM bug https://llvm.org/bugs/show_bug.cgi?id=22712: we should probably consider the functions to not be in the main source file if they were expanded from a macro that was defined outside that file. That perhaps doesn't go far enough (consider a macro defined in the main source file, that produces several functions, where after each macro invocation only a subset of the functions is used) Paolo