All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Kees Cook <keescook@chromium.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
	lkml <linux-kernel@vger.kernel.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Discussions about the Letux Kernel 
	<letux-kernel@openphoenux.org>
Subject: Re: [Letux-kernel] [BUG v5.2-rc1] ARM build broken
Date: Mon, 3 Jun 2019 09:46:03 +0200	[thread overview]
Message-ID: <9390B37E-5FFC-4528-A8FE-3D1784C3C2E9@goldelico.com> (raw)
In-Reply-To: <2A1D2458-0130-474B-A092-6A6CDFB8CA8B@goldelico.com>

Hi Kees,

> Am 22.05.2019 um 08:02 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> 
> It turns out that HOSTCC and HOSTCXX are a gcc-4.9.4 installed through MacPorts.
> And CC is the self-bootstrapped cross-gcc-4.9.2 toolchain for arm.
> 
> The problem is likely that they do not know of each other, i.e. the required
> include and library search paths. Therefore HOSTCXX can't build plugins compatible
> with CC because it does not even know its existence. Or the gcc-4.9.4 from MacPorts
> is missing the gcc-plugin library to link against which would explain the HOSTLLD
> error message as well.
> 
> This seems not to be found by the tests of scripts/gcc-plugin.sh. I have to check why...

Well, here are some findings:
* gcc-plugin.sh does not check if the g++ is really capable of linking a gcc-plugin
* it only syntax-checks if g++ supports the designated initializer GNU extension
* my gcc from MacPorts passes this test
* but seems not to be able to properly build any gcc-plugin.so
* I also get the similar linker errors when trying this gcc-plugin example:
  https://thinkingeek.com/2015/08/16/a-simple-plugin-for-gcc-part-1/
* the step that fails with the MacPorts gcc is linking the gcc-plugin.so from the gcc-plugin.o file
* I have not found any hint where this step should get the missing symbols from
  There is no lgcc or similar available

So I'd suggest to expand gcc-plugin.sh to not only syntax-check but also test if a
plugin.so can be successfully linked.

Maybe something like

	$2 -std=gnu++98 -shared -o /tmp/plugin.so -I"${srctree}"/gcc-plugins -I"${gccplugins_dir}"/include 2>&1

Maybe the test source code should reference plugin_default_version_check() to trigger
the linker.

BR and thanks,
Nikolaus

      reply	other threads:[~2019-06-03  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4DB08A04-D03A-4441-85DE-64A13E6D709C@goldelico.com>
2019-05-20 15:59 ` [BUG v5.2-rc1] ARM build broken Kees Cook
     [not found]   ` <D8F987B2-8F41-46DE-B298-89541D7A9774@goldelico.com>
2019-05-20 18:53     ` Kees Cook
2019-05-20 19:35       ` H. Nikolaus Schaller
2019-05-20 20:25         ` Kees Cook
2019-05-20 21:21       ` Chris Packham
2019-05-21 11:23         ` H. Nikolaus Schaller
2019-05-21 20:36           ` Kees Cook
2019-05-22  6:02             ` H. Nikolaus Schaller
2019-06-03  7:46               ` H. Nikolaus Schaller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9390B37E-5FFC-4528-A8FE-3D1784C3C2E9@goldelico.com \
    --to=hns@goldelico.com \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=ard.biesheuvel@linaro.org \
    --cc=keescook@chromium.org \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.