From: Peter Chubb <peter@chubb.wattle.id.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] offsets.h generation
Date: Tue, 27 May 2003 00:03:09 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723706037@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590723705941@msgid-missing>
[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 77 bytes --]
And here's the next changeset to get rid of the rest of
arch/ia64/tools/*:
[-- Attachment #2: p3 --]
[-- Type: text/plain, Size: 3764 bytes --]
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1101 -> 1.1102
# arch/ia64/tools/Makefile 1.12 -> (deleted)
# arch/ia64/tools/print_offsets.awk 1.6 -> (deleted)
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/27 peterc@wombat.disy.cse.unsw.edu.au 1.1102
# Delete the rest of arch/ia64/tools.
#
# .del-print_offsets.awk~ce325580e04f9929:
# Delete: arch/ia64/tools/print_offsets.awk
# .del-Makefile~90bde6a95198c56c:
# Delete: arch/ia64/tools/Makefile
# --------------------------------------------
#
diff -Nru a/arch/ia64/tools/Makefile b/arch/ia64/tools/Makefile
--- a/arch/ia64/tools/Makefile Tue May 27 10:01:50 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,51 +0,0 @@
-CFLAGS = -g -O2 -Wall $(CPPFLAGS)
-
-TARGET = include/asm-ia64/offsets.h
-
-src = $(obj)
-
-clean-files := print_offsets.s print_offsets offsets.h
-
-$(TARGET): $(obj)/offsets.h
- @if ! cmp -s $(obj)/offsets.h ${TARGET}; then \
- echo -e "*** Updating ${TARGET}..."; \
- cp $(obj)/offsets.h ${TARGET}; \
- else \
- echo "*** ${TARGET} is up to date"; \
- fi
-
-#
-# If we're cross-compiling, we use the cross-compiler to translate
-# print_offsets.c into an assembly file and then awk to translate this
-# file into offsets.h. This avoids having to use a simulator to
-# generate this file. This is based on an idea suggested by Asit
-# Mallick. If we're running natively, we can of course just build
-# print_offsets and run it. --davidm
-#
-
-ifeq ($(CROSS_COMPILE),)
-
-$(obj)/offsets.h: $(obj)/print_offsets
- $(obj)/print_offsets > $(obj)/offsets.h
-
-comma := ,
-
-$(obj)/print_offsets: $(src)/print_offsets.c FORCE
- [ -r $(TARGET) ] || echo "#define IA64_TASK_SIZE 0" > $(TARGET)
- $(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \
- $(src)/print_offsets.c -o $@
-
-FORCE:
-
-else
-
-$(obj)/offsets.h: $(obj)/print_offsets.s
- $(AWK) -f $(src)/print_offsets.awk $^ > $@
-
-$(obj)/print_offsets.s: $(src)/print_offsets.c
- [ -r $(TARGET) ] || echo "#define IA64_TASK_SIZE 0" > $(TARGET)
- $(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -S $^ -o $@
-
-endif
-
-.PHONY: all modules modules_install
diff -Nru a/arch/ia64/tools/print_offsets.awk b/arch/ia64/tools/print_offsets.awk
--- a/arch/ia64/tools/print_offsets.awk Tue May 27 10:01:50 2003
+++ /dev/null Wed Dec 31 16:00:00 1969
@@ -1,72 +0,0 @@
-BEGIN {
- print "#ifndef _ASM_IA64_OFFSETS_H"
- print "#define _ASM_IA64_OFFSETS_H"
- print "/*"
- print " * DO NOT MODIFY"
- print " *"
- print " * This file was generated by arch/ia64/tools/print_offsets.awk."
- print " *"
- print " */"
- print ""
- print "#define CLONE_IDLETASK_BIT 12"
- print "#define CLONE_SETTLS_BIT 19"
-}
-
-# look for .tab:
-# stringz "name"
-# data value
-# sequence
-
-/.*[.]size/ {
- inside_table = 0
-}
-
-/\/\/ end/ {
- inside_table = 0
-}
-
-/.*[.]rodata/ {
- inside_table = 0
-}
-
-{
- if (inside_table) {
- if ($1 == "//") getline;
- name=$2
- getline
- getline
- if ($1 == "//") getline;
- value=$2
- len = length(name)
- name = substr(name, 2, len - 2)
- len -= 2
- if (len == 0)
- print ""
- else {
- len += 8
- if (len >= 40) {
- space=" "
- } else {
- space=""
- while (len < 40) {
- len += 8
- space = space"\t"
- }
- }
- printf("#define %s%s%lu\t/* 0x%lx */\n", name, space, value, value)
- }
- }
-}
-
-/tab:/ {
- inside_table = 1
-}
-
-/tab\#:/ {
- inside_table = 1
-}
-
-END {
- print ""
- print "#endif /* _ASM_IA64_OFFSETS_H */"
-}
next prev parent reply other threads:[~2003-05-27 0:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-19 4:30 [Linux-ia64] offsets.h generation Peter Chubb
2003-05-19 17:13 ` Sam Ravnborg
2003-05-20 1:26 ` Peter Chubb
2003-05-20 4:40 ` Sam Ravnborg
2003-05-20 6:31 ` David Mosberger
2003-05-20 9:15 ` Peter Chubb
2003-05-23 1:09 ` Peter Chubb
2003-05-23 1:50 ` David Mosberger
2003-05-26 23:25 ` Peter Chubb
2003-05-27 0:03 ` Peter Chubb
2003-05-27 0:03 ` Peter Chubb [this message]
2003-05-31 0:34 ` David Mosberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590723706037@msgid-missing \
--to=peter@chubb.wattle.id.au \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox