|
Message-ID: <CAK7LNART3s3dtsV3fApVmXbqpDe+QBsBOxW37hqCM-YXCzo-Pw@mail.gmail.com> Date: Wed, 16 Mar 2016 16:50:32 +0900 From: Masahiro Yamada <yamada.masahiro@...ionext.com> To: Emese Revfy <re.emese@...il.com> Cc: Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>, pageexec@...email.hu, spender@...ecurity.net, kernel-hardening@...ts.openwall.com, Michal Marek <mmarek@...e.com>, Kees Cook <keescook@...omium.org>, Rasmus Villemoes <linux@...musvillemoes.dk>, fengguang.wu@...el.com, Dmitry Vyukov <dvyukov@...gle.com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v5 1/5] Shared library support Hi Emese, 2016-03-15 5:14 GMT+09:00 Emese Revfy <re.emese@...il.com>: > On Fri, 11 Mar 2016 15:19:33 +0900 > Masahiro Yamada <yamada.masahiro@...ionext.com> wrote: > >> As an alternative, you can add needed build rules >> into tools/gcc/Makefile, not scripts/Makefile.host >> >> I guess these rule won't be used in other places. > > I think it is better if the rules stay under scripts/ because I expect that there will also be clang and llvm plugins > in the future (e.g., clang plugins can access the frontend that gcc plugins can't do). In this case these rules would > either have to be duplicated or moved back under scripts/ (which makes it difficult to backport). > >> > +# hostcc-option >> > +# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586) >> > + >> > +hostcc-option = $(call try-run,\ >> > + $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) >> > + >> > __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) >> > +__hostlibs := $(sort $(hostlibs-y) $(hostlibs-m)) >> > +__hostcxxlibs := $(sort $(hostcxxlibs-y) $(hostcxxlibs-m)) >> > >> > # C code >> > # Executables compiled from a single .c file >> > @@ -42,6 +60,19 @@ host-cxxmulti := $(foreach m,$(__hostprogs),$(if $($(m)-cxxobjs),$(m))) >> > # C++ Object (.o) files compiled from .cc files >> > host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs))) >> > >> > +# Shared libaries (only .c supported) >> > +# Shared libraries (.so) - all .so files referenced in "xxx-objs" >> > +host-cshlib := $(sort $(filter %.so, $(host-cobjs))) >> >> useless. > > Which part do you think is useless and why? The line host-cshlib := $(sort $(filter %.so, $(host-cobjs))) is useless because there is no host program that consists of .so files. Your intention is to generate shared objects as final targets, not host tools that call shared objects. -- Best Regards Masahiro Yamada
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.