Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATQY7AWjmEEjDFgpLPkO_oQgkNKutgGb17v7=R8RPb5zA@mail.gmail.com>
Date: Tue, 3 May 2016 11:00:56 +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>,
        PaX Team <pageexec@...email.hu>,
        Brad Spengler <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 <fengguang.wu@...el.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        David Brown <david.brown@...aro.org>
Subject: Re: [PATCH v7 1/6] Shared library support

Hi Emese,


2016-05-03 2:56 GMT+09:00 Emese Revfy <re.emese@...il.com>:
> On Mon, 2 May 2016 14:03:00 +0900
> Masahiro Yamada <yamada.masahiro@...ionext.com> 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.
>

Not above, but *below*.

This comment "Compile .c file, create position independent .o file"
is for the following code block.


# Compile .c file, create position independent .o file
# host-cxxshobjs -> .o
quiet_cmd_host-cxxshobjs = HOSTCXX -fPIC $@
      cmd_host-cxxshobjs = $(HOSTCXX) $(hostcxx_flags) -fPIC -c -o $@ $<
                           $(host-cxxshobjs): $(obj)/%.o: $(src)/%.c FORCE
                           $(call if_changed_dep,host-cxxshobjs)




We generally use HOSTCC to compile *.c files,
and HOSTCXX to compile *.cc files.


But, here, you mention to use HOSTCXX to compile .c files
such as cyc_complexity_plugin.c, sancov_plugin.c, etc.

This is not straight-forward.  It is worthwhile to comment the reason.


-- 
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.