Bring code model selection logic to vxworks.h as well.

Tested with ppc- and ppc64-vxworks7r2.
Approved off-list by Olivier Hainque.
I'll put it in unless where are objections.


for  gcc/ChangeLog

        * config/rs6000/vxworks.h (TARGET_CMODEL, SET_CMODEL): Define.
---
 gcc/config/rs6000/vxworks.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h
index e77247b726ea6..9eb074be31a89 100644
--- a/gcc/config/rs6000/vxworks.h
+++ b/gcc/config/rs6000/vxworks.h
@@ -267,6 +267,11 @@ along with GCC; see the file COPYING3.  If not see
 #undef DOT_SYMBOLS
 #define DOT_SYMBOLS 0
 
+/* Allow code model to be selected.  */
+#undef TARGET_CMODEL
+#define TARGET_CMODEL rs6000_current_cmodel
+#define SET_CMODEL(opt) rs6000_current_cmodel = opt
+
 /* For link specs, we leverage the linux configuration bits through
    LINK_OS_EXTRA_SPEC32/64 and need to cancel the default %(link_os)
    expansion in VXWORKS_LINK_SPEC.  */


-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to