diff --git a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile index eceb383..d693551 100644 --- a/arch/parisc/kernel/Makefile +++ b/arch/parisc/kernel/Makefile @@ -18,3 +18,24 @@ obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_64BIT) += binfmt_elf32.o sys_parisc32.o signal32.o # only supported for PCX-W/U in 64-bit mode at the moment obj-$(CONFIG_64BIT) += perf.o perf_asm.o + + +# HACK +# +# When the ADDIB etc. macros are used like "ADDIB=" for 64-bit code, the C +# preprocessor will translate this to "addib,* =" instead of "addib,*=", +# to avoid inadvertent token pasting ("*=" is one single token, in C). +# This isn't C code and we need those characters pasted together, so let's +# do a little sed. + +quiet_cmd_mangle = MANGLE $@ + cmd_mangle = sed "s@,\* =@,*=@" $< > $@ + +$(obj)/pacache.o $(obj)/entry.o: $(obj)/%.o: $(obj)/%_mangled.s + $(call if_changed,as_o_S) + +$(obj)/pacache_mangled.s $(obj)/entry_mangled.s: $(obj)/%_mangled.s: $(obj)/%.s + $(call if_changed,mangle) + +$(obj)/pacache.s $(obj)/entry.s: $(obj)/%.s: $(src)/%.S + $(call if_changed,as_s_S)