Commit 41c1b913 by Olivier Hainque Committed by Olivier Hainque

Setup system header wrappers for C++ on VxWorks

Starting from VxWorks 7, the system comes with a Dinkumware
environment which requires the inclusion of "yvals.h" before other
system headers.  We provide wrapped versions of a few headers to
accommodate such constraints.

2019-12-30  Jerome Lambourg  <lambourg@adaccore.com>
            Olivier Hainque  <hainque@adacore.com>

	gcc/
	* config/vxworks/_yvals.h: New file.
	* config/vxworks/_yvals-wrapper.h: New file.
	* gcc/config/vxworks/math.h: Use it to wrap the VxWorks
	math.h header.
	* gcc/config/vxworks/complex.h: Likewise.
	* gcc/config/vxworks/setjmp.h: Likewise.
	* gcc/config/vxworks/inttypes.h: Likewise.
	* config.gcc (*-*-vxworks*): Add system header wrappers
	to extra_headers.
	(powerpc-*-vxworks*): Reuse the common extra_headers.

From-SVN: r279784
parent abb6c3ee
2019-12-30 Olivier Hainque <hainque@adacore.com> 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
math.h header.
* gcc/config/vxworks/complex.h: Likewise.
* gcc/config/vxworks/setjmp.h: Likewise.
* gcc/config/vxworks/inttypes.h: Likewise.
* config.gcc (*-*-vxworks*): Add system header wrappers
to extra_headers.
(powerpc-*-vxworks*): Reuse the common extra_headers.
2019-12-30 Olivier Hainque <hainque@adacore.com>
* config/vxworks/_vxworks-versions.h: New file. * config/vxworks/_vxworks-versions.h: New file.
* config.gcc (*-*-vxworks*): Add it to extra_headers. * config.gcc (*-*-vxworks*): Add it to extra_headers.
...@@ -953,12 +953,15 @@ case ${target} in ...@@ -953,12 +953,15 @@ case ${target} in
*-*-vxworks*) *-*-vxworks*)
tmake_file=t-vxworks tmake_file=t-vxworks
xm_defines=POSIX xm_defines=POSIX
extra_options="${extra_options} vxworks.opt" extra_options="${extra_options} vxworks.opt"
extra_objs="$extra_objs vxworks.o" extra_objs="$extra_objs vxworks.o"
c_target_objs="${c_target_objs} vxworks-c.o" c_target_objs="${c_target_objs} vxworks-c.o"
cxx_target_objs="${cxx_target_objs} vxworks-c.o" cxx_target_objs="${cxx_target_objs} vxworks-c.o"
extra_headers="${extra_headers} ../vxworks/vxworks-predef.h" extra_headers="${extra_headers} ../vxworks/vxworks-predef.h"
target_has_targetcm="yes" target_has_targetcm="yes"
use_gcc_stdint=provide use_gcc_stdint=provide
tm_file="${tm_file} vxworks-stdint.h" tm_file="${tm_file} vxworks-stdint.h"
...@@ -968,6 +971,17 @@ case ${target} in ...@@ -968,6 +971,17 @@ case ${target} in
extra_headers="${extra_headers} ../vxworks/_vxworks-versions.h" extra_headers="${extra_headers} ../vxworks/_vxworks-versions.h"
# Starting from VxWorks 7, the system comes with a Dinkumware
# environment which requires the inclusion of "yvals.h" before other
# system headers. We provide wrapped versions of a few headers to
# accomodate such constraints:
extra_headers="${extra_headers} ../vxworks/_yvals.h"
extra_headers="${extra_headers} ../vxworks/_yvals-wrapper.h"
extra_headers="${extra_headers} ../vxworks/math.h ../vxworks/complex.h"
extra_headers="${extra_headers} ../vxworks/inttypes.h ../vxworks/setjmp.h"
case ${enable_threads} in case ${enable_threads} in
no) ;; no) ;;
"" | yes | vxworks) thread_file='vxworks' ;; "" | yes | vxworks) thread_file='vxworks' ;;
...@@ -2930,7 +2944,7 @@ powerpc-wrs-vxworks*) ...@@ -2930,7 +2944,7 @@ powerpc-wrs-vxworks*)
tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h" tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks" tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
extra_options="${extra_options} rs6000/sysv4.opt" extra_options="${extra_options} rs6000/sysv4.opt"
extra_headers=ppc-asm.h extra_headers="${extra_headers} ppc-asm.h"
case ${target} in case ${target} in
*-vxworksmils*) *-vxworksmils*)
tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h" tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment