@@ -734,6 +734,7 @@ case ${target} in
yes) thread_file='rtems' ;;
esac
extra_options="${extra_options} rtems.opt"
+ extra_objs="rtems.o"
use_gcc_stdint=wrap
;;
*-*-uclinux*)
@@ -27,3 +27,6 @@
builtin_assert ("system=rtems"); \
TARGET_BPABI_CPP_BUILTINS(); \
} while (0)
+
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS RTEMS_OVERRIDE_OPTIONS
@@ -34,6 +34,9 @@
} \
while (0)
+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
+#define SUBSUBTARGET_OVERRIDE_OPTIONS RTEMS_OVERRIDE_OPTIONS
+
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_rtems)"
new file mode 100644
@@ -0,0 +1,37 @@
+/* Common RTEMS target definitions for GNU compiler.
+ Copyright (C) 2013 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/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "target.h"
+#include "tm.h"
+
+void
+rtems_override_options (void)
+{
+ /* Use strict DWARF-2 unless specifically selected. This is a
+ workaround for a lack of tool support. */
+
+ if (!global_options_set.x_dwarf_strict)
+ dwarf_strict = 1;
+
+ if (!global_options_set.x_dwarf_version)
+ dwarf_version = 2;
+}
@@ -43,3 +43,7 @@ along with GCC; see the file COPYING3. If not see
-lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
#define TARGET_POSIX_IO
+
+/* Do RTEMS specific parts of TARGET_OPTION_OVERRIDE. */
+extern void rtems_override_options (void);
+#define RTEMS_OVERRIDE_OPTIONS rtems_override_options ()
@@ -29,5 +29,8 @@ along with GCC; see the file COPYING3. If not see
} \
while (0)
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS RTEMS_OVERRIDE_OPTIONS
+
/* Use the default */
#undef LINK_GCC_C_SEQUENCE_SPEC
@@ -1,2 +1,6 @@
# RTEMS always has limits.h.
LIMITS_H_TEST = true
+
+rtems.o: $(srcdir)/config/rtems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TARGET_H) $(TM_H)
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<