@@ -955,6 +955,10 @@ case ${target} in
xm_defines=POSIX
extra_options="${extra_options} vxworks.opt"
extra_objs="$extra_objs vxworks.o"
+ c_target_objs="${c_target_objs} vxworks-c.o"
+ cxx_target_objs="${cxx_target_objs} vxworks-c.o"
+ extra_headers="${extra_headers} ../vxworks/vxworks-predef.h"
+ target_has_targetcm="yes"
use_gcc_stdint=provide
tm_file="${tm_file} vxworks-stdint.h"
case ${enable_threads} in
@@ -20,6 +20,10 @@ vxworks.o: $(srcdir)/config/vxworks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TARGET_H) output.h $(TM_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+vxworks-c.o: $(srcdir)/config/vxworks-c.c
+ $(COMPILE) $<
+ $(POSTCOMPILE)
+
# Both the kernel and RTP headers provide limits.h. They embed VxWorks
# specificities and are dated on some configurations so we both need to
# provide our own version and make sure the system one gets exposed.
new file mode 100644
@@ -0,0 +1,37 @@
+/* C-family target hooks initializer for VxWorks targets.
+ Copyright (C) 2019 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 "c-family/c-target.h"
+#include "c-family/c-target-def.h"
+
+/* Implement TARGET_C_PREINCLUDE for vxworks targets. */
+
+static const char *
+vxworks_c_preinclude (void)
+{
+ return "vxworks-predef.h";
+}
+
+#undef TARGET_C_PREINCLUDE
+#define TARGET_C_PREINCLUDE vxworks_c_preinclude
+
+struct gcc_targetcm targetcm = TARGETCM_INITIALIZER;
new file mode 100644
@@ -0,0 +1,32 @@
+/* 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/>. */
+
+#ifndef _VXWORKS_PREDEF_H
+#define _VXWORKS_PREDEF_H 1
+
+#define __STDC_IEC_559__ 1
+#define __STDC_IEC_559_COMPLEX__ 1
+
+/* Define the value of the following macro to match the value
+ that the OS actually defines it as. */
+#define __STDC_ISO_10646__ 200009L
+
+#endif