From: Olivier Hainque Date: Mon, 30 Dec 2019 21:46:21 +0000 (+0000) Subject: Setup system header wrappers for C++ on VxWorks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41c1b913448a04a85580565796b8e76284bf3bb9;p=gcc.git 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 Olivier Hainque 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee7346a2a60..54f99916ae3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2019-12-30 Olivier Hainque + + * 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 * config/vxworks/_vxworks-versions.h: New file. diff --git a/gcc/config.gcc b/gcc/config.gcc index f4f58d2b185..42e4251a3a6 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -953,12 +953,15 @@ case ${target} in *-*-vxworks*) tmake_file=t-vxworks 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" @@ -968,6 +971,17 @@ case ${target} in 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 no) ;; "" | yes | vxworks) thread_file='vxworks' ;; @@ -2930,7 +2944,7 @@ powerpc-wrs-vxworks*) 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" extra_options="${extra_options} rs6000/sysv4.opt" - extra_headers=ppc-asm.h + extra_headers="${extra_headers} ppc-asm.h" case ${target} in *-vxworksmils*) tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"