Skip to content

Commit

Permalink
avoid upx compression as it may introduce malware
Browse files Browse the repository at this point in the history
it seems that at least the upx shipped in choco and apt has some strange and
dubious build that may tain the binaries
  • Loading branch information
jaromil committed Oct 1, 2024
1 parent b31d6de commit 281122b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ jobs:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
choco install --no-progress -r -y upx
# - name: install dependencies
# run: |
# choco install --no-progress -r -y upx
- name: Build native windows exe for x86_64
run: |
cd .\lib\tinycc
Expand Down Expand Up @@ -131,11 +131,10 @@ jobs:
build/release-intro.md
- name: Install build deps
run: |
sudo apt install -qy make musl-tools musl-dev upx-ucl gcc-mingw-w64
sudo apt install -qy make musl-tools musl-dev gcc-mingw-w64
- name: Build x86_64 with musl-system
run: |
make musl-linux
upx-ucl -q cjit
- name: Upload artifact linux-amd64
uses: actions/upload-artifact@v4
with:
Expand All @@ -151,9 +150,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install dependencies
run: |
choco install --no-progress -r -y upx
# - name: install dependencies
# run: |
# choco install --no-progress -r -y upx
- name: Build native windows exe for x86_64
run: |
cd .\lib\tinycc
Expand Down
1 change: 0 additions & 1 deletion build/win-native.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ ldadd := lib/tinycc/libtcc.a -lshlwapi

cjit.exe: ${SOURCES}
$(cc) $(cflags) -o $@ $(SOURCES) ${ldflags} ${ldadd}
upx -q $@

.c.o:
$(cc) \
Expand Down
3 changes: 2 additions & 1 deletion build/win-wsl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ all: deps cjit.exe

cjit.exe: ${SOURCES}
$(cc) $(cflags) -o $@ $(SOURCES) ${ldflags} ${ldadd}
upx-ucl -q $@

# upx-ucl -q $@
# somehow upx compression helps the binary to function: it
# accidentally fixes some headers that are malformed out of mingw

Expand Down

0 comments on commit 281122b

Please sign in to comment.