aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2019-12-30 22:16:37 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2019-12-30 22:16:37 +0000
commitbbbc05957e55777805cef2d7ea39f1a73604c91a (patch)
treef744cc96d2d499bc85a6853969c8b40a9da82506
parent9905fec4d901d9d9caac74795758e021ef39c25b (diff)
downloadgcc-bbbc05957e55777805cef2d7ea39f1a73604c91a.zip
gcc-bbbc05957e55777805cef2d7ea39f1a73604c91a.tar.gz
gcc-bbbc05957e55777805cef2d7ea39f1a73604c91a.tar.bz2
Arrange to preinclude yvals.h ahead of stdint on VxWorks 7
On Vxworks 7, includers of stdint.h (which we currently "provide") need yvals.h to have been included ahead. Instead of altering the common stdint-gcc.h with unpleasant vxworks specific bits to do that, we arrange to provide stdint-gcc.h on its own along with a stdint.h wrapper which preincludes yvals.h on vx7 then includes stdint-gcc.h. 2019-12-30 Olivier Hainque <hainque@adacore.com> * config/vxworks/stdint.h: New file. Include _yvals.h then stdint-gcc.h. * config/t-vxworks: Arrange to install the stdint.h wrapper. * config.gcc (*-*-vxworks*): Add stdint-gcc.h to $extra_headers so it gets copied. Set use_gcc_stdint to request _not_ crafting stdint.h through the common Makefile rules. From-SVN: r279791
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config.gcc14
-rw-r--r--gcc/config/t-vxworks12
-rw-r--r--gcc/config/vxworks/stdint.h28
4 files changed, 60 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 54f9991..03e3f803 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2019-12-30 Olivier Hainque <hainque@adacore.com>
+ * config/vxworks/stdint.h: New file. Include _yvals.h
+ then stdint-gcc.h.
+ * config/t-vxworks: Arrange to install the stdint.h wrapper.
+ * config.gcc (*-*-vxworks*): Add stdint-gcc.h to $extra_headers
+ so it gets copied. Set use_gcc_stdint to request _not_ crafting
+ stdint.h through the common Makefile rules.
+
+2019-12-30 Olivier Hainque <hainque@adacore.com>
+
* config/vxworks/_yvals.h: New file.
* config/vxworks/_yvals-wrapper.h: New file.
* gcc/config/vxworks/math.h: Use it to wrap the VxWorks
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 42e4251..8c2ff9a 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -962,9 +962,6 @@ case ${target} in
extra_headers="${extra_headers} ../vxworks/vxworks-predef.h"
target_has_targetcm="yes"
- use_gcc_stdint=provide
- tm_file="${tm_file} vxworks-stdint.h"
-
# This private header exposes a consistent interface for checks on
# the VxWorks version our runtime header files need to perform, based on
# what the system headers adverstise:
@@ -982,6 +979,17 @@ case ${target} in
extra_headers="${extra_headers} ../vxworks/math.h ../vxworks/complex.h"
extra_headers="${extra_headers} ../vxworks/inttypes.h ../vxworks/setjmp.h"
+ # We provide stdint.h ...
+
+ tm_file="${tm_file} vxworks-stdint.h"
+
+ # .. only through the yvals conditional wrapping mentioned above
+ # to abide by the VxWorks 7 expectations. The final copy is performed
+ # explicitly by a t-vxworks Makefile rule.
+
+ use_gcc_stdint=none
+ extra_headers="${extra_headers} ../../ginclude/stdint-gcc.h"
+
case ${enable_threads} in
no) ;;
"" | yes | vxworks) thread_file='vxworks' ;;
diff --git a/gcc/config/t-vxworks b/gcc/config/t-vxworks
index ce30338..4f9646d 100644
--- a/gcc/config/t-vxworks
+++ b/gcc/config/t-vxworks
@@ -24,6 +24,18 @@ vxworks-c.o: $(srcdir)/config/vxworks-c.c
$(COMPILE) $<
$(POSTCOMPILE)
+# Arrange to install our stdint.h wrapper, by copying it in the
+# build-time include dir before this include dir is installed and after
+# stmp-int-hdrs removes it (because it was told we don't provide it).
+
+INSTALL_HEADERS += install-stdint.h
+
+install-stdint.h: stmp-int-hdrs
+ cp -p $(srcdir)/config/vxworks/stdint.h include/stdint.h
+ chmod a+r include/stdint.h
+
+$(INSTALL_HEADERS_DIR): install-stdint.h
+
# 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.
diff --git a/gcc/config/vxworks/stdint.h b/gcc/config/vxworks/stdint.h
new file mode 100644
index 0000000..5e0dbdf
--- /dev/null
+++ b/gcc/config/vxworks/stdint.h
@@ -0,0 +1,28 @@
+/* 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 __GCC_STDINT_H
+#define __GCC_STDINT_H
+
+#include <_yvals.h>
+#include <stdint-gcc.h>
+
+#endif