CI updates

This commit is contained in:
Markus F.X.J. Oberhumer
2025-10-11 02:59:23 +02:00
parent 303ac34539
commit c4ed5cc159
10 changed files with 52 additions and 46 deletions
+3 -2
View File
@@ -248,8 +248,9 @@ static void __UCL_CDECL my_free(ucl_voidp p) { free(p); }
} // extern "C"
int upx_ucl_init(void) {
#if (ACC_CC_MSC && ACC_ARCH_I386) && (_MSC_VER >= 1940)
(void) ucl_init(); // TODO later
#if 1 && (ACC_CC_MSC && ACC_ARCH_I386) && (_MSC_VER >= 1940)
// @COMPILER_BUG @MSVC_BUG
(void) ucl_init();
#else
if (ucl_init() != UCL_E_OK)
return -1;
+7 -5
View File
@@ -207,6 +207,8 @@ tc_objdump_disasm_options =
ECHO_e = /bin/echo -e
ECHO_E = /bin/echo -E
PERL = perl
PYTHON2 = python2
PYTHON3 = python3
UNIX2DOS := $(PERL) -i -pe 's/$$/\r/;'
# trim (strip) trailing whitespace
@@ -239,15 +241,15 @@ define tc
endef
# default tools
tc.default.bin2h = python $(top_srcdir)/src/stub/scripts/bin2h.py --ident=auto-stub
tc.default.bin2h = $(PYTHON3) $(top_srcdir)/src/stub/scripts/bin2h.py --ident=auto-stub
##tc.default.bin2h-c = $(call tc,bin2h) --compress=14,15,0
tc.default.bin2h-c = $(call tc,bin2h) --compress=0
tc.default.brandelf = python $(top_srcdir)/src/stub/scripts/brandelf.py $(if $(tc_bfdname),--bfdname=$(tc_bfdname))
tc.default.gpp_inc = python $(top_srcdir)/src/stub/scripts/gpp_inc.py
tc.default.gpp_mkdep = python $(top_srcdir)/src/stub/scripts/gpp_inc.py -o /dev/null
tc.default.brandelf = $(PYTHON3) $(top_srcdir)/src/stub/scripts/brandelf.py $(if $(tc_bfdname),--bfdname=$(tc_bfdname))
tc.default.gpp_inc = $(PYTHON3) $(top_srcdir)/src/stub/scripts/gpp_inc.py
tc.default.gpp_mkdep = $(PYTHON3) $(top_srcdir)/src/stub/scripts/gpp_inc.py -o /dev/null
tc.default.pp-as = i386-linux-gcc-3.4.6 -E -nostdinc -x assembler-with-cpp -Wall
tc.default.sstrip = sstrip-20060518
tc.default.xstrip = python $(top_srcdir)/src/stub/scripts/xstrip.py
tc.default.xstrip = $(PYTHON3) $(top_srcdir)/src/stub/scripts/xstrip.py
# default multiarch-binutils
tc.default.m-ar = multiarch-ar-2.17
+1 -1
View File
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
#
# bin2h.py --
+1 -1
View File
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
#
# brandelf.py --
+1 -1
View File
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
#
# gpp_inc.py -- Generic PreProcessor: include
+1 -1
View File
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
#
# xstrip.py -- truncate ELF objects created by multiarch-objcopy-2.17
+2 -2
View File
@@ -198,7 +198,7 @@ ifneq ($(wildcard $(WATCOM)/binl/wcl),)
# step 3: clean asm
lzma_d_c%.S : tmp/lzma_d_c%.i cleanasm.py $(MAKEFILE_LIST)
$(PYTHON) cleanasm.py --label-prefix=$(LABEL_PREFIX) $< $@
$(PYTHON2) cleanasm.py --label-prefix=$(LABEL_PREFIX) $< $@
# step 2: compile, strip and disasm
tmp/lzma_d_c%.i : tmp/lzma_d_c%.S $(MAKEFILE_LIST)
@@ -233,7 +233,7 @@ ifneq ($(wildcard $(WATCOM)/binl/wcl),)
$(call tc,wdis) tmp/$T_wc.obj | $(RTRIM) > tmp/$T_wc.obj.disasm
endif
# convert
$(PYTHON) wdis2gas.py tmp/$T_wc.obj.disasm $@
$(PYTHON2) wdis2gas.py tmp/$T_wc.obj.disasm $@
.PRECIOUS: tmp/lzma_d_c%.i tmp/lzma_d_c%.S
+8 -8
View File
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python2
## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
#
# cleanasm.py --
@@ -99,11 +99,11 @@ def main(argv):
k, v = m.group(1).strip(), [0, 0, None, 0]
assert k and v, (inst, args)
v[2] = k # new name
if k in labels:
if labels.has_key(k):
assert labels[k][:2] == v[:2]
return k, v
def add_label(k, v):
if k in labels:
if labels.has_key(k):
assert labels[k][:2] == v[:2]
else:
labels[k] = v
@@ -135,7 +135,7 @@ def main(argv):
pos += sgn(mlen)
if mlen < 0:
mpos.reverse()
if debug and 1: print (mlen, m, [olines[x] for x in mpos])
if debug and 1: print mlen, m, [olines[x] for x in mpos]
dpos = []
i = -abs(mlen)
while i < 0:
@@ -404,7 +404,7 @@ def main(argv):
assert len(r) == len(dpos)
pos = pos0
for inst, args in r:
##print (pos-pos0, inst, args)
##print pos-pos0, inst, args
olines[pos][1] = inst
olines[pos][2] = args
pos += 1
@@ -438,7 +438,7 @@ def main(argv):
if v[:2] == [1, 2]: # external 2-byte
x = inline_map.get(v[2])
if x and v[3] <= x[1]: # max. number of calls
##print ("inline", v, x)
##print "inline", v, x
if x:
olines[i][1] = x[0]
olines[i][2] = "/* inlined */"
@@ -449,7 +449,7 @@ def main(argv):
ofp = open(ofile, "wb")
current_label = None
for label, inst, args, args_label in olines:
if label in labels:
if labels.has_key(label):
current_label = labels[label][2]
if opts.verbose:
ofp.write("%s: /* %d */\n" % (labels[label][2], labels[label][3]))
@@ -478,7 +478,7 @@ def main(argv):
l = "%8s%-7s %s" % ("", inst, args)
ofp.write(l.rstrip() + "\n")
ofp.close()
##print (olines)
##print olines
if __name__ == "__main__":
+2 -2
View File
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python2
## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*-
#
# wdis2gas.py --
@@ -138,7 +138,7 @@ def main(argv):
for l in olines:
ofp.write(l.rstrip() + "\n")
ofp.close()
##print (olines)
##print olines
if __name__ == "__main__":