This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: differences in generated ldscripts for native and cross builds
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Alan Modra <amodra at gmail dot com>, Matthias Klose <doko at debian dot org>, binutils <binutils at sourceware dot org>, <thomas at codesourcery dot com>
- Date: Mon, 12 Oct 2015 17:04:21 +0000
- Subject: Re: differences in generated ldscripts for native and cross builds
- Authentication-results: sourceware.org; auth=none
- References: <5617620A dot 1000207 at debian dot org> <20151009121555 dot GD4434 at bubble dot grove dot modra dot org> <20151011185623 dot GB5535 at vapier dot lan> <CAMe9rOpun+eOzmE=6xMdiGRaZtT-DzAjKy8gEnKwOqw1__Rrug at mail dot gmail dot com>
On Sun, 11 Oct 2015, H.J. Lu wrote:
> >> Try adding --enable-initfini-array to the cross configuration. The
> >> autoconf test for this option uses AC_RUN_IFELSE so only works on
> >> native builds.
> >
> > can't we make this smarter ? this feature has been around for quite
> > a long time now. seems crazy that the default is to disable these
> > when cross-compiling.
>
> Yes, the default should be ON for Linux targets.
Thomas, I think you had plans to work on that at some point....
As I said in <https://gcc.gnu.org/ml/gcc-patches/2013-11/msg00619.html> I
think it should be on by default for ELF targets, not limited to GNU/Linux
or GNU targets.
--
Joseph S. Myers
joseph@codesourcery.com