diff options
author | lns <matzeton@googlemail.com> | 2022-06-01 12:39:08 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2022-06-01 12:39:08 +0200 |
commit | 4f213a3910f0aa7012ed6047c9eff6ea4487a6b6 (patch) | |
tree | fcfe6270782a1bf3428fa96ea147a0a0d06ca71d | |
parent | 722a720fdbc85e8d9107edd16e9d3be13b4a0de6 (diff) |
bump gcc to 9.5.0 (fixes build errors for gcc-12)
* add -Wno-address-of-packed-member
* reverted recent HTTP callback changes (not done yet)
Signed-off-by: lns <matzeton@googlemail.com>
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/CMakeMillerBuild.cmake | 1 | ||||
-rwxr-xr-x | deps/makedeps.sh | 2 | ||||
-rw-r--r-- | deps/sha512.chksms | 2 | ||||
-rw-r--r-- | source/http.c | 39 |
5 files changed, 18 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 81346da..3822ca2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,7 @@ set(MILLER_DEFS "_API_VERSION=${MILLER_API_VERSION}" "${pipes_defs}" CACHE INTER set(LOADERBASE_DEFS _MILLER_IMAGEBASE=${MILLER_IMAGEBASE} _MILLER_SECTION=${MILLER_SECTION} _LDR_SECTION=${LOADER_SECTION} _LOADER_ENDMARKER=${LOADER_ENDMARKER} "" CACHE INTERNAL "" FORCE) set(CMAKE_C_FLAGS "-Wall -Wextra -Werror -std=gnu99" CACHE INTERNAL "" FORCE) -set(default_cflags "-Wno-cast-function-type -Wno-implicit-fallthrough -Wno-switch -ffast-math -fno-trapping-math -fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fvisibility=hidden -fomit-frame-pointer -fexpensive-optimizations -Os -static -fdata-sections -ffunction-sections -falign-functions=1 -falign-jumps=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops -fmerge-all-constants -fno-ident -fno-zero-initialized-in-bss" CACHE INTERNAL "" FORCE) +set(default_cflags "-Wno-cast-function-type -Wno-implicit-fallthrough -Wno-switch -Wno-address-of-packed-member -ffast-math -fno-trapping-math -fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fvisibility=hidden -fomit-frame-pointer -fexpensive-optimizations -Os -static -fdata-sections -ffunction-sections -falign-functions=1 -falign-jumps=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops -fmerge-all-constants -fno-ident -fno-zero-initialized-in-bss" CACHE INTERNAL "" FORCE) set(default_ldflags "-s -nostdlib -nodefaultlibs -nostartfiles -Wl,--exclude-all-symbols -Wl,--exclude-libs,msvcrt.a -Wl,-e,_start -Wl,--gc-sections -Wl,--strip-all -Qn -Wl,--subsystem,windows -fPIE -Wl,--dynamicbase -Wl,--nxcompat -Wl,-rpath-link,${CMAKE_SOURCE_DIR}/batch/miller_linker_script.ld ${CMAKE_SOURCE_DIR}/batch/miller_linker_script.ld" CACHE INTERNAL "" FORCE) set(miller_cflags "-fno-builtin -ffreestanding -D_INC_STRING=1 -D_CRT_ALLOCATION_DEFINED=1 -D_MALLOC_H_=1 -D_PROCESSENV_=1 -D_WINCON_=1 -D_STDIO_DEFINED=1" CACHE INTERNAL "" FORCE) diff --git a/cmake/CMakeMillerBuild.cmake b/cmake/CMakeMillerBuild.cmake index 0fc900c..6e5a3d9 100644 --- a/cmake/CMakeMillerBuild.cmake +++ b/cmake/CMakeMillerBuild.cmake @@ -42,6 +42,7 @@ set(DISTORM_PRE_SRC ${DISTORM_SRC} wstring.c textdefs.c CACHE INTERNAL "" FORCE) PrefixPath(DISTORM_SRC ${DISTORM_SRCDIR} ${DISTORM_SRC}) PrefixPath(DISTORM_PRE_SRC ${DISTORM_SRCDIR} ${DISTORM_PRE_SRC}) +include_directories(AFTER ${MILLER_SRCDIR}) include_directories(AFTER ${MILLER_HDRDIR}) include_directories(AFTER ${DISTORM_SRCDIR}) diff --git a/deps/makedeps.sh b/deps/makedeps.sh index bccdb8f..6812471 100755 --- a/deps/makedeps.sh +++ b/deps/makedeps.sh @@ -63,7 +63,7 @@ export MILLER_PYTHON=Python-2.7.18 export MINGW=mingw-w64-v6.0.0 export ISL=isl-0.20 export BIN=binutils-2.33.1 -export GCC=gcc-8.4.0 +export GCC=gcc-9.5.0 export GMP=gmp-6.1.2 export MPF=mpfr-4.0.1 export MPC=mpc-1.1.0 diff --git a/deps/sha512.chksms b/deps/sha512.chksms index d70b063..74059a7 100644 --- a/deps/sha512.chksms +++ b/deps/sha512.chksms @@ -4,7 +4,7 @@ c1674fc0a5edcde188bdf7d6d14063cfb4f1259b9eaf39d0081f7176e9921ca0af1b12b7aba1a956 268db88447174617f5746d9a6ba2b105940cc1a5e73155eb23b6eedf55f8e7724eda05d161b2de19aca9e794956d226ba9ed6f23124c7c82f7e1872e32b003cf gmp-6.1.2.tar.bz2 e3d3663e0cb33a16f90b1a33e81b5a30d26f7e34270b14e865c10068f2a2d32da9ef8cbbb0c3fed9c71429ae11c82152ff3b87d81558929b2a4993dc99cfc11e mingw-w64-v6.0.0.tar.bz2 67f97a480f1e25313bbe826d4bcfaf0cd66a39e3bc724ba137bf81c146c119827b5d07b98789f5cba0bbe296a7c065b68f377e82f5eb2063350594c34079cbc8 binutils-2.33.1.tar.gz -a0340bb83fb0ac0d3f7e0bcd06f6d5aa21e464ef319ab057cfacff036aa1f0d53e73a8b0ec2a00fd5eb1ea897401ffb510f7ac315bb5f5c88a6ae60497d921c0 gcc-8.4.0.tar.gz +a6b52e7166c7cf2cdce383f7e8d67fd399b8736ce41ac7431b7fbcce8779601f847e9c36878c1724c036ac9b04460d74aacdc48d4ec8565cc2890346806a842d gcc-9.5.0.tar.gz 03f1c97380cec892f2c465f7e3e3c99a55b5a7b7b966f71fba9398940ed332b7d960770ce75fafe549feaa70636edbf94b48b848137c9df3b0c8adb1dcbb1394 nasm-2.12.02.tar.gz 4861ec6428fead416f5cbbbb0bbad10b9152967e481d4b0ff2eb396a9f297f552984c9bb72f6864a37dcd8fca1d9ccceda3ef18d8f121938dbe4fdf2b870fe75 pkg-config-0.29.2.tar.gz b00bd9b5ad5298fbceeec6bb19c1ab0c106ca5cfb31178497c58bf7e0e0cf30fcc19c20f84e23af31cc126bf2447d3e4f8461db97bafa7bd78f69561932f000c openssl-1.1.1f.tar.gz diff --git a/source/http.c b/source/http.c index 37f92de..1c22d00 100644 --- a/source/http.c +++ b/source/http.c @@ -71,9 +71,9 @@ HTTP_CALLBACK(rc_register_cb); HTTP_CALLBACK(rc_ping_cb); HTTP_CALLBACK(rc_shell_cb); -#define HTTP_CALLBACK_ENTRY(rc, cb, state) { .type = rc, .callback = cb, .state = state } +#define HTTP_CALLBACK_ENTRY(rc, cb, st) { .type = rc, .callback = cb, .state = st } #define DEFAULT_HTTP_CALLBACK_ENTRY(rc, cb) HTTP_CALLBACK_ENTRY(rc, cb, 0) -static const struct HttpCallback callbacks[] = { +const struct HttpCallback callbacks[] = { DEFAULT_HTTP_CALLBACK_ENTRY(RC_INFO, rc_info_cb), HTTP_CALLBACK_ENTRY(RC_REGISTER, rc_register_cb, ST_UNAUTH), DEFAULT_HTTP_CALLBACK_ENTRY(RC_PING, rc_ping_cb), @@ -83,44 +83,33 @@ static const struct HttpCallback callbacks[] = { HTTP_CALLBACK(rc_info_cb) { + (void)api; + (void)args; + return 0; } HTTP_CALLBACK(rc_register_cb) { - if (hApi->state & ST_UNAUTH || hResp->respCode == RC_REGISTER) { - /* request aeskey, etc, ... */ - if (hResp->respCode != RC_REGISTER || hResp->pkgsiz != sizeof(struct resp_register)) { -#ifdef _PRE_RELEASE - COMPAT(printf)("I wanted an RC_REGISTER pkg but did not get a valid one! (Code: %u (0x%X), Size: %u (0x%X))\n", - hResp->respCode, hResp->respCode, hResp->pkgsiz, hResp->pkgsiz); -#endif - continue; - } - struct resp_register* rsp = (struct resp_register*)&hResp->pkgbuf[0]; - COMPAT(memcpy)(&hApi->aeskey[0], &rsp->aeskey[0], AESKEY_SIZ); -#ifdef _PRE_RELEASE - if (!(hApi->state & ST_UNAUTH)) { - COMPAT(printf)("%s\n", "Re-Register forced"); - } -#endif - hApi->state &= ~ST_UNAUTH; -#ifdef _PRE_RELEASE - COMPAT(printf)("AES key: "); - __printByteBuf((const rrbuff)&hApi->aeskey[0], AESKEY_SIZ); - COMPAT(printf)("Next Ping: %u (0x%X)\n", rsp->next_ping, rsp->next_ping); -#endif - } + (void)api; + (void)args; + return 0; } HTTP_CALLBACK(rc_ping_cb) { + (void)api; + (void)args; + return 0; } HTTP_CALLBACK(rc_shell_cb) { + (void)api; + (void)args; + return 0; } |