[Fwd: [PATCH] Respect STATIC_CXX value when linking libjvm]
Nikolay Igotti
Nikolay.Igotti at Sun.COM
Wed Jun 20 03:08:18 PDT 2007
Diego,
I will sponsor your patch for intergation into VM. For your reference
bug id is:
6570964: support for dynamical linking of libstdc++ in VM build on Linux
Thanks,
Nikolay
> Hello,
>
> the attached patch makes the libjvm link stage respect the STATIC_CXX
> value passed by the user during build. While it's true that a package
> that should be deployed on heterogeneous systems is best linked
> statically to GCC's libstdc++, as the ABI is susceptible to changes,
> distributions tend to be able to take care of their ABI and their
> dependencies on their own, so linking shared for them is an advantage.
>
> At the moment, although some parts of openjdk actually follow the
> STATIC_CXX value, libjvm will not link to libstdc++ dynamically, that's
> why the patch is needed.
>
> HTH,
>
> ------------------------------------------------------------------------
>
> Index: openjdk-b13/hotspot/build/linux/makefiles/vm.make
> ===================================================================
> --- openjdk-b13.orig/hotspot/build/linux/makefiles/vm.make
> +++ openjdk-b13/hotspot/build/linux/makefiles/vm.make
> @@ -151,8 +151,14 @@ else
> # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
> # get around library dependency and compatibility issues. Must use gcc not
> # g++ to link.
> - LFLAGS_VM += $(STATIC_LIBGCC)
> - LIBS_VM += $(STATIC_STDCXX) $(LIBS)
> + ifeq ($(STATIC_CXX), true)
> + LFLAGS_VM += $(STATIC_LIBGCC)
> + LIBS_VM += $(STATIC_STDCXX)
> + else
> + LIBS_VM += -lstdc++
> + endif
> +
> + LIBS_VM += $(LIBS)
> endif
>
> LINK_VM = $(LINK_LIB.c)
>
More information about the hotspot-dev
mailing list