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 USE_OPT += -flto=auto
endif 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. # If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),) ifeq ($(USE_THUMB),)
USE_THUMB = yes USE_THUMB = yes

View File

@ -21,8 +21,9 @@
#define MOCK_UNDEFINED -1 #define MOCK_UNDEFINED -1
// why is Windows compiler not happy around simulator?! feature or defect?! // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90826 Weak symbol does not work reliably on windows
#if !defined(EFI_SIM_IS_WINDOWS) || !EFI_SIM_IS_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)) #define PUBLIC_API_WEAK_SOMETHING_WEIRD __attribute__((weak))
#else #else
#define PUBLIC_API_WEAK_SOMETHING_WEIRD #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) USE_OPT += -D US_TO_NT_MULTIPLIER=$(US_TO_NT_MULTIPLIER)
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
USE_OPT += -DEFI_SIM_IS_WINDOWS=1 USE_OPT += -DEFI_SIM_IS_WINDOWS=1 -DIS_WINDOWS_COMPILER=1
else else
USE_OPT += -m32 -DEFI_SIM_IS_WINDOWS=0 USE_OPT += -m32 -DEFI_SIM_IS_WINDOWS=0 -DIS_WINDOWS_COMPILER=0
endif endif
endif endif

View File

@ -15,9 +15,6 @@ efitimems_t getTimeNowMs() {
void initLogging(LoggingWithStorage *logging, const char *name) { void initLogging(LoggingWithStorage *logging, const char *name) {
} }
void setBoardConfigOverrides() {
}
void onCliCaseError(const char *token) { 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 USE_OPT += -Werror=switch
ifeq ($(OS),Windows_NT)
USE_OPT += -DIS_WINDOWS_COMPILER=1
else
USE_OPT += -DIS_WINDOWS_COMPILER=0
endif
# #
# Compiler settings # Compiler settings
############################################################################## ##############################################################################