Skip to content

ld: Add --dump-normalized-lib-args flag#34

Merged
Ericson2314 merged 1 commit intotpoechtrager:masterfrom
obsidiansystems:libs-normalize
Sep 30, 2017
Merged

ld: Add --dump-normalized-lib-args flag#34
Ericson2314 merged 1 commit intotpoechtrager:masterfrom
obsidiansystems:libs-normalize

Conversation

@Ericson2314
Copy link
Collaborator

@Ericson2314 Ericson2314 commented Sep 6, 2017

This allows scripts to see how cctools resolves inputs. Args are printed \0-separated for easy machine consumption.

Fixes #32; See that issue for a more in-depth explanation of the purpose of this change.

CC @shlevy

@Ericson2314 Ericson2314 changed the title Add --dump-normalized-lib-args flag ld: Add --dump-normalized-lib-args flag Sep 6, 2017
@Ericson2314 Ericson2314 changed the title ld: Add --dump-normalized-lib-args flag WIP: ld: Add --dump-normalized-lib-args flag Sep 6, 2017
@shlevy
Copy link

shlevy commented Sep 6, 2017

@Ericson2314 Does this roundtrip?

@Ericson2314
Copy link
Collaborator Author

Ericson2314 commented Sep 6, 2017

@shlevy that's the intent, but need to finish script to make sure it actually does. There's no good way to reproduce every flag without vastly more work, so it will be up to the script to filter out -l flags and friends. Then the round-trip should be syntactically idempotent, and semantically an isomorphism.

This allows scripts to see how cctools resolves inputs. The flags are
\0-separated.

Fixes tpoechtrager#32; See that issue for a more in-depth explanation of the
purpose of this change.
@Ericson2314 Ericson2314 changed the title WIP: ld: Add --dump-normalized-lib-args flag ld: Add --dump-normalized-lib-args flag Sep 8, 2017
Ericson2314 added a commit to obsidiansystems/nixpkgs that referenced this pull request Sep 13, 2017
Patch is drawn from [1], a back-port of [2].

Eventually, we might consider doing something for GNU binutils too, in
order that we switch (the normal) ld-wrapper to always use this to
leverage ld to resolve libraries, rather than faking it in bash.

[1]: https://github.com/obsidiansystems/cctools-port/tree/libs-normalize-17.03
[2]: tpoechtrager/cctools-port#34
@Ericson2314 Ericson2314 merged commit 8395d4b into tpoechtrager:master Sep 30, 2017
@Ericson2314 Ericson2314 deleted the libs-normalize branch September 30, 2017 17:40
Ericson2314 added a commit to obsidiansystems/nixpkgs that referenced this pull request Nov 17, 2017
Patch is drawn from [1], made a PR at [2].

Eventually, we might consider doing something for GNU binutils too, in
order that we switch (the normal) ld-wrapper to always use this to
leverage ld to resolve libraries, rather than faking it in bash.

[1]: https://github.com/obsidiansystems/cctools-port/tree/libs-normalize
[2]: tpoechtrager/cctools-port#34
Ericson2314 added a commit to obsidiansystems/nixpkgs that referenced this pull request Apr 12, 2018
Source master rebase of my [PR NixOS#34].

Eventually, we might consider doing something for GNU binutils too, in
order that we switch (the normal) ld-wrapper to always use this to
leverage ld to resolve libraries, rather than faking it in bash.

[PR NixOS#34]: tpoechtrager/cctools-port#34
adrianpk added a commit to adrianpk/nixpkgs that referenced this pull request May 31, 2024
Patch is drawn from [1], a back-port of [2].

Eventually, we might consider doing something for GNU binutils too, in
order that we switch (the normal) ld-wrapper to always use this to
leverage ld to resolve libraries, rather than faking it in bash.

[1]: https://github.com/obsidiansystems/cctools-port/tree/libs-normalize-17.03
[2]: tpoechtrager/cctools-port#34
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.

Are feature PRs accepted? I'd like to normalize and print CLI args

2 participants