mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 02:44:44 +00:00
Add no-math-errno for GCC when build for Release (#20503)
* gcc matherrno * changelog
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
## Changes affecting backward compatibility
|
||||
- `httpclient.contentLength` default to `-1` if the Content-Length header is not set in the response, it followed Apache HttpClient(Java), http(go) and .Net HttpWebResponse(C#) behavior. Previously raise `ValueError`.
|
||||
- `httpclient.contentLength` default to `-1` if the Content-Length header is not set in the response, it followed Apache HttpClient(Java), http(go) and .Net HttpWebResponse(C#) behavior. Previously raise `ValueError`.
|
||||
|
||||
- `addr` is now available for all addressable locations,
|
||||
`unsafeAddr` is now deprecated and an alias for `addr`.
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
- Static linking against OpenSSL versions below 1.1, previously done by
|
||||
setting `-d:openssl10`, is no longer supported.
|
||||
|
||||
|
||||
- `macros.getImpl` for `const` symbols now returns the full definition node
|
||||
(as `nnkConstDef`) rather than the AST of the constant value.
|
||||
|
||||
@@ -221,6 +221,8 @@
|
||||
related functions produced on the backend. This prevents conflicts with other Nim
|
||||
static libraries.
|
||||
|
||||
- When compiling for Release the flag `-fno-math-errno` is used for GCC.
|
||||
|
||||
|
||||
## Tool changes
|
||||
|
||||
|
||||
@@ -250,14 +250,17 @@ clang.objc.options.linker = "-lobjc -lgnustep-base"
|
||||
gcc.options.linker %= "-L $WIND_BASE/target/lib/usr/lib/ppc/PPC32/common -mrtp -fno-strict-aliasing -D_C99 -D_HAS_C9X -std=c99 -fasm -Wall -Wno-write-strings"
|
||||
@end
|
||||
|
||||
gcc.options.speed = "-O3 -fno-strict-aliasing -fno-ident"
|
||||
# -fno-math-errno is default in OSX, iOS, BSD, Musl, Libm, LLVM, Clang, ICC.
|
||||
# See https://itnext.io/why-standard-c-math-functions-are-slow-d10d02554e33
|
||||
# and https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Optimize-Options.html#Optimize-Options
|
||||
gcc.options.speed = "-O3 -fno-strict-aliasing -fno-ident -fno-math-errno"
|
||||
gcc.options.size = "-Os -fno-ident"
|
||||
@if windows:
|
||||
gcc.options.debug = "-g3 -Og -gdwarf-3"
|
||||
@else:
|
||||
gcc.options.debug = "-g3 -Og"
|
||||
@end
|
||||
gcc.cpp.options.speed = "-O3 -fno-strict-aliasing -fno-ident"
|
||||
gcc.cpp.options.speed = "-O3 -fno-strict-aliasing -fno-ident -fno-math-errno"
|
||||
gcc.cpp.options.size = "-Os -fno-ident"
|
||||
gcc.cpp.options.debug = "-g3 -Og"
|
||||
#passl = "-pg"
|
||||
|
||||
Reference in New Issue
Block a user