summaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorAhmad Khalifa <ahmadkhalifa570@gmail.com>2024-05-14 19:37:13 +0000
committerWarner Losh <imp@FreeBSD.org>2025-03-26 01:28:38 +0000
commit7d7dc14d6b389ba0df4f522501c39578cbef8cae (patch)
tree2f43ad47bb9278eaa8edf1f9b6c109778a887b7a /stand
parent92aa078752ee7ae7347710f6be425b3d4c6802eb (diff)
Diffstat (limited to 'stand')
-rw-r--r--stand/Makefile1
-rw-r--r--stand/defs.mk10
-rw-r--r--stand/efi/Makefile1
-rw-r--r--stand/efi/libefi32/Makefile4
4 files changed, 13 insertions, 3 deletions
diff --git a/stand/Makefile b/stand/Makefile
index 6d0d7a09672a..a9f2f5a0c50b 100644
--- a/stand/Makefile
+++ b/stand/Makefile
@@ -67,6 +67,7 @@ SUBDIR_DEPEND_${MACHINE}+= libofw
SUBDIR+=${_x}
.if defined(LIB32LIST) && ${LIB32LIST:M${_x}}
SUBDIR+=${_x}32
+INTERP_DEPENDS+=${_x}32
.endif
.if ${_x} != "libsa"
SUBDIR_DEPEND_${_x}+= libsa
diff --git a/stand/defs.mk b/stand/defs.mk
index 3624b9311161..a1cb39f8b4a0 100644
--- a/stand/defs.mk
+++ b/stand/defs.mk
@@ -38,7 +38,14 @@ WARNS?= 1
BOOTSRC= ${SRCTOP}/stand
EFISRC= ${BOOTSRC}/efi
EFIINC= ${EFISRC}/include
+# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is
+# built 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here
+# and activate it when DO32 is explicitly defined to be 1.
+.if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1
+EFIINCMD= ${EFIINC}/i386
+.else
EFIINCMD= ${EFIINC}/${MACHINE}
+.endif
FDTSRC= ${BOOTSRC}/fdt
FICLSRC= ${BOOTSRC}/ficl
LDRSRC= ${BOOTSRC}/common
@@ -128,9 +135,6 @@ CFLAGS+= -m32 -mcpu=powerpc -mbig-endian
CFLAGS+= -m32 -mcpu=powerpc -mlittle-endian
.endif
-# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is
-# build 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here
-# and activate it when DO32 is explicitly defined to be 1.
.if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1
CFLAGS+= -m32
# LD_FLAGS is passed directly to ${LD}, not via ${CC}:
diff --git a/stand/efi/Makefile b/stand/efi/Makefile
index 2ecd8ba07aa0..e92d59e9f8b7 100644
--- a/stand/efi/Makefile
+++ b/stand/efi/Makefile
@@ -4,6 +4,7 @@ NO_OBJ=t
.include <bsd.init.mk>
SUBDIR.yes+= libefi
+SUBDIR.${MK_LOADER_IA32}+= libefi32
SUBDIR.${MK_FDT}+= fdt
SUBDIR.yes+= .WAIT
diff --git a/stand/efi/libefi32/Makefile b/stand/efi/libefi32/Makefile
new file mode 100644
index 000000000000..779c7e604686
--- /dev/null
+++ b/stand/efi/libefi32/Makefile
@@ -0,0 +1,4 @@
+DO32=1
+
+.PATH: ${.CURDIR}/../libefi
+.include "${.CURDIR}/../libefi/Makefile"