This commit is contained in:
rusefillc 2024-08-03 11:23:49 -04:00
parent 5a45a873d8
commit acf97cc55c
5 changed files with 18 additions and 7 deletions

View File

@ -129,6 +129,12 @@ ifeq ($(USE_LTO),)
USE_OPT += -flto=auto
endif
ifeq ($(OS),Windows_NT)
USE_OPT += -DIS_WINDOWS_COMPILER=1
else
USE_OPT += -DIS_WINDOWS_COMPILER=0
endif
# If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),)
USE_THUMB = yes

View File

@ -21,8 +21,9 @@
#define MOCK_UNDEFINED -1
// why is Windows compiler not happy around simulator?! feature or defect?!
#if !defined(EFI_SIM_IS_WINDOWS) || !EFI_SIM_IS_WINDOWS
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90826 Weak symbol does not work reliably on windows
// https://sourceware.org/bugzilla/show_bug.cgi?id=9687 Weak symbols not working on mingw32
#if !defined(IS_WINDOWS_COMPILER) || !IS_WINDOWS_COMPILER
#define PUBLIC_API_WEAK_SOMETHING_WEIRD __attribute__((weak))
#else
#define PUBLIC_API_WEAK_SOMETHING_WEIRD

View File

@ -54,9 +54,9 @@ ifeq ($(USE_OPT),)
USE_OPT += -D US_TO_NT_MULTIPLIER=$(US_TO_NT_MULTIPLIER)
ifeq ($(OS),Windows_NT)
USE_OPT += -DEFI_SIM_IS_WINDOWS=1
USE_OPT += -DEFI_SIM_IS_WINDOWS=1 -DIS_WINDOWS_COMPILER=1
else
USE_OPT += -m32 -DEFI_SIM_IS_WINDOWS=0
USE_OPT += -m32 -DEFI_SIM_IS_WINDOWS=0 -DIS_WINDOWS_COMPILER=0
endif
endif

View File

@ -15,9 +15,6 @@ efitimems_t getTimeNowMs() {
void initLogging(LoggingWithStorage *logging, const char *name) {
}
void setBoardConfigOverrides() {
}
void onCliCaseError(const char *token) {
}

View File

@ -147,6 +147,13 @@ CPPWARN = -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-v
USE_OPT += -Werror=switch
ifeq ($(OS),Windows_NT)
USE_OPT += -DIS_WINDOWS_COMPILER=1
else
USE_OPT += -DIS_WINDOWS_COMPILER=0
endif
#
# Compiler settings
##############################################################################