Skip to content

Commit 67fc5dc

Browse files
committed
MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds
When generating vdso-o32.lds & vdso-n32.lds for use with programs running as compat ABIs under 64b kernels, we previously haven't included the compiler flags that are supposedly common to all ABIs - ie. those in the ccflags-vdso variable. This is problematic in cases where we need to provide the -m%-float flag in order to ensure that we don't attempt to use a floating point ABI that's incompatible with the target CPU & ABI. For example a toolchain using current gcc trunk configured --with-fp-32=xx fails to build a 64r6el_defconfig kernel with the following error: cc1: error: '-march=mips1' requires '-mfp32' make[2]: *** [arch/mips/vdso/Makefile:135: arch/mips/vdso/vdso-o32.lds] Error 1 Include $(ccflags-vdso) for the compat VDSO .lds builds, just as it is included for the native VDSO .lds & when compiling objects for the compat VDSOs. This ensures we consistently provide the -msoft-float flag amongst others, avoiding the problem by ensuring we're agnostic to the toolchain defaults. Signed-off-by: Paul Burton <paul.burton@mips.com> Fixes: ebb5e78 ("MIPS: Initial implementation of a VDSO") Cc: linux-mips@vger.kernel.org Cc: Kevin Hilman <khilman@baylibre.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Maciej W . Rozycki <macro@linux-mips.org> Cc: stable@vger.kernel.org # v4.4+
1 parent 0648e50 commit 67fc5dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/vdso/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ $(obj)/%-o32.o: $(src)/%.c FORCE
130130
$(call cmd,force_checksrc)
131131
$(call if_changed_rule,cc_o_c)
132132

133-
$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := -mabi=32
133+
$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=32
134134
$(obj)/vdso-o32.lds: $(src)/vdso.lds.S FORCE
135135
$(call if_changed_dep,cpp_lds_S)
136136

@@ -170,7 +170,7 @@ $(obj)/%-n32.o: $(src)/%.c FORCE
170170
$(call cmd,force_checksrc)
171171
$(call if_changed_rule,cc_o_c)
172172

173-
$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := -mabi=n32
173+
$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=n32
174174
$(obj)/vdso-n32.lds: $(src)/vdso.lds.S FORCE
175175
$(call if_changed_dep,cpp_lds_S)
176176

0 commit comments

Comments
 (0)