All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [master][PATCH] gcc-cross{, -canadian}: remove --with-linker-hash-style
Date: Tue, 03 May 2016 14:13:09 -0400	[thread overview]
Message-ID: <20160503181309.GD27602@denix.org> (raw)
In-Reply-To: <20160503080913.GA2851@jama>

On Tue, May 03, 2016 at 10:09:13AM +0200, Martin Jansa wrote:
> On Mon, May 02, 2016 at 02:37:43PM -0700, Khem Raj wrote:
> > 
> > > On May 2, 2016, at 1:37 PM, Christopher Larson <kergoth@gmail.com> wrote:
> > > 
> > > 
> > > 
> > > On Mon, May 2, 2016 at 8:34 PM, Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>> wrote:
> > > 
> > > > On May 2, 2016, at 1:09 PM, Christopher Larson <kergoth@gmail.com <mailto:kergoth@gmail.com>> wrote:
> > > >
> > > > From: Christopher Larson <chris_larson@mentor.com <mailto:chris_larson@mentor.com>>
> > > >
> > > > We explicitly set the hash style to gnu in our LDFLAGS. Setting the default to
> > > > this in the toolchain, while convenient, actually hides bugs, as a failure to
> > > > obey LDFLAGS isn't noticed. By removing this, it's not dissimilar to how we
> > > > poison the sysroot -- rather than relying on the default, notice right away if
> > > > somoeone isn't obeying the needed flags.
> > > >
> > > > This will result in a failure to obey LDFLAGS causing a GNU_HASH QA failure,
> > > > which is what's often seen with external toolchains. This brings us all on the
> > > > same page, and makes sure a failure to obey LDFLAGS is seen early.
> > > >
> > > 
> > > 
> > > Default or gnu linkers is to use sysv for legacy reasons and by passing this option
> > > to configuring the toolchain we want to make sure that components are using sane defaults
> > > even if they have not configured these options.
> > > 
> > > But that's not what we want. We want to know when we're not passing arguments we need to be passing. For example, the sysroot is poisoned today, so we *know* when the user is trying to run it without --sysroot=.
> > 
> > application makefiles can ignore environment e.g. CC, CXX, LD etc and get into same situations.
> > as an application writer I may not be interested in using cross compilation specific nuances.  We may not
> ]> be able to solve it completely
> > 
> > > 
> > > if you do not pass the right linker flags from compiler driver and also ignore
> > > the LDFLAGS then you now have a safe pass for the app to build without GNU hash
> > > while I understand it will spread the external toolchain’s pains into internal toolchain
> > > I fail to understand the benefit of doing this otherwise.
> > > 
> > > Silently ignoring the fact that recipes ignore LDFLAGS is not good default behavior, and this is precisely what oe-core is doing today. If you know of a better way to detect that in another QA check, I'm certainly open to hearing it.
> > 
> > linker would emit .hash for sysv and .gnu.hash section for gnu hash in final ELF, may be adding a QA check for that would be enough ?
> 
> But that doesn't detect if it was set to gnu thanks to respecting
> LDFLAGS or thanks to gnu being the default in oe-core built toolchain
> (from --with-linker-hash-style) - which means that builds with
> external toolchain are still affected if they don't use
> --with-linker-hash-style=gnu.
> 
> After fixing couple recipes used by our internal builds (which are
> using external toolchain) and wondering why nobody else reported
> those I agree with Chris, that to detect this early (with current
> QA check which already reports when the used hash style doesn't match
> with LDFLAGS).

I'd like to back Chris and Martin here - using external toolchain as well and 
seeing few GNU_HASH warnings. Some warning are ours (too busy/lazy to fix now) 
but some are upstream recipes, maybe it's time to clean them up collectively?

-- 
Denys


> It would be nice to really poison the value if possible
> --with-linker-hash-style=YOU_NEED_TO_RESPECT_LDFLAGS
> to cause linker call to fail when someone is using oe-core toolchain
> outside OE itself (so might ignore LDFLAGS, but without running the
> QA check).
> 
> Regards,
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



  parent reply	other threads:[~2016-05-03 18:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-02 20:09 [master][PATCH] gcc-cross{, -canadian}: remove --with-linker-hash-style Christopher Larson
2016-05-02 20:34 ` Khem Raj
2016-05-02 20:37   ` Christopher Larson
2016-05-02 21:37     ` Khem Raj
2016-05-03  2:53       ` Christopher Larson
2016-05-03  3:01         ` Khem Raj
2016-05-03  3:05           ` Christopher Larson
2016-05-03  8:09       ` Martin Jansa
2016-05-03  9:11         ` Anders Darander
2016-05-03 16:07           ` Christopher Larson
2016-05-03 18:13         ` Denys Dmytriyenko [this message]
2016-05-04 14:01 ` Burton, Ross
2016-05-04 19:11   ` Christopher Larson
2016-05-09 16:35     ` Bystricky, Juro
2016-05-09 16:39       ` Christopher Larson
2016-05-09 22:16         ` Richard Purdie
2016-05-09 22:34           ` Christopher Larson
2016-05-09 22:41             ` Christopher Larson
2016-05-09 22:54               ` Richard Purdie

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=20160503181309.GD27602@denix.org \
    --to=denis@denix.org \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.