diff mbox

[RFC,v2,21/27] Add Makerules to build %.o and %.os from %.i8

Message ID 1465814311-31470-22-git-send-email-gbenson@redhat.com
State New
Headers show

Commit Message

Gary Benson June 13, 2016, 10:38 a.m. UTC
This commit adds make rules to build %.o and %.os files from %.i8
Infinity note source code.

In order to ensure the correct preprocessor and assembler are used
for cross-builds the compilation is done in three stages.  The target
preprocessor specified at ./configure time is used to preprocess the
%.i8 source; I8C consumes this preprocessed source and emits assembly
language; and finally the target assembler specified at ./configure
time is used to assemble the generated assembly language into object
code.

This patch differs from the previous version
<https://sourceware.org/ml/libc-alpha/2015-10/msg00705.html>
in the following ways:

 * The infinity-%.S => infinity-%.o and infinity-%.os rules are
   no longer necessary and have been removed.

 * "-include sysdep.h" is passed to I8C to ensure the correct
   assembler directives for ARM are included.
---
 Makerules |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/Makerules b/Makerules
index 53eabfa..cf74228 100644
--- a/Makerules
+++ b/Makerules
@@ -1539,6 +1539,14 @@  $(gpl2lgpl): %: $(..)gpl2lgpl.sed /home/gd/gnu/lib/%
 	mv -f $@-tmp $@
 endif
 endif
+
+$(objpfx)infinity-%.i8p: infinity-%.i8
+	$(CPP) -x c $(CFLAGS) $(CPPFLAGS) $^ -o $@
+
+$(objpfx)infinity-%.S: $(objpfx)infinity-%.i8p
+	$(I8C) -S -fpreprocessed -include sysdep.h $^ -o $@
+
+.PRECIOUS: $(addprefix $(objpfx)infinity-%,.i8p .S .o)
 
 # Local Variables:
 # mode: makefile