Re: [PATCH v3] examples: linker requires that library dependencies follow use

On Wed, 2017-09-20 at 14:13 -0700, Lucas Rangit Magasweran wrote:
On modern distributions, ld runs with the '--as-needed' option
enabled by default, meaning library dependencies must come after
files that require them. Also, this allows indirect linking so the
build commands can be simplified.

The alternative is to add the '-Wl,--no-as-needed' gcc option or use
the top-level Makefile.

Tested on:
 * Ubuntu 16.04.3 with gcc Ubuntu 5.4.1-8ubuntu1
 * Fedora 24 with gcc Red Hat 6.1.1-3

Signed-off-by: Lucas Magasweran <lucas magasweran ieee org>
Changes in v3:
  - Fixed line wrapping. Sorry about that.

Hi Lucas,

merged as


Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]