void-packages/srcpkgs/gcc/patches/fix-vtv-link-order.patch
Johannes 1741027262 gcc: fix order of postdep_objects_CXX
make sure crt* objects come after anything else

fixes #25535

[ci skip]
2020-10-16 20:29:23 +02:00

20 lines
737 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.
--- libstdc++-v3/configure
+++ 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