Skip to content

Comments

mk: add support for passing LDFLAGS to libs and bins#1201

Closed
trofi wants to merge 1 commit intoNixOS:masterfrom
trofi:master
Closed

mk: add support for passing LDFLAGS to libs and bins#1201
trofi wants to merge 1 commit intoNixOS:masterfrom
trofi:master

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Jan 24, 2017

autotools-based systems usually allow user to
append own LDFLAGS like
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
at ./configure stage

This change plumbs LDFLAGS through similar to existing CXXFLAGS variable.

Signed-off-by: Sergei Trofimovich [email protected]

autotools-based systems usually allow user to
append own LDFLAGS like
    LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
at ./configure stage

This change plumbs LDFLAGS through similar to existing CXXFLAGS variable.

Signed-off-by: Sergei Trofimovich <[email protected]>
@domenkozar
Copy link
Member

What about mk/patterns.mk?

@trofi
Copy link
Contributor Author

trofi commented Jan 25, 2017

File mk/patterns.mk seems to only define rules for intermediate object files.
No final linkable binary targets are defined there.

I basically looked at all uses of GLOBAL_LDFLAGS to get an idea where linking rules lurk.

@domenkozar
Copy link
Member

Cc @edolstra

Copy link
Member

@puffnfresh puffnfresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I need this to compile Nix under Termux.

@trofi
Copy link
Contributor Author

trofi commented Jun 23, 2018

ping :)

@nh2
Copy link
Contributor

nh2 commented Jul 3, 2019

Very useful; hopefully subsumed by #2979

@trofi
Copy link
Contributor Author

trofi commented Jul 3, 2019

Yeah, looks like the change was applied as-is as fe068ec. Thank you!

@trofi trofi closed this Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants