Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: make added libs optional #42411

Closed

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Jun 23, 2018

Some linker configurtions have issues when you give it a library that
it’s not expecting. This seems to happen most often in cross
compilation for some reason. We now add a global option to disable
this behavior:

$dontAddLibs

When set to non-empty, this will prevent Nix setup hooks from adding
"compatibility" libraries. Because certain libc’s will not need these
compatiblity libraries, we have two other variables that control
adding libintl & libiconv.

$dontAddLibiconv
$dontAddLibintl

These will be set when compiling with Glibc & Musl which already have
their own version bundled. You can also set them manually in your
derivation to disable the behavior.

Motivation for this change

This was created in response to issues I had with libiconv & the Android NDK in #42333.

Some linker configurtions have issues when you give it a library that
it’s not expecting. This seems to happen most often in cross
compilation for some reason. We now add a global option to disable
this behavior:

  $dontAddLibs

When set to non-empty, this will prevent Nix setup hooks from adding
"compatibility" libraries. Because certain libc’s will not need these
compatiblity libraries, we have two other variables that control
adding libintl & libiconv.

  $dontAddLibiconv
  $dontAddLibintl

These will be set when compiling with Glibc & Musl which already have
their own version bundled. You can also set them manually in your
derivation to disable the behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants