Diego and/or Ollie,

This patch adds support for the arm-grtev2-linux-gnueabi configuration.
This is like the x86 linux config of similar 'vendor':
 * it plays some spec games to support easier use of static NSS
   configuration, and
 * it adds RUNTIME_ROOT_PREFIX support to the dynamic loader path.

(technically, linux-elf.h didn't need the RUNTIME_ROOT_PREFIX change,
but i would have felt ... odd making it in linux-eabi.h and not
linux-elf.h)

tested by building a arm-linux-gnueabi compiler (i.e., *not* -grtev2-)
to sanity check that I didn't break that config.  And also building
a -grtev2- compiler as well.


thanks,

chris

[gcc/ChangeLog.google-integration]
2011-06-16  Chris Demetriou  <c...@google.com>

        * config/arm/linux-grtev2.h: New file.
        * config/arm/linux-elf.h (GLIBC_DYNAMIC_LINKER): Prefix with
        RUNTIME_ROOT_PREFIX.
        * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER): Likewise.
        * config/linux-grtev2.h (LIB_SPEC): Update comment about what
        this definition overrides.
        * config.gcc: Use linux-grtev2.h for arm-grtev2-linux-*eabi targets.

Index: config.gcc
===================================================================
--- config.gcc  (revision 175095)
+++ config.gcc  (working copy)
@@ -832,6 +832,12 @@
                tmake_file="$tmake_file arm/t-linux-androideabi"
                ;;
            esac
+           # Pull in spec changes for GRTEv2 configurations.
+           case ${target} in
+           *-grtev2-*)
+               tm_file="${tm_file} linux-grtev2.h arm/linux-grtev2.h"
+               ;;
+           esac
            # The BPABI long long divmod functions return a 128-bit value in
            # registers r0-r3.  Correctly modeling that requires the use of
            # TImode.
Index: config/arm/linux-elf.h
===================================================================
--- config/arm/linux-elf.h      (revision 175095)
+++ config/arm/linux-elf.h      (working copy)
@@ -62,7 +62,7 @@
 
 #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
 
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-linux.so.2"
 
 #define LINUX_TARGET_LINK_SPEC  "%{h*} \
    %{static:-Bstatic} \
Index: config/arm/linux-eabi.h
===================================================================
--- config/arm/linux-eabi.h     (revision 175095)
+++ config/arm/linux-eabi.h     (working copy)
@@ -62,7 +62,7 @@
 /* Use ld-linux.so.3 so that it will be possible to run "classic"
    GNU/Linux binaries on an EABI system.  */
 #undef  GLIBC_DYNAMIC_LINKER
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+#define GLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-linux.so.3"
 
 /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
    use the GNU/Linux version, not the generic BPABI version.  */
Index: config/arm/linux-grtev2.h
===================================================================
--- config/arm/linux-grtev2.h   (revision 0)
+++ config/arm/linux-grtev2.h   (revision 0)
@@ -0,0 +1,27 @@
+/* Definitions for ARM Linux-based GRTE (Google RunTime Environment) version 2.
+   Copyright (C) 2011 Free Software Foundation, Inc.
+   Contributed by Chris Demetriou.
+
+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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+<http://www.gnu.org/licenses/>.  */
+
+#undef SUBSUBTARGET_EXTRA_SPECS
+#define SUBSUBTARGET_EXTRA_SPECS LINUX_GRTE_EXTRA_SPECS
Index: config/linux-grtev2.h
===================================================================
--- config/linux-grtev2.h       (revision 175095)
+++ config/linux-grtev2.h       (working copy)
@@ -23,7 +23,7 @@
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-/* Overrides LIB_SPEC from linux.h.  */
+/* Overrides LIB_SPEC from gnu-user.h.  */
 #undef LIB_SPEC
 #define LIB_SPEC \
   "%{pthread:-lpthread} \

--
This patch is available for review at http://codereview.appspot.com/4628043

Reply via email to