Skip to content

Ensure spack_store_rpath_dirs_list is empty when add_rpaths is false#46264

Closed
Chrismarsh wants to merge 1 commit intospack:developfrom
Chrismarsh:package-fix/spack-cc-45919
Closed

Ensure spack_store_rpath_dirs_list is empty when add_rpaths is false#46264
Chrismarsh wants to merge 1 commit intospack:developfrom
Chrismarsh:package-fix/spack-cc-45919

Conversation

@Chrismarsh
Copy link
Copy Markdown
Contributor

@Chrismarsh Chrismarsh commented Sep 6, 2024

Fixes #45919

If a compiler is defined to have extra_rpaths these are passed in as -Wl,-rpath. Thus, this arg gets stored into return_spack_store_rpath_dirs_list, via parse_Wl, and ultimately into spack_store_rpath_dirs_list. The rpath then is added unconditionally to args_list in ccld mode even if $add_rpaths=false. Not adding rpaths is required on darwin when using the -r flag. The existing rpath protection on darwin does not consider this edge case, so this PR adds it by ensuring any -Wl,-rpath detected rpaths are cleared out.

@Chrismarsh Chrismarsh force-pushed the package-fix/spack-cc-45919 branch from d825ecb to 6391747 Compare November 26, 2024 16:44
@haampie haampie closed this Jan 22, 2025
@haampie
Copy link
Copy Markdown
Member

haampie commented Jan 22, 2025

See #48671.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Macos %apple-clang cannot handle -rpath when creating static library

2 participants