]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 10 Jul 2003 04:50:15 +0000 (04:50 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 10 Jul 2003 04:50:15 +0000 (04:50 +0000)
2001-12-13  Alexandre Oliva  <aoliva@redhat.com>
* config/mn10300/linux.h (LINK_SPEC): Rename the dynamic linker
from ld-linux.so.2 to ld.so.1.
2001-11-18  Alexandre Oliva  <aoliva@redhat.com>
* config/mn10300/linux.h (LINK_SPEC): -lpthread, not -lthread.
* config/mn10300/linux.h (LINK_SPEC): Don't handle -Wl,-rpath
nor -Wl,-rpath-link.
(LIB_SPEC): Add -rpath-link if !static.
2001-08-22  Alexandre Oliva  <aoliva@redhat.com>
* config/mn10300/mn10300.c (mn10300_protect_label): New
variable.
* config/mn10300/linux.h (PRINT_OPERAND,
PRINT_OPERAND_ADDRESS): Set it during their execution.
(ASM_OUTPUT_LABELREF): Output `+' before symbol name if
mn10300_protect_label is set.
* config/mn10300/linux.h (LINK_SPEC): Recognize -Wl,-rpath and
-Wl,-rpath-link.
(LIB_SPEC, STARTFILE_SPEC): Define.
2001-05-11  Alexandre Oliva  <aoliva@redhat.com>
* config/mn10300/t-linux (dp-bit.c, fp-bit.c): Don't define
FLOAT_BIT_ORDER_MISMATCH.
2001-05-09  Alexandre Oliva  <aoliva@redhat.com>
* config.gcc (am33_2.0-*-linux*): Added.
* config/mn10300/linux.h: New.
* config/mn10300/t-linux: New.

From-SVN: r69171

gcc/ChangeLog
gcc/config.gcc
gcc/config/mn10300/linux.h [new file with mode: 0644]
gcc/config/mn10300/mn10300.c
gcc/config/mn10300/t-linux [new file with mode: 0644]

index 312c138b6709fb9c2c243f71066cd34eafb4a857..8080d8860b39d049d360e017e41488e23cedc030 100644 (file)
@@ -1,3 +1,31 @@
+2003-07-10  Alexandre Oliva  <aoliva@redhat.com>
+
+       2001-12-13  Alexandre Oliva  <aoliva@redhat.com>
+       * config/mn10300/linux.h (LINK_SPEC): Rename the dynamic linker
+       from ld-linux.so.2 to ld.so.1.
+       2001-11-18  Alexandre Oliva  <aoliva@redhat.com>
+       * config/mn10300/linux.h (LINK_SPEC): -lpthread, not -lthread.
+       * config/mn10300/linux.h (LINK_SPEC): Don't handle -Wl,-rpath
+       nor -Wl,-rpath-link.
+       (LIB_SPEC): Add -rpath-link if !static.
+       2001-08-22  Alexandre Oliva  <aoliva@redhat.com>
+       * config/mn10300/mn10300.c (mn10300_protect_label): New
+       variable.
+       * config/mn10300/linux.h (PRINT_OPERAND,
+       PRINT_OPERAND_ADDRESS): Set it during their execution.
+       (ASM_OUTPUT_LABELREF): Output `+' before symbol name if
+       mn10300_protect_label is set.
+       * config/mn10300/linux.h (LINK_SPEC): Recognize -Wl,-rpath and
+       -Wl,-rpath-link.
+       (LIB_SPEC, STARTFILE_SPEC): Define.
+       2001-05-11  Alexandre Oliva  <aoliva@redhat.com>
+       * config/mn10300/t-linux (dp-bit.c, fp-bit.c): Don't define
+       FLOAT_BIT_ORDER_MISMATCH.
+       2001-05-09  Alexandre Oliva  <aoliva@redhat.com>
+       * config.gcc (am33_2.0-*-linux*): Added.
+       * config/mn10300/linux.h: New.
+       * config/mn10300/t-linux: New.
+
 2003-07-10  Andreas Jaeger  <aj@suse.de>
 
        * fold-const.c: Properly wrap prototypes.
index 3a834d4d19e50e9de84c8c2b0ee0803d91f6f010..04992e22575d6a5dc5dd41bee22ec9f73da0984a 100644 (file)
@@ -276,6 +276,9 @@ alpha*-*-*)
        cpu_type=alpha
        need_64bit_hwint=yes
        ;;
+am33_2.0-*-linux*)
+       cpu_type=mn10300
+       ;;
 strongarm*-*-*)
        cpu_type=arm
        ;;
@@ -2151,6 +2154,16 @@ xtensa-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h"
        tmake_file="t-slibgcc-elf-ver t-linux xtensa/t-xtensa xtensa/t-linux"
        ;;
+am33_2.0-*-linux*)
+       tm_file="mn10300/mn10300.h dbxelf.h elfos.h linux.h mn10300/linux.h"
+       tmake_file="t-linux mn10300/t-linux"
+       gas=yes gnu_ld=yes
+       if test x$enable_threads = xyes; then
+               thread_file='posix'
+       fi
+       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+       use_collect2=no
+       ;;
 *)
        echo "*** Configuration $machine not supported" 1>&2
        exit 1
diff --git a/gcc/config/mn10300/linux.h b/gcc/config/mn10300/linux.h
new file mode 100644 (file)
index 0000000..1ae5b01
--- /dev/null
@@ -0,0 +1,116 @@
+/* Definitions of taret machine for GNU compiler.
+   Matsushita AM33/2.0
+   Copyright 2001, 2002 Free Software Foundation, Inc.
+   Contributed by Alexandre Oliva <aoliva@redhat.com>
+
+   This file is part of GNU CC.
+
+   GNU CC 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 2, or (at your option)
+   any later version.
+
+   GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+   the Free Software Foundation, 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+   
+#undef  PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
+#define TARGET_OS_CPP_BUILTINS()               \
+    do                                         \
+      {                                                \
+       builtin_define_std ("unix");            \
+       builtin_define_std ("linux");           \
+       builtin_define ("__gnu_linux__");       \
+       builtin_assert ("system=unix");         \
+       builtin_assert ("system=posix");        \
+      }                                                \
+    while (0)
+
+#undef  CPP_SPEC
+#define CPP_SPEC "%{mam33:-D__AM33__} %{!mam33:-D__AM33__=2 -D__AM33_2__} \
+  %{posix:-D_POSIX_SOURCE} \
+  %{pthread:-D_REENTRANT -D_PTHREADS}"
+
+#undef  ASM_SPEC
+#define ASM_SPEC "%{Wa,*:%*}"
+
+#undef  LINK_SPEC
+#define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
+   %{!static: \
+     %{rdynamic:-export-dynamic} \
+     %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+   %{static:-static}"
+
+#undef  LIB_SPEC
+#define LIB_SPEC \
+  "%{shared: -lc} \
+   %{!static:-rpath-link %R/lib:%R/usr/lib} \
+   %{!shared: %{pthread:-lpthread} \
+     %{profile:-lc_p} %{!profile: -lc}}"
+
+#undef  STARTFILE_SPEC
+#define STARTFILE_SPEC \
+  "%{!shared: \
+     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
+                      %{!p:%{profile:gcrt1.o%s} \
+                        %{!profile:crt1.o%s}}}} \
+   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+
+#undef  TARGET_SWITCHES
+#define TARGET_SWITCHES        \
+  {{ "am33",           -0x4,   N_("Target the AM33 processor") }, \
+   { "am33-2",         6,      N_("Target the AM33/2.0 processor") }, \
+   { "relax",          0,      N_("Enable linker relaxations") }, \
+   { "", TARGET_DEFAULT, NULL }}
+
+#undef  TARGET_DEFAULT
+#define TARGET_DEFAULT 6
+
+#undef  TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (AM33/2.0 GNU/Linux)");
+
+#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
+
+extern int mn10300_protect_label;
+
+#undef  PRINT_OPERAND
+#define PRINT_OPERAND(FILE, X, CODE)           \
+  do                                           \
+    {                                          \
+      mn10300_protect_label = 1;               \
+      print_operand ((FILE), (X), (CODE));     \
+      mn10300_protect_label = 0;               \
+    }                                          \
+  while (0)
+
+#undef  PRINT_OPERAND_ADDRESS
+#define PRINT_OPERAND_ADDRESS(FILE, X)         \
+  do                                           \
+    {                                          \
+      mn10300_protect_label = 1;               \
+      print_operand_address ((FILE), (X));     \
+      mn10300_protect_label = 0;               \
+    }                                          \
+   while (0)
+
+#undef  ASM_OUTPUT_LABELREF
+#define ASM_OUTPUT_LABELREF(FILE, NAME)                \
+  do                                           \
+    {                                          \
+      const char * real_name;                  \
+                                               \
+      real_name = (*targetm.strip_name_encoding) (NAME);       \
+      if (mn10300_protect_label)               \
+        asm_fprintf (FILE, "+");               \
+      asm_fprintf (FILE, "%U%s", real_name);   \
+    }                                          \
+  while (0)           
+
index e4ef4bffe8bef56ebd4f2425d2ef2f0d59f5dc40..fc22324c47e2910e2d13a7bcc974c494130fb282 100644 (file)
@@ -48,6 +48,12 @@ Boston, MA 02111-1307, USA.  */
    UNSPEC_INT_LABELs.  */
 int mn10300_unspec_int_label_counter;
 
+/* This is used in the am33_2.0-linux-gnu port, in which global symbol
+   names are not prefixed by underscores, to tell whether to prefix a
+   label with a plus sign or not, so that the assembler can tell
+   symbol names from register names.  */
+int mn10300_protect_label;
+
 /* The size of the callee register save area.  Right now we save everything
    on entry since it costs us nothing in code size.  It does cost us from a
    speed standpoint, so we want to optimize this sooner or later.  */
diff --git a/gcc/config/mn10300/t-linux b/gcc/config/mn10300/t-linux
new file mode 100644 (file)
index 0000000..a80c1cf
--- /dev/null
@@ -0,0 +1,11 @@
+# We want fine grained libraries, so use the new code to build the
+# floating point emulation libraries.
+FPBIT = fp-bit.c
+DPBIT = dp-bit.c
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+       cat $(srcdir)/config/fp-bit.c > dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+       echo '#define FLOAT' > fp-bit.c
+       cat $(srcdir)/config/fp-bit.c >> fp-bit.c