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

Allow AR to be set in the environment #2654

Closed
orlitzky opened this issue Jun 9, 2020 · 5 comments · Fixed by #2663
Closed

Allow AR to be set in the environment #2654

orlitzky opened this issue Jun 9, 2020 · 5 comments · Fixed by #2663

Comments

@orlitzky
Copy link

orlitzky commented Jun 9, 2020

The AR variable (like CC or LD) may be set by the user in her environment. In https://github.com/xianyi/OpenBLAS/blob/develop/Makefile.system#L266 however, it is set unconditionally, making the value in the Makefile difficult to override. I would suggest using the conditional assignment operator ?= instead of =. That way the Makefile only sets it if it's not already set.

I'm able to work around this another way but it may be nice for everyone else =)

It was reported to us at https://bugs.gentoo.org/725608

@martin-frbg
Copy link
Collaborator

Interesting, guess there have not been that many alternate implementations of ar in the past ~15 years that did not also hijack the name "ar" system-wide. Guess the same applies to AS, LD and RANLIB there (and I believe nothing actually uses NM)

@orlitzky
Copy link
Author

orlitzky commented Jun 9, 2020

Yes, the others should probably be conditionally defined as well. I know AS is a standard name, that RANLIB is used by automake, and that and LD is used by e.g. the linux kernel, so people may try to override those. Even if no one is going to complain about them I don't see the harm in conditionally defining them, just in case.

@orlitzky
Copy link
Author

orlitzky commented Jun 9, 2020

It looks like meson has also added support for LD in the environment: mesonbuild/meson#6207

That grants a bit more validity to the expectation that setting LD in the environment will override the linker used.

@brada4
Copy link
Contributor

brada4 commented Jun 12, 2020

Also AR=${{C|F}C} could work.

@orlitzky
Copy link
Author

Thank you!

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 a pull request may close this issue.

3 participants