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

AS variable is wrongly set #23102

Open
stsp opened this issue Feb 4, 2025 · 6 comments · May be fixed by #23190
Open

AS variable is wrongly set #23102

stsp opened this issue Feb 4, 2025 · 6 comments · May be fixed by #23190
Assignees

Comments

@stsp
Copy link
Contributor

stsp commented Feb 4, 2025

It seems termux sets AS
variable to aarch64-linux-android-clang
in termux_setup_toolchain_27c.sh script.
But it should set it to:
aarch64-linux-android-clang -c
as otherwise also linker is invoked, leading
to a build failure (in my case).

@Biswa96
Copy link
Member

Biswa96 commented Feb 4, 2025

Could you share how to reproduce the build failure?

@stsp
Copy link
Contributor Author

stsp commented Feb 4, 2025

If only on my own CI:
https://github.com/dosemu2/dosemu2/actions/runs/13136822663/job/36662916337

aarch64-linux-android-clang   -o tmp.o tmp.s
ld.lld: error: undefined symbol: main

is what you see near the end of the log.
Had to override AS variable, but this
is a very bad thing to do as now it may
fail on some other environment...

The run with work-around applied:
https://github.com/dosemu2/dosemu2/actions/runs/13136822663/job/36665587806

Here you can see:

aarch64-linux-android-clang -x assembler -c   -o tmp.o tmp.s

somewhere in the middle of a huge log.

@licy183
Copy link
Member

licy183 commented Feb 9, 2025

I don't know whether setting AS to clang -c will break the build in other cases...

@stsp
Copy link
Contributor Author

stsp commented Feb 9, 2025

I think someone should just
try a full rebuild with that. If
no regressions - commit and
forget. :)

@truboxl truboxl self-assigned this Feb 15, 2025
@truboxl
Copy link
Contributor

truboxl commented Feb 17, 2025

I ran full rebuild of the packages and found no difference in setting AS variable to *-clang -c.
So I believe its safe to make this change.

truboxl#437

@truboxl truboxl linked a pull request Feb 17, 2025 that will close this issue
@stsp
Copy link
Contributor Author

stsp commented Feb 17, 2025

Thank you.
I didn't know it requires
such a huge patch-set.
But I'll be happy to revert
my work-around and test
your work immediately
once applied.

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

Successfully merging a pull request may close this issue.

4 participants