Patchwork PATCH: Include <link.h> only if USE_PT_GNU_EH_FRAME is defined

login
register
mail settings
Submitter H.J. Lu
Date Sept. 7, 2010, 5:34 p.m.
Message ID <AANLkTiktbNmbObYEk3JFH+Ktunf5Rs7Znrx+gyDaGX8i@mail.gmail.com>
Download mbox | patch
Permalink /patch/64038/
State New
Headers show

Comments

H.J. Lu - Sept. 7, 2010, 5:34 p.m.
On Tue, Sep 7, 2010 at 10:09 AM, Richard Henderson <rth@redhat.com> wrote:
> On 09/07/2010 09:38 AM, H.J. Lu wrote:
>>       * unwind-dw2-fde-glibc.c: Include <elf.h> for DT_CONFIG.
>>       Include <link.h> only if USE_PT_GNU_EH_FRAME is defined.
>
> Why is Bionic using unwind-dw2-fde-glibc.c?  The *only* point
> to using that file is PT_GNU_EH_FRAME.  Rather than make this
> change, why not just point Bionic to unwind-dw2-fde.c?
>

Here is the updated patch.  OK for trunk?

Thanks.
Richard Henderson - Sept. 7, 2010, 5:46 p.m.
On 09/07/2010 10:34 AM, H.J. Lu wrote:
> 	* config.gcc: Append t-android for Android targets.
> 
> 	* config/t-android: New.

Ok.


r~

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 9325718..bd4c950 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -551,6 +551,7 @@  case ${target} in
   case $target in
     *-*-*android*)
       tm_defines="$tm_defines ANDROID_DEFAULT=1"
+      tmake_file="${tmake_file} t-android"
       ;;
     *)
       tm_defines="$tm_defines ANDROID_DEFAULT=0"
--- /dev/null	2010-08-30 11:58:42.408289357 -0700
+++ gcc-android/gcc/config/t-android	2010-09-07 10:29:47.234704806 -0700
@@ -0,0 +1,23 @@ 
+# Copyright (C) 2010
+# Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Use unwind-dw2-fde
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
+  $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c