mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-01-08 13:33:01 -06:00
Use gcc -x assembler-with-cpp instead of gcc -E --traditional
This patch makes it so we use "gcc -x assembler-with-cpp" to build our .S files, instead of translating them to .s files and assembling directly. This allows us to use header files and simple symbolic arithmetic more conveniently in .S files, and at the same time reduces the number of temporary files created when building. Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
59a0996070
commit
f96c5b5093
@ -75,16 +75,14 @@ all: memtest.bin memtest.efi
|
||||
-include $(subst .o,.d,$(TST_OBJS))
|
||||
-include $(subst .o,.d,$(APP_OBJS))
|
||||
|
||||
boot/%.o: boot/%.s
|
||||
$(AS) $< -o $@
|
||||
|
||||
boot/startup.s: ../boot/startup32.S ../boot/boot.h
|
||||
boot/startup.o: ../boot/startup32.S ../boot/boot.h
|
||||
@mkdir -p boot
|
||||
$(CC) -m32 -E -traditional -I../boot -o $@ $<
|
||||
$(CC) -m32 -x assembler-with-cpp -c -I../boot -o $@ $<
|
||||
|
||||
boot/%.s: ../boot/%.S ../boot/boot.h
|
||||
boot/%.o: ../boot/%.S ../boot/boot.h
|
||||
@mkdir -p boot
|
||||
$(CC) -m32 -E -traditional -I../boot -o $@ $<
|
||||
$(CC) -m32 -x assembler-with-cpp -c -I../boot -o $@ $<
|
||||
|
||||
boot/efisetup.o: ../boot/efisetup.c
|
||||
@mkdir -p boot
|
||||
|
@ -74,16 +74,13 @@ all: memtest.bin memtest.efi
|
||||
-include $(subst .o,.d,$(TST_OBJS))
|
||||
-include $(subst .o,.d,$(APP_OBJS))
|
||||
|
||||
boot/%.o: boot/%.s
|
||||
$(AS) $< -o $@
|
||||
|
||||
boot/startup.s: ../boot/startup64.S ../boot/boot.h
|
||||
boot/startup.o: ../boot/startup64.S ../boot/boot.h
|
||||
@mkdir -p boot
|
||||
$(CC) -E -traditional -I../boot -o $@ $<
|
||||
$(CC) -x assembler-with-cpp -c -I../boot -o $@ $<
|
||||
|
||||
boot/%.s: ../boot/%.S ../boot/boot.h
|
||||
boot/%.o: ../boot/%.S ../boot/boot.h
|
||||
@mkdir -p boot
|
||||
$(CC) -E -traditional -I../boot -o $@ $<
|
||||
$(CC) -x assembler-with-cpp -c -I../boot -o $@ $<
|
||||
|
||||
boot/efisetup.o: ../boot/efisetup.c
|
||||
@mkdir -p boot
|
||||
|
Loading…
Reference in New Issue
Block a user