#455 #434 F32 System-Wide Change: GCC 10
Merged 4 years ago by pbokoc. Opened 4 years ago by roypen.
fedora-docs/ roypen/release-notes iss434  into  f32

@@ -3,3 +3,187 @@ 

  

  [[sect-c]]

  = C

+ 

+ [[back]]

+ 

+ == GCC

+ 	

+ The GNU compiler suite has been update to version 10.0.1. See the http://gcc.gnu.org/gcc-10/changes.html[upstream documentation] for user visible changes. Packages in Fedora 32 have been rebuilt with the new version of the compiler.

+ 

+ === New Features and General Improvements:

+ 

+ 

+ *    New built-in functions:

+ **        The `__has_builtin` built-in preprocessor operator can be used to query support for built-in functions provided by GCC and other compilers that support it.

+ **        `__builtin_roundeven` for the corresponding function from ISO/IEC TS 18661.

+ *    New command-line options:

+ **        `-fallocation-dce` removes unneeded pairs of new and delete operators.

+ **        `-fprofile-partial-training` can now be used to inform the compiler that code paths not covered by the training run should not be optimized for size.

+ **        `-fprofile-reproducible` controls level of reproducibility of profile gathered by -fprofile-generate. This makes it possible to rebuild program with same outcome which is useful, for example, for distribution packages.

+ *    Inter-procedural optimization improvements:

+ **        The inter-procedural scalar replacement for aggregates (IPA-SRA) pass was re-implemented to work at link-time.

+ **        `-finline-functions` is now enabled at -O2 and was retuned for better code size versus runtime performance trade-offs. Inliner heuristics was also significantly sped up to avoid negative impact to -flto -O2 compile times.

+ **        Inliner heuristics and function cloning can now use value-range information to predict effectivity of individual transformations.

+ **        During link-time optimization the C++ One Definition Rule is used to increase precision of type based alias analysis.

+ *    Link-time optimization improvements:

+ **        A new binary lto-dump has been added. The program can dump various information about a LTO bytecode object file.

+ **        Parallel phase of the LTO can automatically detect a running make`s jobserver or can fall back to number of available cores.

+ **        The LTO bytecode can be compressed with zstd algorithm. Configure script can automatically detect the zstd support.

+ **        Most `--param` values can now be specified at translation unit granularity. This includes all parameters controlling the inliner and other inter-procedural optimizations. Unlike earlier releases, GCC 10 will ignore parameters controlling optimizations specified at link-time and apply parameters specified at compile-time in the same manner as done for optimization flags.

+ *    Profile driven optimization improvements:

+ **        Profile New Languages and Language-Specific Improvementsmaintenance during compilation and hot/cold code partitioning have been improved.

+ **        Using `-fprofile-values`, an instrumented binary can track multiple values (up to 4) for e.g. indirect calls and provide more precise profile information.

+ 

+ 

+ === New Languages and Language-Specific Improvements:

+ 

+ 

+ *    Version 2.6 of the OpenACC specification is now supported in the C, C++ and Fortran compilers. See the implementation status section on the OpenACC wiki page and the run-time library documentation for further information.

+ *    OpenMP and OpenACC now support offloading to AMD Radeon (GCN) GPUs; supported are the third-generation Fiji (fiji) and the fifth-generation VEGA 10/VEGA 20 (gfx900 or gfx906).

+ 

+ ==== C family

+ * New attributes.

+ * New warnings. 

+ * Enhancements to existing warnings

+ 

+ ==== C

+ 

+ * Several new features from the upcoming C2X revision of the ISO C standard are supported with `-std=c2x` and `-std=gnu2x`. Some of these features are also supported as extensions when compiling for older language versions. In addition to the features listed, some features previously supported as extensions and now added to the C standard are enabled by default in C2X mode and not diagnosed with `-std=c2x -Wpedantic`.

+ * GCC now defaults to `-fno-common`. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With `-fcommon` such definitions are silently merged during linking.

+ 

+ ==== C++

+ 

+ *    Several `C++20` features have been implemented.

+ *    Several `C++ Defect` Reports have been resolved.

+ *    New warnings.

+ *    G++ can now detect modifying constant objects in constexpr evaluation (which is undefined behavior).

+ *    G++ no longer emits bogus -Wsign-conversion warnings with explicit casts.

+ *    Narrowing is now detected in more contexts (e.g., case values).

+ *    Memory consumption of the compiler has been reduced in constexpr evaluation.

+ *    The noexcept-specifier is now properly treated as a complete-class context as per [class.mem].

+ *    The attribute deprecated can now be used on namespaces too.

+ 

+ ==== Runtime Library (libstdc++)

+ 

+ *    Improved experimental `C++2a` support, including.

+ *    Support for RDSEED in `std::random_device`.

+ *    Reduced header dependencies, leading to faster compilation for some code.

+ 

+ 

+ == The GNU C Library version 2.31:

+ 

+ Fedora 32 provides the GNU C Library - `glibc` - version 2.31. Notable changes include:

+ 

+ === New Features:

+ 

+ * The GNU C Library now supports a feature test macro _ISOC2X_SOURCE

+   to enable features from the draft ISO C2X standard.  Only some

+   features from this draft standard are supported by the GNU C

+   Library, and as the draft is under active development, the set of

+   features enabled by this macro is liable to change.  Features from

+   C2X are also enabled by _GNU_SOURCE, or by compiling with `gcc

+   -std=gnu2x`.

+ 

+ * The `<math.h>` functions that round their results to a narrower type

+   now have corresponding type-generic macros in `<tgmath.h>`, as defined

+   in TS 18661-1:2014 and TS 18661-3:2015 as amended by the resolution

+   of Clarification Request 13 to TS 18661-3.

+ 

+ * The function `pthread_clockjoin_np` has been added, enabling join with

+   a terminated thread with a specific clock.  It allows waiting

+   against `CLOCK_MONOTONIC` and `CLOCK_REALTIME`.  This function is a GNU

+   extension.

+ 

+ * New locale added: `mnw_MM` (Mon language spoken in Myanmar).

+ 

+ * The DNS stub resolver will optionally send the AD (authenticated

+   data) bit in queries if the trust-ad option is set via the options

+   directive in /etc/resolv.conf (or if `RES_TRUSTAD` is set in

+   `_res.options`).  In this mode, the AD bit, as provided by the name

+   server, is available to applications which call res_search and

+   related functions.  In the default mode, the AD bit is not set in

+   queries, and it is automatically cleared in responses, indicating a

+   lack of DNSSEC validation.  (Therefore, the name servers and the

+   network path to them are treated as untrusted.)

+ 

+ 

+ === Deprecated and Removed Features:

+ 

+ * The totalorder and totalordermag functions, and the corresponding

+   functions for other floating-point types, now take pointer arguments

+   to avoid signaling NaNs possibly being converted to quiet NaNs in

+   argument passing.  This is in accordance with the resolution of

+   Clarification Request 25 to TS 18661-1, as applied for C2X.

+   Existing binaries that pass floating-point arguments directly will

+   continue to work.

+ 

+ * The obsolete function stime is no longer available to newly linked

+   binaries, and its declaration has been removed from `<time.h>`.

+   Programs that set the system time should use `clock_settime` instead.

+ 

+ * We plan to remove the obsolete function ftime, and the header

+   `<sys/timeb.h>`, in a future version of glibc.  In this release, the

+   header still exists but calling ftime will cause a compiler warning.

+   All programs should use gettimeofday or clock_gettime instead.

+ 

+ * The gettimeofday function no longer reports information about a

+   system-wide time zone.  This 4.2-BSD-era feature has been deprecated

+   for many years, as it cannot handle the full complexity of the

+   world`s timezones, but hitherto we have supported it on a

+   best-effort basis.  Changes required to support 64-bit time_t on

+   32-bit architectures have made this no longer practical.

+ 

+ 

+ * The settimeofday function can still be used to set a system-wide

+   time zone when the operating system supports it.  This is because

+   the Linux kernel reused the API, on some architectures, to describe

+   a system-wide time-zone-like offset between the software clock

+   maintained by the kernel, and the "RTC" clock that keeps time when

+   the system is shut down.

+ 

+ 

+ * SPARC ISA v7 is no longer supported.  v8 is still supported, but

+   only if the optional CAS instruction is implemented (for instance,

+   LEON processors are still supported, but SuperSPARC processors are

+   not).

+   

+ 

+ * If a lazy binding failure happens during dlopen, during the

+   execution of an ELF constructor, the process is now terminated.

+   Previously, the dynamic loader would return NULL from dlopen, with

+   the lazy binding error captured in a dlerror message.  In general,

+   this is unsafe because resetting the stack in an arbitrary function

+   call is not possible.

+ 

+ * For MIPS hard-float ABIs, the GNU C Library will be configured to

+   need an executable stack unless explicitly configured at build time

+   to require minimum kernel version 4.8 or newer.  This is because

+   executing floating-point branches on a non-executable stack on Linux

+   kernels prior to 4.8 can lead to application crashes for some MIPS

+   configurations. While currently `PT_GNU_STACK` is not widely used on

+   MIPS, future releases of GCC are expected to enable non-executable

+   stack by default with `PT_GNU_STACK` by default and is thus likely to

+   trigger a crash on older kernels.  

+ 

+ 

+ * System call wrappers for time system calls now use the new time64

+   system calls when available. On 32-bit targets, these wrappers

+   attempt to call the new system calls first and fall back to the

+   older 32-bit time system calls if they are not present.  This may

+   cause issues in environments that cannot handle unsupported system

+   calls gracefully by returning `-ENOSYS`. Seccomp sandboxes are

+   affected by this issue.

+ 

+ === Security Related Changes:

+ 

+ *  CVE-2019-19126: ld.so failed to ignore the `LD_PREFER_MAP_32BIT_EXEC`

+   environment variable during program execution after a security

+   transition, allowing local attackers to restrict the possible

+   mapping addresses for loaded libraries and thus bypass ASLR for a

+   setuid program.  Reported by Marcin Koƛcielnicki.

+ 

+ For detailed information about glibc-2.31 see the link:https://sourceware.org/legacy-ml/libc-announce/2020/msg00001.html[upstream NEWS document]; note that you may need to scroll down to find version 2.31 as the document continues to be updated.

+ 

+ <<back,back to top>>

+ 

+ 

Release notes for GCC, glibc. Issue #434

Metadata Update from @pbokoc:
- Request assigned

4 years ago

rebased onto 939e8a4d6cb10e569fccc5b37eed35d8c39ef857

4 years ago

You're mostly using ' ' to denote functions, options, commands, etc. in the document, but in some cases you're using ` ` (e.g. `-finline-functions` on line 21). The former renders verbatim, the resulting text is literally '__has_builtin', etc., while the latter is proper ASCIIDoc markup for these things, and renders in monospace font with a different color and background (same as here on pagure - -finline-functions), which I consider preferable. Can you please go through the doc and make sure to use ` ` in all of these cases?

Related to the above comment; in a few cases I noticed options, function names, etc. that should be marked up with ` ` as well, but aren't at all. For example, this should be -fprofile-generate.

If you want to make a multi-paragraph list item, then use a + on empty lines separating those paragraphs, otherwise any paragraph after the first will render as a code block instead (because it starts with multiple spaces and doesn't have the * at the start to mark it up as a list item). This problem appears a couple of times in this document.

Ok, that should be it for feedback.

Hi Petr,

Thanks for the feedback. I will make those corrections today.
I was using asciidoc program to create html from adoc file but it turns out that the output text looks different in some cases than using local preview (preview.sh).
I will remember to use local preview to check output formatting.

rebased onto 935f25e1664843601f39f3f1bec5dad890747a5b

4 years ago

I've messed up with merging branches, sorry. :/
Changes are in the commit c96a9ec

rebased onto bda903c

4 years ago

Should be fine :) Thank you for your contributions!

Pull-Request has been merged by pbokoc

4 years ago