Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #239643

Re: gcc-10: options order important?

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: gcc-10: options order important?
Date 2021-09-03 20:50 +0200
Message-ID <CTmqd-Gm-3@gated-at.bofh.it> (permalink)
References <CTeCm-42y-11@gated-at.bofh.it> <CThgR-5P8-5@gated-at.bofh.it> <CThgR-5P8-3@gated-at.bofh.it> <CTkHL-7V6-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Sep 03, 2021 at 12:59:27PM -0400, Greg Wooledge wrote:
> On Fri, Sep 03, 2021 at 02:12:46PM +0100, Tixy wrote:
> > > A man page a found online [1] says linking happens as Greg described, 
> > > and this is true looking at a 6 year old copy of that page on
> > > archive.org. So seems strange that for many years my Makefiles have
> > > worked with Libraries specified before inputs that use them.
> > 
> > Correction... 'for many years my Makefiles have worked with Libraries
> > specified _after_ inputs that use them'
> 
> You had it right the first time.  It's strange that it worked (in the
> past) with the library argument in front.  It's supposed to be behind.
> 
> The linker's argument processing must have been changed a few times.
> GNU utilities in general have a tendency to be overly lenient with
> command-line options.  Commands that *should* fail according to POSIX
> sometimes work in the GNU variants.

[...]

It /might/ be related to weak linking and the default for
the --as-needed option in the linker. Caveat: I haven't found
the time to research this more thoroughly.

But OP could try to pass --no-as-needed and see what happens :)

Cheers
 - t

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

gcc-10: options order important? "Piotr A. Dybczyński" <piotr@dybczynski.pl> - 2021-09-03 12:30 +0200
  Re: gcc-10: options order important? Greg Wooledge <greg@wooledge.org> - 2021-09-03 13:40 +0200
  Re: gcc-10: options order important? Tixy <tixy@yxit.co.uk> - 2021-09-03 15:20 +0200
    Re: gcc-10: options order important? Greg Wooledge <greg@wooledge.org> - 2021-09-03 19:00 +0200
      Re: gcc-10: options order important? <tomas@tuxteam.de> - 2021-09-03 20:50 +0200
  Re: gcc-10: options order important? Tixy <tixy@yxit.co.uk> - 2021-09-03 15:20 +0200
  Re: gcc-10: options order important? Sven Joachim <svenjoac@gmx.de> - 2021-09-03 21:00 +0200

csiph-web