[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scm-discuss] building SCM with recent GCC versions
From: |
Steve VanDevender |
Subject: |
[Scm-discuss] building SCM with recent GCC versions |
Date: |
Sun, 7 Jul 2019 23:34:39 -0700 |
After upgrading my systems to the just-released Debian Buster with GCC
version 8.3, I found that rebuilding SCM with "gcc -O" produced a number
of test errors relating to floating-point printing and bignums.
After some trial and error and an inspired guess, I found that
"gcc -O -fwrapv" builds a version of SCM that compiles and passes all
tests. This also produces working builds when higher optimization
levels like -O2 or -O3 are used.
"-fwrapv" tells GCC to assume that arithmetic "wraps around" mod 2^N
where N is the number of bits in an integer type. This is apparently no
longer the default assumption in GCC.
I don't know yet which GCC versions might have this behavior other than
8.3. "-fwrapv" has been an option for quite a while (I see it in a
system with GCC 4.4, at least).
- [Scm-discuss] building SCM with recent GCC versions,
Steve VanDevender <=