From patchwork Tue Oct 20 14:56:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 9261 Received: (qmail 66848 invoked by alias); 20 Oct 2015 15:04:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 66789 invoked by uid 89); 20 Oct 2015 15:04:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com From: Gary Benson To: libc-alpha@sourceware.org Subject: [RFC][PATCH 21/22] Add Makerules to build %.o and %.os from %.i8 Date: Tue, 20 Oct 2015 15:56:14 +0100 Message-Id: <1445352975-17844-22-git-send-email-gbenson@redhat.com> In-Reply-To: <1445352975-17844-1-git-send-email-gbenson@redhat.com> References: <1445352975-17844-1-git-send-email-gbenson@redhat.com> 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. I don't *think* the %.o and %.os files should differ (they don't contain "real" code, just PT_NOTE sections) but please tell me if I'm wrong and I will add a separate %.S -> %.os rule. --- Makerules | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/Makerules b/Makerules index 1329f73..121b2b2 100644 --- a/Makerules +++ b/Makerules @@ -1510,6 +1510,22 @@ $(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 $^ -o $@ + +$(objpfx)infinity-%.o: $(objpfx)infinity-%.S + $(CC) -c $(CFLAGS) $(CPPFLAGS) $^ -o $@ + +ifeq ($(build-shared),yes) +$(objpfx)infinity-%.os: $(objpfx)infinity-%.o + cp -f $^ $@ +endif + +.PRECIOUS: $(addprefix $(objpfx)infinity-%,.i8p .S .o) # Local Variables: # mode: makefile