>> +ifeq ($(call cc-option-yn,-mdsp2), y) >> +CFLAGS_signal.o = -mdsp2 -DHAVE_AS_DSP >> +CFLAGS_signal32.o = -mdsp2 -DHAVE_AS_DSP >> +CFLAGS_process.o = -mdsp2 -DHAVE_AS_DSP >> +CFLAGS_branch.o = -mdsp2 -DHAVE_AS_DSP >> +CFLAGS_ptrace.o = -mdsp2 -DHAVE_AS_DSP > > Should not this be -mdspr2 here? My GCC man page suggests that. > Yes, corrected this. > By the way, should not we also check that we are building for a > MIPS32_R2 CPU when checking for -mdsp2? > Yes, fixed this also. > I would simplify this like this: > > ifeq ($(CONFIG_CPU_MIPS32),y) > CFLAGS_DSP = -DHAVE_AS_DSP > ifeq ($(call cc-option-yn,-mdsp),y) > CFLAGS_DSP += -mdsp > endif > ifeq ($(call cc-option-yn,-mdsp2),y) > CFLAGS-DSP += -mdsp2 >endif > > CFLAGS_signal.o = $(CFLAGS_DSP) > ... > CFLAGS_ptrace.o = $(CFLAGS_DSP) > endif > > such that the day you can take advantage of a third DSP flavor it's only > 3 lines worth of Makefile to get it used, and you only have one place > where you need to change CFLAGS. > Good idea, fixed. I have posted a new patch for review. -Steve