void-packages/srcpkgs/gcc/patches/fix-vtv-link-order.patch

21 lines
741 B
Diff

put vtv_end.o in front of postdep_objects_CXX
having it after crtendS.o leads to missing zero termination in eh_frame section
This is in line with comment in libgcc/vtv_end.c:
When the GCC driver inserts vtv_start.o into the link line (just
after crtbegin.o) it also inserts vtv_end.o into the link line,
just before crtend.o.
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -15443,7 +15443,7 @@
if test "$enable_vtable_verify" = yes; then
predep_objects_CXX="${predep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_start.o"
- postdep_objects_CXX="${postdep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_end.o"
+ postdep_objects_CXX="${glibcxx_builddir}/../libgcc/vtv_end.o ${postdep_objects_CXX}"
fi