MIPS compiler flags: use -mfp32, -mfp64, or -mfpxx only if -mhard-float

is used.

-mfp32, -mfp64, and -mfpxx only make sense if the FPU is used.

R=brettw@chromium.org,petarj@mips.com
BUG=446234

Review URL: https://codereview.chromium.org/975183002

Cr-Original-Commit-Position: refs/heads/master@{#319227}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 07fce68bd04aa5b28916f76173b0c6ead60eddde
This commit is contained in:
wtc 2015-03-04 22:33:36 -08:00 коммит произвёл Commit bot
Родитель a353087c19
Коммит a406c34887
2 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -2302,13 +2302,13 @@
'arm_thumb%': 1,
}],
# Set default compiler flags depending on MIPS architecture variant.
['target_arch=="mipsel" and mips_arch_variant=="r2" and android_webview_build==0', {
'mips_fpu_mode%': 'fp32',
}],
# Set default compiler flags for MIPS floating-point support.
['target_arch=="mipsel" and android_webview_build==0', {
'mips_float_abi%': 'hard',
}],
['target_arch=="mipsel" and mips_arch_variant=="r2" and android_webview_build==0', {
'mips_fpu_mode%': 'fp32',
}],
['android_webview_build==1', {
# The WebView build gets its cpu-specific flags from the Android build system.
@ -2317,8 +2317,8 @@
'arm_fpu%': '',
'arm_float_abi%': '',
'arm_thumb%': 0,
'mips_fpu_mode%': '',
'mips_float_abi%': '',
'mips_fpu_mode%': '',
}],
# Enable brlapi by default for chromeos.
@ -4081,7 +4081,7 @@
['mips_arch_variant=="r2"', {
'cflags': ['-mips32r2', '-Wa,-mips32r2'],
'conditions': [
['mips_fpu_mode!=""', {
['mips_float_abi=="hard" and mips_fpu_mode!=""', {
'cflags': ['-m<(mips_fpu_mode)'],
}],
],

Просмотреть файл

@ -302,7 +302,7 @@ config("compiler") {
"-mips32r2",
"-Wa,-mips32r2",
]
if (mips_fpu_mode != "") {
if (mips_float_abi == "hard" && mips_fpu_mode != "") {
cflags += [ "-m$mips_fpu_mode" ]
}
} else if (mips_arch_variant == "r1") {