How to re-compile sshd for a 386

Mark Ter Morshuizen <[email protected]> Fri, 1 Aug 2025 15:21:04 +0200
Newsgroups gmane.os.netbsd.ports.i386
Organization Honingklip Brewery
Message-ID <[email protected]>
Hi,

I've set up a small machine based on a 386DX40 board using 4.0.1 which I 
believe is the last to support actual 386's.

I've recompiled the kernel on a different (virtual) machine to make it 
run on 386 with math emulation instead of 486. I also removed lots of 
stuff I don't need. That is all working fine.

The only problem I have is that when the system starts up sshd fails 
with "illegal instruction" and does not start.

Is there a way to recompile the built in (not a package) sshd so that it 
runs on the 386? (I have the same 4.0.1 release on a virtual machine. 
How do I make it compile sshd for the 386 and not for itself? Preferably 
without having to build the entire system.)

I'm not a developer but I do have some clue. Please be gentle.

Thanks!

-- 
Mark Ter Morshuizen