Skip to content

Commit

Permalink
amd64: symlink i386 includes into build dir
Browse files Browse the repository at this point in the history
By creating an i386 symlink, this allows code compiled with -m32 to
build (32-bit vdso and linux bits) when -m32 support requires files
in the i386 hierarchy.

Reviewed by:	jhb, imp
  • Loading branch information
brooksdavis committed Jun 13, 2022
1 parent a09ea2b commit d07600c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/conf/kern.post.mk
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ _ILINKS+= ${MACHINE_CPUARCH}
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
_ILINKS+= x86
.endif
.if ${MACHINE_CPUARCH} == "amd64"
_ILINKS+= i386
.endif

# Ensure that the link exists without depending on it when it exists.
# Ensure that debug info references the path in the source tree.
Expand Down
3 changes: 3 additions & 0 deletions sys/conf/kmod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ _ILINKS=machine
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
_ILINKS+=x86
.endif
.if ${MACHINE_CPUARCH} == "amd64"
_ILINKS+=i386
.endif
CLEANFILES+=${_ILINKS}

all: ${PROG}
Expand Down

0 comments on commit d07600c

Please sign in to comment.