This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 --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
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]