--- qtwebengine-5.15.9_p20230505/src/buildtools/gn.pro.org      2023-05-27 21:46:50.909978618 +0200
+++ qtwebengine-5.15.9_p20230505/src/buildtools/gn.pro  2023-05-27 21:48:55.453311810 +0200
@@ -19,8 +19,10 @@
             gn_bootstrap = $$system_path($$absolute_path(gn/build/gen.py, $$src_3rd_party_dir))
 
             gn_gen_args = --no-last-commit-position --out-path $$out_path \
-                          --cc \"$$which($$QMAKE_CC)\" --cxx \"$$which($$QMAKE_CXX)\" \
-                          --ld \"$$which($$QMAKE_LINK)\"
+                          --cc \"$$which($$QMAKE_CC)\" --cxx \"$$which($$QMAKE_CXX)\" --cxx \"$$which($$QMAKE_CXX) \
+                                 -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY -DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY \ 
+                                 -Wenum-constexpr-conversion \" \
+                          --ld \"$$which($$QMAKE_LINK) -lbacktrace -lexecinfo -Wl,-Bsymbolic \"
             !isEmpty(QMAKE_AR): gn_gen_args += --ar \"$$which($$first(QMAKE_AR))\"
 
             msvc:!clang_cl: gn_gen_args += --use-lto

--- qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h.org  2023-05-24 21:22:27.417021085 +0200
+++ qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h      2023-05-24 21:24:23.970360580 +0200
@@ -19,12 +19,13 @@
 #ifndef __SYS_CORE_SYNC_H
 #define __SYS_CORE_SYNC_H
 
-#include <sys/cdefs.h>
 #include <stdint.h>
 
 #include <linux/types.h>
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 struct sync_legacy_merge_data {
  int32_t fd2;
@@ -158,6 +159,8 @@
                                   struct sync_pt_info *itr);
 void sync_fence_info_free(struct sync_fence_info_data *info);
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* __SYS_CORE_SYNC_H */

--- qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/base/process/process_metrics_posix.cc.org        2023-05-24 21:44:26.143757475 +0200
+++ qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/base/process/process_metrics_posix.cc    2023-05-24 21:45:59.293762411 +0200
@@ -119,7 +119,7 @@
   malloc_statistics_t stats = {0};
   malloc_zone_statistics(nullptr, &stats);
   return stats.size_in_use;
-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
+#elif ( defined(OS_LINUX) && defined(__GLIBC__) ) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
   struct mallinfo minfo = mallinfo();
 #if BUILDFLAG(USE_TCMALLOC)
   return minfo.uordblks;

--- qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.org     2023-05-24 21:47:55.423768546 +0200
+++ qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2023-05-24 21:49:35.063773812 +0200
@@ -132,7 +132,7 @@
   }
 #elif defined(OS_FUCHSIA)
 // TODO(fuchsia): Port, see https://crbug.com/706592.
-#else
+#elif defined(__GLIBC__)
   struct mallinfo info = mallinfo();
   // In case of Android's jemalloc |arena| is 0 and the outer pages size is
   // reported by |hblkhd|. In case of dlmalloc the total is given by

--- qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h.org      2023-05-24 22:08:28.923833782 +0200
+++ qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h  2023-05-24 22:08:36.593834185 +0200
@@ -17,8 +17,6 @@
 
 #include_next <sys/ptrace.h>
 
-#include <sys/cdefs.h>
-
 // https://sourceware.org/bugzilla/show_bug.cgi?id=22433
 #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \
     defined(__GLIBC__)

--- qtwebengine-5.15.9_p20230505/src/3rdparty/gn/build/gen.py.org       2023-05-27 18:56:07.129990844 +0200
+++ qtwebengine-5.15.9_p20230505/src/3rdparty/gn/build/gen.py   2023-05-27 18:53:57.136657677 +0200
@@ -359,10 +357,10 @@
     cflags_cc.extend(['-std=c++14', '-Wno-c++11-narrowing'])
 
     if platform.is_linux():
-      ldflags.append('-Wl,--as-needed')
-
+      ldflags.append('-Wl,--as-needed -lbacktrace -lexecinfo -lre2')
+      cflags.extend(['-D_FILE_OFFSET_BITS=64','-Wno-error=enum-constexpr-conversion','-Wno-error=enum-constexpr-conversion'])
       if not options.no_static_libstdcpp:
-        ldflags.append('-static-libstdc++')
+        ldflags.append('-stdlib=libc++')
 
       # This is needed by libc++.
       libs.append('-ldl')

--- qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/build/config/compiler/BUILD.gn       2023-05-27 22:44:57.353308072 +0200
+++ qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/build/config/compiler/BUILD.gn       2023-05-27 22:46:26.499974568 +0200
@@ -395,11 +395,15 @@
       # Use pipes for communicating between sub-processes. Faster.
       # (This flag doesn't do anything with Clang.)
       cflags += [ "-pipe" ]
+    }else {
+      cflags += [ "-Wno-error=enum-constexpr-conversion","-fPIC" ]
     }
 
     ldflags += [
       "-Wl,-z,noexecstack",
       "-Wl,-z,relro",
+      "-lbacktrace",
+      "-lexecinfo",
     ]
 
     if (!is_component_build) {

--- qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/build/config/gcc/BUILD.gn.org    2023-05-28 08:32:35.826666134 +0200
+++ qtwebengine-5.15.9_p20230505/src/3rdparty/chromium/build/config/gcc/BUILD.gn        2023-05-28 08:36:42.339999153 +0200
@@ -106,6 +106,8 @@
       # Newer binutils don't set DT_RPATH unless you disable "new" dtags
       # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
       "-Wl,--disable-new-dtags",
+      "-lbacktrace",
+      "-lexecinfo",
     ]
   }
 }
