Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: How to re-compile sshd for a 386
>> I think NetBSD 4 still uses build.sh. [...]
> There is indeed a build.sh. Trying to follow the NetBSD Guide I
> should be able to [...]
If by "the NetBSD Guide" you mean some webpages, this is a good example
of why I absolutely loathe the current trend to using webpages as
documentation: the "documentation" is, far too often, for a version
that differs significantly from the version you have. (It's even worse
if the "documentation" is "what someone said on stackoverflow three
years ago".)
In thia case, the "NetBSD Guide" was almost certainly updated to match
modern NetBSD as of the time of the last update without any history
being kept as far as you, the external viewer, can tell. While I
haven't checked, it seems likely to me that it doesn't even have any
indication of what version the webpage is talking about; certainly many
similar things don't.
> =C2=A0 $ ./build.sh -U -u -O ./obj -m i386 -a <somearch> release
> but I can't find what exactly to use instead of "<somearch>".
> Like, how do I build for 386, 486, Pentium, etc?
If 4.0.1 supports the 80386, I _think_ you shouldn't need any such. I
think it uses only 386 instructions but instruction scheduling and such
is for more modern chips, so you should get working but possibly
suboptimal code on a real 80386.
I don't have easy access to a 4.0.1 right now, but I checked a 5.2
machine, and its gcc has -march= and -mtune=:
-mtune=cpu-type
Tune to cpu-type everything applicable about the generated code,
except for the ABI and the set of available instructions. The
choices for cpu-type are:
[...]
-march=cpu-type
Generate instructions for the machine type cpu-type. The choices
for cpu-type are the same as for -mtune. Moreover, specifying
-march=cpu-type implies -mtune=cpu-type.
I haven't chased through to figure out exactly what -a controls (that
is, what it turns into in terms of compiler flags). But I think it
doesn't matter, because there is a list of supported MACHINE_ARCHs, and
the list is relatively short:
case "${MACHINE_ARCH}" in
alpha|arm|armeb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64)
;;
of which the only value likely to be of any use to you is i386, so I
think you probably don't need -a. This is, as I said, on 5.2, but with
all the 486-and-up variants, I'd expect 5.2 to support -a if it were of
use.
Do you have any specific reason to think you do need -a? For example,
did you try it without and have it fail?
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index