]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Darwin, PPC] Allow the user to override the use of hard float in kexts.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 1 Nov 2019 20:11:12 +0000 (20:11 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Fri, 1 Nov 2019 20:11:12 +0000 (20:11 +0000)
The default for the kernel is soft-float, however a user writing a kernel
extension might want to make use of hard float. This aligns GCC with the
system tools and makes ' -mkernel -mhard-float ' work as expected.

gcc/

2019-11-01  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-27  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour
user-specified float mode choice for kernel mode code.

From-SVN: r277718

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index feea93ebc4f1622a848ff0c4c8eb4ab323abccc9..6e35c6c7f193c2394f4da97fb6ffdcc7f359e4bb 100644 (file)
@@ -1,3 +1,11 @@
+2019-11-01  Iain Sandoe  <iain@sandoe.co.uk>
+
+       Backport from mainline
+       2019-06-27  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour
+       user-specified float mode choice for kernel mode code.
+
 2019-11-01  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline
index dae2600ca77e8a2011be13a7d576b439f4f58587..93d7c714862468deea54ba84a6c0f69ba3a33fd6 100644 (file)
@@ -3846,7 +3846,10 @@ darwin_rs6000_override_options (void)
   if (flag_mkernel)
     {
       rs6000_default_long_calls = 1;
-      rs6000_isa_flags |= OPTION_MASK_SOFT_FLOAT;
+
+      /* Allow a kext author to do -mkernel -mhard-float.  */
+      if (! (rs6000_isa_flags_explicit & OPTION_MASK_SOFT_FLOAT))
+        rs6000_isa_flags |= OPTION_MASK_SOFT_FLOAT;
     }
 
   /* Make -m64 imply -maltivec.  Darwin's 64-bit ABI includes