From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq8hF-0002Yq-13 for qemu-devel@nongnu.org; Wed, 06 May 2015 19:25:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq8hB-0000pO-IS for qemu-devel@nongnu.org; Wed, 06 May 2015 19:25:44 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43159 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq8hB-0000pJ-Bi for qemu-devel@nongnu.org; Wed, 06 May 2015 19:25:41 -0400 Message-ID: <554AA2F2.7060405@suse.de> Date: Thu, 07 May 2015 01:25:38 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1430920000-31229-1-git-send-email-famz@redhat.com> In-Reply-To: <1430920000-31229-1-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] rules.mak: Force CFLAGS for all objects in DSO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Peter Maydell , Stefan Weil , Michael Tokarev , =?windows-1252?Q?Dirk_M=FCller?= , Paolo Bonzini , =?windows-1252?Q?Andreas_F=E4rber?= On 06.05.15 15:46, Fam Zheng wrote: > Because of the trick of process-archive-undefs, all .mo objects, even > with --enable-modules, are dependencies of executables. > > This breaks CFLAGS propogation because the compiling of module object > will happen too early before building for DSO. > > With GCC 5, the linking would fail because .o doesn't have -fPIC. Also, > BUILD_DSO will be missed. (module-common.o will have it, so the stamp > symbol was still liked in .so). > > Fix the problem by forcing the CFLAGS during unnest-vars. > > Reported-by: Alexander Graf > Signed-off-by: Fam Zheng As a heads-up I just verified that this patch does indeed fix compilation with gcc5 for me. However looking at the mail thread I assume there's a v2 coming, so I'll hold off my tested-by tag ;). For the final patch, we will probably also want to have it in the qemu-stable tree, so that people will be able to compile older versions of qemu (and modules) with newer compilers. Alex