Hi, This patch is for google branches only. It fixes the unsatified symbol in lipo-use ...
12 years, 7 months ago
(2012-09-24 21:40:36 UTC)
#1
Hi,
This patch is for google branches only.
It fixes the unsatified symbol in lipo-use build.
Tested with SPEC and google internal benchmarks.
Thanks,
-Rong
2012-09-24 Rong Xu <xur@google.com>
* gcc/l-ipo.c (cgraph_is_aux_decl_external): output comdat
virtual functions when they are auxiliary modules; otherwise we may
get undefined symbol in linking.
Google ref b/7078882.
Index: gcc/l-ipo.c
===================================================================
--- gcc/l-ipo.c (revision 191679)
+++ gcc/l-ipo.c (working copy)
@@ -1111,16 +1111,16 @@
if (node->is_versioned_clone)
return false;
- /* virtual functions won't be deleted in the primary module. */
- if (DECL_VIRTUAL_P (decl))
- return true;
-
/* Comdat or weak functions in aux modules are not external --
there is no guarantee that the definitition will be emitted
in the primary compilation of this auxiliary module. */
if (DECL_COMDAT (decl) || DECL_WEAK (decl))
return false;
+ /* virtual functions won't be deleted in the primary module. */
+ if (DECL_VIRTUAL_P (decl))
+ return true;
+
if (!TREE_PUBLIC (decl))
return false;
--
This patch is available for review at http://codereview.appspot.com/6562044
ok. David On Mon, Sep 24, 2012 at 2:40 PM, Rong Xu <xur@google.com> wrote: > ...
12 years, 7 months ago
(2012-09-24 21:47:05 UTC)
#2
ok.
David
On Mon, Sep 24, 2012 at 2:40 PM, Rong Xu <xur@google.com> wrote:
> Hi,
>
> This patch is for google branches only.
> It fixes the unsatified symbol in lipo-use build.
> Tested with SPEC and google internal benchmarks.
>
> Thanks,
>
> -Rong
>
>
> 2012-09-24 Rong Xu <xur@google.com>
>
> * gcc/l-ipo.c (cgraph_is_aux_decl_external): output comdat
> virtual functions when they are auxiliary modules; otherwise we may
> get undefined symbol in linking.
> Google ref b/7078882.
>
>
> Index: gcc/l-ipo.c
> ===================================================================
> --- gcc/l-ipo.c (revision 191679)
> +++ gcc/l-ipo.c (working copy)
> @@ -1111,16 +1111,16 @@
> if (node->is_versioned_clone)
> return false;
>
> - /* virtual functions won't be deleted in the primary module. */
> - if (DECL_VIRTUAL_P (decl))
> - return true;
> -
> /* Comdat or weak functions in aux modules are not external --
> there is no guarantee that the definitition will be emitted
> in the primary compilation of this auxiliary module. */
> if (DECL_COMDAT (decl) || DECL_WEAK (decl))
> return false;
>
> + /* virtual functions won't be deleted in the primary module. */
> + if (DECL_VIRTUAL_P (decl))
> + return true;
> +
> if (!TREE_PUBLIC (decl))
> return false;
>
>
> --
> This patch is available for review at http://codereview.appspot.com/6562044
Issue 6562044: [google 4.7] fix unsatified symbols in lipo-use
Created 12 years, 7 months ago by xur
Modified 12 years, 7 months ago
Reviewers: davidxl
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_7/
Comments: 0