]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR91749][arm] FDPIC: Handle -mflip-thumb
authorclyon <clyon@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Sep 2019 08:13:11 +0000 (08:13 +0000)
committerclyon <clyon@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Sep 2019 08:13:11 +0000 (08:13 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275799 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/arm.c

index 3a9e63783f391f491cf7932b8bbe923880c6330f..144ed9bb861a49595d7eaa217c79bba18a2563fc 100644 (file)
@@ -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
index db7de5e4a80e2b06fcd18c76256d3166fa3f386d..b59778cc77b4de16f31915d8c763be748946ffb4 100644 (file)
@@ -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;