CI: add zigcc linux-mips soft-float targets

This commit is contained in:
Markus F.X.J. Oberhumer 2024-06-17 10:28:53 +02:00
parent 78f3b6297c
commit dcd8dfd5fc
2 changed files with 20 additions and 3 deletions

View File

@ -463,7 +463,9 @@ jobs:
# { zig_target: i386-linux-musl, zig_flags: -march=i586, qemu: qemu-i386, zig_pic: -fPIE }
- { zig_target: i386-windows-gnu }
- { zig_target: mips-linux-musl, qemu: qemu-mips }
- { zig_target: mips-linux-muslsf, zig_flags: -msoft-float, qemu: qemu-mips }
- { zig_target: mipsel-linux-musl, qemu: qemu-mipsel }
- { zig_target: mipsel-linux-muslsf, zig_flags: -msoft-float, qemu: qemu-mipsel }
- { zig_target: powerpc-linux-musl, qemu: qemu-ppc }
# powerpc64: obscure problem with C++ exceptions in UPX doctest checks; use -fPIC to work-around
- { zig_target: powerpc64-linux-musl, zig_flags: -fPIC, qemu: qemu-ppc64 }
@ -506,8 +508,9 @@ jobs:
# TODO FIXME: problem with self-packed upx and musl+gcompat: "Not a valid dynamic program"
echo "UPX_CONFIG_DISABLE_RUN_PACKED_TEST=ON" >> $GITHUB_ENV
fi
# update ZIG_TARGET (i386 => x86)
ZIG_TARGET=${ZIG_TARGET/i386-/x86-}
# update ZIG_TARGET
ZIG_TARGET=${ZIG_TARGET/i386-/x86-} # i386 => x86
ZIG_TARGET=${ZIG_TARGET/muslsf/musl} # muslsf => musl
echo "ZIG_TARGET=$ZIG_TARGET" >> $GITHUB_ENV
# install zig; note that ~/.local/bin is included in the default $PATH on Ubuntu
mkdir -p -v ~/.local/bin

View File

@ -521,6 +521,7 @@ void show_sysinfo(const char *options_var) {
con_fprintf(f, fmt, v);
con_fprintf(f, "\n");
};
// language
cf_print("__cplusplus", "%lld", __cplusplus + 0, 3);
#if defined(_MSVC_LANG)
@ -529,6 +530,7 @@ void show_sysinfo(const char *options_var) {
#if defined(upx_is_constant_evaluated)
cf_print("upx_is_constant_evaluated", "%lld", 1, 3);
#endif
// compiler
#if defined(ACC_CC_CLANG)
cf_print("ACC_CC_CLANG", "0x%06llx", ACC_CC_CLANG + 0, 3);
@ -566,6 +568,15 @@ void show_sysinfo(const char *options_var) {
#if defined(_MSC_FULL_VER)
cf_print("_MSC_FULL_VER", "%lld", _MSC_FULL_VER + 0);
#endif
// architecture
#if defined(__mips_hard_float)
cf_print("__mips_hard_float", "%lld", __mips_hard_float + 0);
#endif
#if defined(__mips_soft_float)
cf_print("__mips_soft_float", "%lld", __mips_soft_float + 0);
#endif
// OS and libc
#if defined(WINVER)
cf_print("WINVER", "0x%04llx", WINVER + 0);
@ -593,6 +604,7 @@ void show_sysinfo(const char *options_var) {
#if defined(__GLIBC_MINOR__)
cf_print("__GLIBC_MINOR__", "%lld", __GLIBC_MINOR__ + 0);
#endif
// misc compilation options
#if defined(UPX_CONFIG_DISABLE_WSTRICT)
cf_print("UPX_CONFIG_DISABLE_WSTRICT", "%lld", UPX_CONFIG_DISABLE_WSTRICT + 0, 3);
@ -603,12 +615,13 @@ void show_sysinfo(const char *options_var) {
#if defined(WITH_THREADS)
cf_print("WITH_THREADS", "%lld", WITH_THREADS + 0);
#endif
UNUSED(cf_count);
UNUSED(cf_print);
UNUSED(initial_win32_winnt);
}
// run-time
// run-time settings
#if defined(HAVE_LOCALTIME) && defined(HAVE_GMTIME)
{
auto tm2str = [](char *s, size_t size, const struct tm *tmp) noexcept {
@ -627,6 +640,7 @@ void show_sysinfo(const char *options_var) {
}
#endif
// environment
if (options_var && options_var[0]) {
const char *e = upx_getenv(options_var);
con_fprintf(f, "\n");