-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
tcc: update to 0.9.28 & simpler build.sh #19167
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
base: master
Are you sure you want to change the base?
Conversation
|
I downloaded termux an hour ago and immediately ran into this issue with tcc. Thanks for fixing it! |
TomJo2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, I don't see any functional issues,
I have a couple minor style suggestions though to put the build.sh more in line with common conventions.
| TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE} | ||
| TERMUX_PKG_SRCURL=git+https://repo.or.cz/tinycc.git | ||
| TERMUX_PKG_SHA256=467792219d0172f594ec71bcd6bac9dbb25308cbe9f708bab455b717148b491b | ||
| TERMUX_PKG_SHA256=$_COMMIT_SHA256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| TERMUX_PKG_SHA256=$_COMMIT_SHA256 | |
| TERMUX_PKG_SHA256=26974776737d9da876395cc72a005a63526e305aeaa28ebf84c56778a8d9fdac |
Since $_COMMIT_SHA256 is only ever used as the value of $TERMUX_PKG_SHA256,
why have it as a separate variable in the first place?
packages/tcc/build.sh
Outdated
| _COMMIT=4e91d38ddcdb659a4b2c298850c6ccf115073748 | ||
| _COMMIT_DATE=20240225 | ||
| _COMMIT_SHA256=26974776737d9da876395cc72a005a63526e305aeaa28ebf84c56778a8d9fdac | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| _COMMIT=4e91d38ddcdb659a4b2c298850c6ccf115073748 | |
| _COMMIT_DATE=20240225 | |
| _COMMIT_SHA256=26974776737d9da876395cc72a005a63526e305aeaa28ebf84c56778a8d9fdac |
packages/tcc/build.sh
Outdated
| _COMMIT_DATE=20230415 | ||
| TERMUX_PKG_VERSION=1:0.9.27-p${_COMMIT_DATE} | ||
| TERMUX_PKG_REVISION=1 | ||
| TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE} | |
| _COMMIT=4e91d38ddcdb659a4b2c298850c6ccf115073748 | |
| _COMMIT_DATE=20240225 | |
| TERMUX_PKG_VERSION=1:0.9.28-p${_COMMIT_DATE} |
_COMMIT and _COMMIT_DATE are usually inlined with the TERMUX_PKG_* variables.
For an example see:
termux-packages/packages/tmux/build.sh
Lines 5 to 9 in b6e127f
| _COMMIT=fbe6fe7f55cfc2a32f9cee4cb50502a53d3ce8bb | |
| _COMMIT_DATE=20230428 | |
| TERMUX_PKG_VERSION=3.3a-p${_COMMIT_DATE} | |
| TERMUX_PKG_SRCURL=git+https://github.com/tmux/tmux | |
| TERMUX_PKG_SHA256=b61189533139bb84bdc0e96546a5420c183d7ba946a559e891d313c1c32d953d |
Although I don't believe this is a "rule" in the guidelines.
It's just a convention most other occurences of these variables in build scripts seem to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.9.28 is also a release candidate version not stable version for now. So I suggest you use TERMUX_PKG_VERSION=1:0.9.28~p${_COMMIT_DATE} instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really think we should move back to archive tarball once 0.9.28 is declared stable. https://download.savannah.nongnu.org/releases/tinycc/
There's no real advantage of using git clone unless need to pull some submodules dependencies.
packages/tcc/build.sh
Outdated
| ANDROID_LIB_PATH="/system/lib64:/system/vendor/lib64" | ||
| fi | ||
| # override default step | ||
| echo "running on : $(uname -a)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this meant to be left in here?
Or is this just a leftover debugging aid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both (if you want to).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well in the CI the runs get separated by architecture anyway, so this really is only somewhat useful for local test builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, long story: Because of package.yml: "Setup arm and aarch64 CPU emulators" I got curious whether the "stage 1" tcc would maybe run in qemu. As it turns out it doesn't, it's always a x86_64 executable, regardless of the final package architecture. Indeed we don't really have to know that, as long as there aren't any problems ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The qemu was never used anywhere. It also need a Android linker to work. So you can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolving, since its still there.
|
@be2020 can you please rebase this PR to current master and change files as suggested? |
|
rebased & changes applied ... |
| ANDROID_LIB_PATH="/system/lib64:/system/vendor/lib64" | ||
| fi | ||
| # override default step | ||
| true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually we put : for empty build steps, with no comments.
|
So there are two pending problems (build script related) to be resolved. |
Let termux do the "make install" (as suggested). Also. use most recent upstream commit.
- remove merely informative line from termux_step_configure() - use '~' in TERMUX_PKG_VERSION to indicate release candidate - fetch the latest tinycc commit & remove redundant patch
Also fixes #19055