https://sourceware.org/bugzilla/show_bug.cgi?id=9687 Weak symbols not working on mingw32
This commit is contained in:
parent
5a45a873d8
commit
acf97cc55c
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -15,9 +15,6 @@ efitimems_t getTimeNowMs() {
|
|||
void initLogging(LoggingWithStorage *logging, const char *name) {
|
||||
}
|
||||
|
||||
void setBoardConfigOverrides() {
|
||||
}
|
||||
|
||||
void onCliCaseError(const char *token) {
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
##############################################################################
|
||||
|
|
Loading…
Reference in New Issue