diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2019-11-01 20:11:12 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2019-11-01 20:11:12 +0000 |
commit | 8cb850187df47bc81c0d2a9057eb7da91d0a638a (patch) | |
tree | 8800c7fefe0d276d2564bf4c763fe66368b78838 | |
parent | bf5d24ca9f9183338e75a8e55ab7d8e10b69346f (diff) | |
download | gcc-8cb850187df47bc81c0d2a9057eb7da91d0a638a.zip gcc-8cb850187df47bc81c0d2a9057eb7da91d0a638a.tar.gz gcc-8cb850187df47bc81c0d2a9057eb7da91d0a638a.tar.bz2 |
[Darwin, PPC] Allow the user to override the use of hard float in kexts.
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
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index feea93e..6e35c6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,14 @@ 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 2019-06-23 Iain Sandoe <iain@sandoe.co.uk> * config/rs6000/darwin.h: Handle GCC target pragma. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index dae2600..93d7c71 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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 |