From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:35120 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753818AbcEBRtD (ORCPT ); Mon, 2 May 2016 13:49:03 -0400 Date: Mon, 2 May 2016 19:56:17 +0200 From: Emese Revfy Subject: Re: [PATCH v7 1/6] Shared library support Message-Id: <20160502195617.9b2b7e07ced214a8f2136364@gmail.com> In-Reply-To: References: <20160422201957.97ce16f0e67377d0ce613d19@gmail.com> <20160422202138.d50937e812b30aaba4f38a92@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Masahiro Yamada Cc: Linux Kbuild mailing list , PaX Team , Brad Spengler , kernel-hardening@lists.openwall.com, Michal Marek , Kees Cook , Rasmus Villemoes , Fengguang Wu , Dmitry Vyukov , Linux Kernel Mailing List , David Brown On Mon, 2 May 2016 14:03:00 +0900 Masahiro Yamada wrote: > In the first place, > I am wondering if we need to revive this documentation. > What this commit is only interested in *.so generation, > not host program support. I agree that we don't need this documentation. I'll remove it. > > @@ -124,5 +158,39 @@ quiet_cmd_host-cxxobjs = HOSTCXX $@ > > $(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE > > $(call if_changed_dep,host-cxxobjs) > > > > +# Compile .c file, create position independent .o file > > +# host-cshobjs -> .o > > +quiet_cmd_host-cshobjs = HOSTCC -fPIC $@ > > + cmd_host-cshobjs = $(HOSTCC) $(hostc_flags) -fPIC -c -o $@ $< > > +$(host-cshobjs): $(obj)/%.o: $(src)/%.c FORCE > > + $(call if_changed_dep,host-cshobjs) > > + > > +# Compile .c file, create position independent .o file > > > Please explain why c++ compiler should be used to compile .c files. > > This is not clear, so worth commenting. Where do you think that the C++ compiler is used above? I think HOSTCC can only be C compiler. -- Emese