summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-03-26 14:57:16 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-03-29 22:37:53 +0900
commit734f3719d3438f9cc181d674c33ca9762e9148a1 (patch)
treef94621b2b3685f0c455ca28a3cf9ef787c8d0659 /drivers/net/wan
parent63b903dfebdea92aa92ad337d8451a6fbfeabf9d (diff)
net: wan: wanxl: use $(M68KCC) instead of $(M68KAS) for rebuilding firmware
The firmware source, wanxlfw.S, is currently compiled by the combo of $(CPP) and $(M68KAS). This is not what we usually do for compiling *.S files. In fact, this Makefile is the only user of $(AS) in the kernel build. Instead of combining $(CPP) and (AS) from different tool sets, using $(M68KCC) as an assembler driver is simpler, and saner. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index 995277c657a1..cf7a0a65aae8 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -40,16 +40,16 @@ $(obj)/wanxl.o: $(obj)/wanxlfw.inc
ifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y)
ifeq ($(ARCH),m68k)
- M68KAS = $(AS)
+ M68KCC = $(CC)
M68KLD = $(LD)
else
- M68KAS = $(CROSS_COMPILE_M68K)as
+ M68KCC = $(CROSS_COMPILE_M68K)gcc
M68KLD = $(CROSS_COMPILE_M68K)ld
endif
quiet_cmd_build_wanxlfw = BLD FW $@
cmd_build_wanxlfw = \
- $(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(M68KAS) -m68360 -o $(obj)/wanxlfw.o; \
+ $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $(obj)/wanxlfw.o $<; \
$(M68KLD) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \
rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o