NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59646: sh: generating optinit.h depends on host environment
>Number: 59646
>Category: bin
>Synopsis: sh: generating optinit.h depends on host environment
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 10 08:15:00 +0000 2025
>Originator: Ryota Ozaki
>Release: current
>Organization:
IIJ
>Environment:
any
>Description:
There are two issues.
One is that option.list defines option elements with mixed separators. A hard tab is mostly used as a separator but a space is used for some elements.
The other is that mkoptions.sh uses host's sort command which may behaves differently from NetBSD's one. For example, sort on Linux (Ubuntu 24.04, coreutils 9.4) doesn't propagate -b to each -k while NetBSD's sort does so.
Due to these two issues, mkoptions.sh generates a slightly different optinit.h on Linux compared to NetBSD. As a result, the generated sh binary also differs slightly (not big deal though).
>How-To-Repeat:
Build on both NetBSD and Linux and see differences between two bin/sh/optinit.h.
>Fix:
Quick fix: convert a space to a hard tab for separators in option.list.
Ideal fix: introduce sort into tools and use it in mkoptions.sh.
Home |
Main Index |
Thread Index |
Old Index