Ticket #7085 (closed defect: worksforme)

Opened 9 years ago

Last modified 8 years ago

virtualbox-ose: --as-needed fix (patch included)

Reported by: Polynomial-C Owned by:
Component: other Version: VirtualBox 3.2.6
Keywords: Cc:
Guest type: other Host type: Linux



at Gentoo we encourage users to use LDFLAGS="-Wl,--as-needed" as much as possible to reduce the amount of packages that need recompilation when some shared libs have ABI change. For that reason we also provide the possibility to make the compiler use --as-needed during linking by default [1]. This failed for virtualbox-ose as can be seen in [2]. Kacper Kowalik was so kind to examine this problem and wrote a patch which I want to suggest for inclusion. Please see the attached patch.

[1] (see section "Forced --as-needed")



virtualbox-ose-asneeded.patch Download (516 bytes) - added by Polynomial-C 9 years ago.

Change History

Changed 9 years ago by Polynomial-C

comment:1 Changed 9 years ago by frank

Well, applying this patch would probably not hurt. But linking xpidl with --as-needed does not make much sense because this binary is not included in the final package (xpidl is only required during compilation of VirtualBox) and all relevant binaries are already linked with --as-needed.

comment:2 Changed 9 years ago by Polynomial-C

Of course it doesn't make much sense if it's only used internally but when you have a compiler that has --as-needed in his spec file it links everything with --as-needed unless --no-as-needed is supplied via the build system.
As we at Gentoo use --as-needed enabled compilers (see first link from my initial post, section "Forced --as-needed") to test software that has broken build systems you would do us a big favour in applying this patch.

comment:3 Changed 9 years ago by frank

I added the -Wl,--as-needed switch manually to the linker flags of xpidl (see r31534). This works fine here and sorry, but I still don't see the reason of applying the patch. The output of libIDL-config-2 --libs and pkg-config --libs-only-L libIDL-2.0 ; pkg-config --libs-only-l libIDL-2.0 is the exactly the same here. Same for libIDL-config-2 --cflags and pkg-config --cflags libIDL-2.0.

comment:4 Changed 8 years ago by frank

  • Status changed from new to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use