Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #237616

Category gcoreutils
Changed by H. Peter Anvin <hpaohnoyoudont@zytor.com>
Changed at Mon 23 Jun 2025 23:13:51
Repository git://git.savannah.gnu.org/coreutils.git
Project gcoreutils
Branch master
Revision 8c47af9be524405a961bb33200d5e187316191b1

Comments

stty: support baud rate macro extraction on more compilers
For generating src/speedtest.h, try a sequence of command-line options
until (or unless) one of them works:

  -dM: gcc, clang and derived compilers, icc classic
  -xdumpmacros: Sun Studio (writes to stderr!)
  -qshowmacros: IBM XL classic
  -PD: MSVC (usable with a wrapper such as cccl from the SWIG project)

Because Sun Studio -xdumpmacros unconditionally writes to stderr,
capture stderr output instead of sending it to /dev/null. This is
perfectly safe, even in the presence of stray stderr output, because:

  1. speedgen ignores input that is not of the form #define B<number>
  2. even if a line of that format would somehow spuriously appear,
     the only outcome is that the generated C code will probe for a few
     more macros.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>

Changed files