diff options
author | Bill Schmidt <wschmidt@linux.ibm.com> | 2021-05-13 13:10:10 -0500 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.ibm.com> | 2021-05-15 14:05:05 -0500 |
commit | 3ec3a9feb83d98715c97c0df4ae751a4eb582956 (patch) | |
tree | 4c1b6d2af19df91d050849801f22f946d547ab94 /gcc | |
parent | af979a98bce444082cd5fc5d358dcdf3f65fdfce (diff) | |
download | gcc-3ec3a9feb83d98715c97c0df4ae751a4eb582956.zip gcc-3ec3a9feb83d98715c97c0df4ae751a4eb582956.tar.gz gcc-3ec3a9feb83d98715c97c0df4ae751a4eb582956.tar.bz2 |
rs6000: Conditionally define __ROP_PROTECT__
2021-05-13 Bill Schmidt <wschmidt@linux.ibm.com>
gcc/
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define
__ROP_PROTECT__ if -mrop-protect is selected.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000-c.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index 0f8a629..afcb5bb 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -602,6 +602,9 @@ rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags, /* Whether pc-relative code is being generated. */ if ((flags & OPTION_MASK_PCREL) != 0) rs6000_define_or_undefine_macro (define_p, "__PCREL__"); + /* Tell the user -mrop-protect is in play. */ + if (rs6000_rop_protect) + rs6000_define_or_undefine_macro (define_p, "__ROP_PROTECT__"); } void |