mirror of
https://git.freebsd.org/ports.git
synced 2025-05-14 16:21:50 -04:00
https://gcc.gnu.org/gcc-9/changes.html has a comprehensive overview of many improvements and changes and https://gcc.gnu.org/gcc-8/porting_to.html addresses issues you may encounter porting to this new version, though this release series should have fewer of those than previous ones. To provide a brief overview of some of the more noticable changes: GCC's diagnostics now print source code with a left margin showing line numbers. This is configurable via -fno-diagnostics-show-line-numbers. Plus there have been lots of further improvements around diagnostic messages in general as -fopt-info. As usual a large number of improvements to code generation, including but by far not limited to the following: - Switch expansion (into expressions). - Inliner defaults are tuned to better suit modern C++ codebases, especially when built with link time optimizations. - Hot/cold partitioning is now more precise and aggressive. - Improved scalability for very large translation units. - Link-time optimization improvements including faster compilation. A new option -flive-patching=[inline-only-static|inline-clone] has been introduced to provide a safe compilation for live-patching. A new pair of profiling options -fprofile-filter-files and -fprofile-exclude-files help filter which source files are instrumented. New built-in functions __builtin_expect_with_probability, __builtin_has_attribute, and __builtin_speculation_safe_value. Significant effort has been put into refining existing compiler warnings and adding additional diagnostics. One notable addition is -Wabsolute-value which warns for calls to standard functions that compute the absolute value of an argument when a more appropriate standard function is available. For example, calling abs(3.14) warns because the appropriate function to compute the absolute value of a double argument is fabs. The spelling corrector now considers transposed letters, and the threshold for similarity has been tightened, to avoid nonsensical suggestions. A new option --completion provides better option completion in a shell (such as bash). OpenACC support in C, C++, and Fortran continues to be maintained and improved. Most of the OpenACC 2.5 specification is implemented. Version 5.0 of the OpenMP specification is now partially supported in the C and C++ compilers. There is now experimental support for the upcoming C2X revision of the ISO C standard (via the -std=c2x and similar options). The C++ front end has experimental support for some of the upcoming C++2a draft features, enabled by the -std=c++2a or -std=gnu++2a options. This includes range-based for statements with initializer, default constructible and assignable stateless lambdas, lambdas in unevaluated contexts, language support for empty data members, allowing pack expansion in lambda init-capture, likely and unlikely attributes, class types in non-type template parameters, allowing virtual function calls in constant expressions, explicit(bool), std::is_constant_evaluated, nested inline namespaces, etc. The C++17 implementation is no longer experimental and parallel algorithms and <execution> and <memory_resource> are available. Using the types and functions in <filesystem> does not require linking with -lstdc++fs any more. On the Fortran side asynchronous I/O is now fully supported; FINDLOC and IS_CONTIGUOUS and other intrinsics have been implemented. The MAX and MIN intrinsics are no longer guaranteed to return any particular value in case one of the arguments is a NaN. This conforms with the Fortran standard and what other Fortran compilers do. A new option -fdec-include, set also by -fdec, has been added for compatibility with legacy code. With this option, the INCLUDE directive is parsed also as a statement, which allows it to be written on multiple source lines with line continuations. Support for the Cell Broadband Engine (SPU), and thus powerpcspe on FreeBSD as well, has been removed for lack of upstream maintainership. Also there's been a minor ABI change on arm* targets (that GCC warns about by default, controlled by the -Wpsabi option). Support for the D programming language has been added to GCC, implementing version 2.076 of the language and run-time library, though this port does not enable this yet. Volunteers welcome to test and contribute.
106 lines
3.4 KiB
Text
106 lines
3.4 KiB
Text
--- UTC
|
|
Index: gcc/ginclude/unwind-arm-common.h
|
|
===================================================================
|
|
--- gcc/ginclude/unwind-arm-common.h (revision 219113)
|
|
+++ gcc/ginclude/unwind-arm-common.h (working copy)
|
|
@@ -82,7 +82,11 @@
|
|
|
|
struct _Unwind_Control_Block
|
|
{
|
|
+#ifdef __FreeBSD__
|
|
+ unsigned exception_class __attribute__((__mode__(__DI__)));
|
|
+#else
|
|
char exception_class[8];
|
|
+#endif
|
|
void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
|
|
/* Unwinder cache, private fields for the unwinder's use */
|
|
struct
|
|
@@ -181,7 +185,11 @@
|
|
|
|
/* Support functions for the PR. */
|
|
#define _Unwind_Exception _Unwind_Control_Block
|
|
+#ifdef __FreeBSD__
|
|
+ typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
|
|
+#else
|
|
typedef char _Unwind_Exception_Class[8];
|
|
+#endif
|
|
|
|
void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
|
|
_Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
|
|
Index: libstdc++-v3/libsupc++/unwind-cxx.h
|
|
===================================================================
|
|
--- libstdc++-v3/libsupc++/unwind-cxx.h (revision 219147)
|
|
+++ libstdc++-v3/libsupc++/unwind-cxx.h (working copy)
|
|
@@ -235,7 +235,7 @@
|
|
return reinterpret_cast<__cxa_dependent_exception *>(exc + 1) - 1;
|
|
}
|
|
|
|
-#ifdef __ARM_EABI_UNWINDER__
|
|
+#if defined(__ARM_EABI_UNWINDER__) && !defined(__FreeBSD__)
|
|
static inline bool
|
|
__is_gxx_exception_class(_Unwind_Exception_Class c)
|
|
{
|
|
@@ -309,13 +309,7 @@
|
|
c[6] = 'R';
|
|
c[7] = '\0';
|
|
}
|
|
-
|
|
-static inline void*
|
|
-__gxx_caught_object(_Unwind_Exception* eo)
|
|
-{
|
|
- return (void*)eo->barrier_cache.bitpattern[0];
|
|
-}
|
|
-#else // !__ARM_EABI_UNWINDER__
|
|
+#else // !__ARM_EABI_UNWINDER__ || __FreeBSD__
|
|
// This is the primary exception class we report -- "GNUCC++\0".
|
|
const _Unwind_Exception_Class __gxx_primary_exception_class
|
|
= ((((((((_Unwind_Exception_Class) 'G'
|
|
@@ -339,6 +333,16 @@
|
|
<< 8 | (_Unwind_Exception_Class) '+')
|
|
<< 8 | (_Unwind_Exception_Class) '\x01');
|
|
|
|
+const _Unwind_Exception_Class __gxx_forced_unwind_class
|
|
+= ((((((((_Unwind_Exception_Class) 'G'
|
|
+ << 8 | (_Unwind_Exception_Class) 'N')
|
|
+ << 8 | (_Unwind_Exception_Class) 'U')
|
|
+ << 8 | (_Unwind_Exception_Class) 'C')
|
|
+ << 8 | (_Unwind_Exception_Class) 'F')
|
|
+ << 8 | (_Unwind_Exception_Class) 'O')
|
|
+ << 8 | (_Unwind_Exception_Class) 'R')
|
|
+ << 8 | (_Unwind_Exception_Class) '\0');
|
|
+
|
|
static inline bool
|
|
__is_gxx_exception_class(_Unwind_Exception_Class c)
|
|
{
|
|
@@ -346,6 +350,12 @@
|
|
|| c == __gxx_dependent_exception_class;
|
|
}
|
|
|
|
+static inline bool
|
|
+__is_gxx_forced_unwind_class(_Unwind_Exception_Class c)
|
|
+{
|
|
+ return c == __gxx_forced_unwind_class;
|
|
+}
|
|
+
|
|
// Only checks for primary or dependent, but not that it is a C++ exception at
|
|
// all.
|
|
static inline bool
|
|
@@ -357,7 +367,18 @@
|
|
#define __GXX_INIT_PRIMARY_EXCEPTION_CLASS(c) c = __gxx_primary_exception_class
|
|
#define __GXX_INIT_DEPENDENT_EXCEPTION_CLASS(c) \
|
|
c = __gxx_dependent_exception_class
|
|
+#define __GXX_INIT_FORCED_UNWIND_CLASS(c) c = __gxx_forced_unwind_class
|
|
+#endif // __ARM_EABI_UNWINDER__ && !__FreeBSD__
|
|
|
|
+#ifdef __ARM_EABI_UNWINDER__
|
|
+static inline void*
|
|
+__gxx_caught_object(_Unwind_Exception* eo)
|
|
+{
|
|
+ return (void*)eo->barrier_cache.bitpattern[0];
|
|
+}
|
|
+
|
|
+#else // !__ARM_EABI_UNWINDER__
|
|
+
|
|
// GNU C++ personality routine, Version 0.
|
|
extern "C" _Unwind_Reason_Code __gxx_personality_v0
|
|
(int, _Unwind_Action, _Unwind_Exception_Class,
|