Skip to content

Commit adb7ea3

Browse files
committed
Link wolfentropy.o and keep wc_port socket helpers out of the UEFI build
1 parent a5d98ca commit adb7ea3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

uefi-static/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ WOLFSSL_REPO=https://github.com/wolfSSL/wolfssl
44
CFLAGS=-fpie -ffreestanding -fno-stack-protector -fno-stack-check -fshort-wchar -mno-red-zone -maccumulate-outgoing-args -static-libgcc -nostdlib
55
# enable user settings
66
CFLAGS+= -DWOLFSSL_USER_SETTINGS
7+
# gcc still defines __unix__ when freestanding, which pulls wc_port.c's
8+
# socket/fcntl helpers into a target that has no libc to link them against
9+
CFLAGS+= -U__unix__
710
CFLAGS+=-I./wolfssl/ -I. -I/usr/include/efi
811
CFLAGS+=-ggdb
912
CC=gcc
@@ -16,7 +19,7 @@ LDFLAGS_END=-lgnuefi -lefi -lgcc
1619

1720
_OBJS=sha256.o sha3.o misc.o coding.o hmac.o rsa.o random.o wolfmath.o \
1821
integer.o tfm.o asm.o cpuid.o memory.o logging.o wc_port.o asn.o hash.o \
19-
main.o test.o error.o string.o aes.o wc_encrypt.o
22+
main.o test.o error.o string.o aes.o wc_encrypt.o wolfentropy.o
2023

2124
OBJS=$(addprefix $(BUILD_DIR)/,$(_OBJS))
2225

0 commit comments

Comments
 (0)