From: Iain Sandoe Date: Sat, 3 Aug 2019 19:49:43 +0000 (+0000) Subject: Darwin, ppc, backport fix for codegen in kexts. X-Git-Tag: releases/gcc-9.2.0~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6e4cd610626cca5fe3868a893ceeee4e005d6fa;p=thirdparty%2Fgcc.git Darwin, ppc, backport fix for codegen in kexts. This honours the users choice of float ABI in kexts. 2019-08-03 Iain Sandoe Backport from mainline 2019-06-27 Iain Sandoe * config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour user-specified float mode choice for kernel mode code. From-SVN: r274045 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6bf6118c514c..f930c8b7a617 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-08-03 Iain Sandoe + + Backport from mainline + 2019-06-27 Iain Sandoe + + * config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour + user-specified float mode choice for kernel mode code. + 2019-08-03 Iain Sandoe Backport from mainline diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 68322bb2216c..0442b091781d 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3651,7 +3651,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