All of lore.kernel.org
 help / color / mirror / Atom feed
From: ramsdell@mitre.org (John D. Ramsdell)
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH] Mini-OS Makefile TARGET_ARCH becomes MINIOS_TARGET_ARCH
Date: 22 May 2006 06:31:04 -0400	[thread overview]
Message-ID: <ogt3bf2qrkn.fsf_-_@divan.mitre.org> (raw)
In-Reply-To: <c3eb784636090763af47f3aec7327c4e@cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

Keir Fraser <Keir.Fraser@cl.cam.ac.uk> writes:

> We fixed this for Xen itself some time ago. If there are other places
> in the tree that do this (maybe minios?), please do provide a patch.

To facilitate cut-and-paste of portions of the Mini-OS Makefile into
other Makefiles, this patch renames TARGET_ARCH to MINIOS_TARGET_ARCH.

John


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Mini-OS Makefile TARGET_ARCH becomes MINIOS_TARGET_ARCH --]
[-- Type: text/x-patch, Size: 3006 bytes --]

Only in xxen-unstable/extras/mini-os/console: console.o
Only in xxen-unstable/extras/mini-os/console: xencons_ring.o
Only in xxen-unstable/extras/mini-os: events.o
Only in xxen-unstable/extras/mini-os: hypervisor.o
Only in xxen-unstable/extras/mini-os/include: xen
Only in xxen-unstable/extras/mini-os: kernel.o
Only in xxen-unstable/extras/mini-os/lib: math.o
Only in xxen-unstable/extras/mini-os/lib: printf.o
Only in xxen-unstable/extras/mini-os/lib: string.o
Only in xxen-unstable/extras/mini-os/lib: xmalloc.o
Only in xxen-unstable/extras/mini-os: libminios.a
diff -ur axen-unstable/extras/mini-os/Makefile xxen-unstable/extras/mini-os/Makefile
--- axen-unstable/extras/mini-os/Makefile	2006-05-22 06:08:42.000000000 -0400
+++ xxen-unstable/extras/mini-os/Makefile	2006-05-22 06:24:00.000000000 -0400
@@ -2,8 +2,8 @@
 
 include $(CURDIR)/../../Config.mk
 
-# Set TARGET_ARCH
-override TARGET_ARCH     := $(XEN_TARGET_ARCH)
+# Set MINIOS_TARGET_OS
+override MINIOS_TARGET_OS     := $(XEN_TARGET_ARCH)
 
 # NB. '-Wcast-qual' is nasty, so I omitted it.
 CFLAGS := -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format
@@ -13,14 +13,14 @@
 ASFLAGS = -D__ASSEMBLY__
 
 LDLIBS =  -L. -lminios
-LDFLAGS := -N -T minios-$(TARGET_ARCH).lds
+LDFLAGS := -N -T minios-$(MINIOS_TARGET_OS).lds
 
-ifeq ($(TARGET_ARCH),x86_32)
+ifeq ($(MINIOS_TARGET_OS),x86_32)
 CFLAGS += -m32 -march=i686
 LDFLAGS += -m elf_i386
 endif
 
-ifeq ($(TARGET_ARCH),x86_64)
+ifeq ($(MINIOS_TARGET_OS),x86_64)
 CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
 CFLAGS += -fno-asynchronous-unwind-tables
 LDFLAGS += -m elf_x86_64
@@ -34,7 +34,7 @@
 
 TARGET := mini-os
 
-HEAD := $(TARGET_ARCH).o
+HEAD := $(MINIOS_TARGET_OS).o
 OBJS := $(patsubst %.c,%.o,$(wildcard *.c))
 OBJS += $(patsubst %.c,%.o,$(wildcard lib/*.c))
 OBJS += $(patsubst %.c,%.o,$(wildcard xenbus/*.c))
@@ -54,7 +54,7 @@
 	ar r libminios.a $(HEAD) $(OBJS)
 
 $(TARGET): links libminios.a $(HEAD)
-	$(LD) $(LDFLAGS) $(HEAD) $(LDLIBS) -o $@.elf
+	$(LD) $(LDFLAGS) $(TARGET_ARCH) $(HEAD) $(LDLIBS) -o $@.elf
 	gzip -f -9 -c $@.elf >$@.gz
 
 .PHONY: clean
@@ -65,10 +65,10 @@
 	find . -type l | xargs rm -f
 
 %.o: %.c $(HDRS) Makefile
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
 
 %.o: %.S $(HDRS) Makefile
-	$(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@
+	$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c $< -o $@
 
 define all_sources
      ( find . -follow -name SCCS -prune -o -name '*.[chS]' -print )
@@ -78,4 +78,3 @@
 cscope:
 	$(all_sources) > cscope.files
 	cscope -k -b -q
-
Only in xxen-unstable/extras/mini-os: Makefile~
Only in xxen-unstable/extras/mini-os: mini-os.elf
Only in xxen-unstable/extras/mini-os: mini-os.gz
Only in xxen-unstable/extras/mini-os: mm.o
Only in xxen-unstable/extras/mini-os: sched.o
Only in xxen-unstable/extras/mini-os: time.o
Only in xxen-unstable/extras/mini-os: traps.o
Only in xxen-unstable/extras/mini-os: x86_32.o
Only in xxen-unstable/extras/mini-os/xenbus: xenbus.o

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  parent reply	other threads:[~2006-05-22 10:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1FhcWV-0004n6-Dm@host-192-168-0-1-bcn-london>
2006-05-21  2:58 ` CFLAGS are for C compilers and other Unix traditions John D. Ramsdell
2006-05-21  8:48   ` Keir Fraser
2006-05-21 16:40     ` John D. Ramsdell
2006-05-21 17:12     ` John D. Ramsdell
2006-05-22 10:31     ` John D. Ramsdell [this message]
2006-05-22 13:20       ` [PATCH] Mini-OS Makefile TARGET_ARCH becomes MINIOS_TARGET_ARCH Keir Fraser
2006-05-22 16:47         ` John D. Ramsdell

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=ogt3bf2qrkn.fsf_-_@divan.mitre.org \
    --to=ramsdell@mitre.org \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.