summaryrefslogtreecommitdiff
path: root/lang/gcc8/files/patch-arm-unwind-cxx-support
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2018-07-14 21:59:21 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2018-07-14 21:59:21 +0000
commita2226726bfba08585cc369bab34ffcd64b7c5d50 (patch)
treed642fa80fbe4ac0837634c49f5f629849a37f222 /lang/gcc8/files/patch-arm-unwind-cxx-support
parent* Updated to 6.3.2 (diff)
Welcome GCC 8.1, the first release of the GCC 8 series!
https://gcc.gnu.org/gcc-8/changes.html has a comprehensive overview of many changes in this release and https://gcc.gnu.org/gcc-8/porting_to.html addresses issues you may encounter porting to this new version. To provide a brief overview of some of the more noticable changes: On the optimization front inter-procedural optimizations (IPO) and profile driven optimizations (PDO) have been further improved and some classic loop nest optimization passes have been added: -floop-unroll-and-jam performs outer loop unrolling and fusing of the inner loop copies, while -floop-interchange exchanges loops in a loop nest to improve data locality. These, as well as an improved -ftree-loop-distribution pass are enabled by default at -O3 and above. A new pragma "GCC unroll" has been implemented in the C family of languages as well as Fortran to provide finer-grained control over loop unrolling. DWARF debugging information in the presence of link-time optimization now properly preserves language-specific information. The -gcolumn-info option is now enabled by default, so column information is part of DWARF debugging information in addition to filenames and line numbers. The C family compilers have gained options -Wmultistatement-macros (warning about unsafe macros expanding to multiple statements used as a body of a statement such as if, else, while, switch, or for), -Wstringop-truncation (warning for calls to bounded string manipulation functions such as strncat, strncpy, and stpncpy that might either truncate the copied string or leave the destination unchanged), -Wcast-function-type (warning when a function pointer is cast to an incompatible function pointer, enabled by -Wextra), and -Wsizeof-pointer-div (warning for suspicious divisions of the size of a pointer by the size of the elements it points to, which usually is an indication of a mistaken way to calculate the number of elements in an array, enabled by -Wall), among others. The existing -Warray-bounds and -Wrestrict options have been enhanced to detect many more instances, as have -Wformat-overflow and -Wformat-truncation. Error messages and warnings better highlight the locations of issues in many cases, and helpful "fix it" hints are provided more often. The C++ ABI (-fabi-version=12) introduces minor changes in a few fringe cases. The GCC 7 ABI can still be selected with -fabi-version=11. The C++ frontend as well as libstdc++ feature experimental support for many C++2a features and Fortran has seen a large number of improvements. Lots and lots of improvements for Arm and AArch64 targets, as well as the usual dose on x86 and powerpc. PR: 229681
Notes
Notes: svn path=/head/; revision=474650
Diffstat (limited to 'lang/gcc8/files/patch-arm-unwind-cxx-support')
-rw-r--r--lang/gcc8/files/patch-arm-unwind-cxx-support106
1 files changed, 106 insertions, 0 deletions
diff --git a/lang/gcc8/files/patch-arm-unwind-cxx-support b/lang/gcc8/files/patch-arm-unwind-cxx-support
new file mode 100644
index 000000000000..ec6959b9655c
--- /dev/null
+++ b/lang/gcc8/files/patch-arm-unwind-cxx-support
@@ -0,0 +1,106 @@
+--- 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,