Skip to content

[fix] Added UNAME_TARGET_SYSTEM to make shared lib compile flag selection configurable#4220

Merged
terrelln merged 2 commits into
facebook:devfrom
RicBent:origin/dev
Dec 20, 2024
Merged

[fix] Added UNAME_TARGET_SYSTEM to make shared lib compile flag selection configurable#4220
terrelln merged 2 commits into
facebook:devfrom
RicBent:origin/dev

Conversation

@RicBent

@RicBent RicBent commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

Fixes #4219 by adding UNAME_TARGET_SYSTEM which, when not set, defaults to UNAME.

@Cyan4973 Cyan4973 self-assigned this Dec 19, 2024
@Cyan4973

Cyan4973 commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

This is a good stop-gap, it allows a user to manually take control of the situation, without impacting the current default behavior.

I presume that a more robust solution would likely employ the output of the compiler to determine what's the target, but that's more work and more risk, which can be attempted later.

As a side note, UNAME is a variable, so it can already be taken over by the user,
but I guess it's also used in several other places, and you only want to impact this one place.

@RicBent

RicBent commented Dec 19, 2024

Copy link
Copy Markdown
Contributor Author

Exactly, the UNAME variable is also used to select different tools depending on what OS you are running on, like here:

ifeq ($(UNAME), Darwin)

@terrelln
terrelln merged commit 5a7f5c7 into facebook:dev Dec 20, 2024
@terrelln

Copy link
Copy Markdown
Contributor

Thanks for the PR @RicBent!

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.

Shared library flags depend on uname, undesired for cross compilation

4 participants