aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2019-09-17 08:13:11 +0000
committerChristophe Lyon <clyon@gcc.gnu.org>2019-09-17 10:13:11 +0200
commitecd4d80cb2ee6a72d46c59eff47860d2a0fa2daa (patch)
tree5fac2281ce67a8f61c1a8448e6d4384735ab5814 /gcc
parent8054d17a735e4e1a35e9a24556eea100249345ed (diff)
downloadgcc-ecd4d80cb2ee6a72d46c59eff47860d2a0fa2daa.zip
gcc-ecd4d80cb2ee6a72d46c59eff47860d2a0fa2daa.tar.gz
gcc-ecd4d80cb2ee6a72d46c59eff47860d2a0fa2daa.tar.bz2
[PR91749][arm] FDPIC: Handle -mflip-thumb
2019-09-16 Christophe Lyon <christophe.lyon@linaro.org> PR target/91749 * config/arm/arm.c (arm_valid_target_attribute_rec): Make sure the mode attributed is supported by FDPIC. From-SVN: r275799
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3a9e637..144ed9b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-09-17 Christophe Lyon <christophe.lyon@linaro.org>
+
+ PR target/91749
+ * config/arm/arm.c (arm_valid_target_attribute_rec): Make sure the
+ mode attributed is supported by FDPIC.
+
2019-09-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/91790
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index db7de5e..b59778c 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -31179,7 +31179,11 @@ arm_valid_target_attribute_rec (tree args, struct gcc_options *opts)
{
argstr = NULL;
if (!strcmp (q, "thumb"))
- opts->x_target_flags |= MASK_THUMB;
+ {
+ opts->x_target_flags |= MASK_THUMB;
+ if (TARGET_FDPIC && !arm_arch_thumb2)
+ sorry ("FDPIC mode is not supported in Thumb-1 mode");
+ }
else if (!strcmp (q, "arm"))
opts->x_target_flags &= ~MASK_THUMB;