mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-06 00:23:05 +00:00

Although the prototype of memset() is already defined in OpenSslSupport.h, the function was never implemented. It was fine since a macro was designed to replace all memset() with SetMem() after including OpenSslSupport.h. However, since openssl 1.0.2j, a new function pointer in crypto/mem_clr.c requires the "real" memset() or the program would crash due to the NULL function pointer access. This commit implements memset() (just a wrapper of SetMem()) to avoid the potential crash. Signed-off-by: Gary Lin <glin@suse.com>
55 lines
1.5 KiB
Makefile
55 lines
1.5 KiB
Makefile
|
|
EFI_INCLUDES = -IInclude -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol
|
|
|
|
CFLAGS = -ggdb -O0 -I. -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar \
|
|
-Wall $(EFI_INCLUDES) -std=gnu89 \
|
|
-ffreestanding -I$(shell $(CC) -print-file-name=include)
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args \
|
|
-DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -DNO_BUILTIN_VA_FUNCS \
|
|
-DMDE_CPU_IA64
|
|
endif
|
|
ifeq ($(ARCH),ia32)
|
|
CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 \
|
|
-DMDE_CPU_IA32
|
|
endif
|
|
ifeq ($(ARCH),aarch64)
|
|
CFLAGS += -DMDE_CPU_AARCH64
|
|
endif
|
|
LDFLAGS = -nostdlib -znocombreloc
|
|
|
|
TARGET = libcryptlib.a
|
|
OBJS = Hash/CryptMd4.o \
|
|
Hash/CryptMd5.o \
|
|
Hash/CryptSha1.o \
|
|
Hash/CryptSha256.o \
|
|
Hash/CryptSha512.o \
|
|
Hmac/CryptHmacMd5.o \
|
|
Hmac/CryptHmacSha1.o \
|
|
Cipher/CryptAes.o \
|
|
Cipher/CryptTdes.o \
|
|
Cipher/CryptArc4.o \
|
|
Rand/CryptRand.o \
|
|
Pk/CryptRsaBasic.o \
|
|
Pk/CryptRsaExtNull.o \
|
|
Pk/CryptPkcs7SignNull.o \
|
|
Pk/CryptPkcs7Verify.o \
|
|
Pk/CryptDhNull.o \
|
|
Pk/CryptTs.o \
|
|
Pk/CryptX509.o \
|
|
Pk/CryptAuthenticode.o \
|
|
Pem/CryptPem.o \
|
|
SysCall/CrtWrapper.o \
|
|
SysCall/TimerWrapper.o \
|
|
SysCall/BaseMemAllocation.o \
|
|
SysCall/BaseStrings.o \
|
|
SysCall/memset.o
|
|
|
|
all: $(TARGET)
|
|
|
|
libcryptlib.a: $(OBJS)
|
|
ar rcs libcryptlib.a $(OBJS)
|
|
clean:
|
|
rm -f $(TARGET) $(OBJS)
|