All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree
@ 2011-11-11 14:53 Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 1/6 v2] tests/qruncom.c: Remove libqemu.a example Chen Wei-Ren (陳韋任)
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Chen Wei-Ren (陳韋任) @ 2011-11-11 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Wei-Ren

From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>

  According to [1], libqemu is not available anymore. Remove libqemu
related stuff from QEMU source tree.

[1] http://www.mail-archive.com/address@hidden/msg49809.html

Chen Wei-Ren (6):
  tests/qruncom.c: Remove libqemu.a example
  tests/Makefile: Remove qruncom target
  qemu-tech.texi: Remove libqemu related stuff from the document
  Makefile.target: Remove libqemu target
  Makefile.objs: Remove libqemu_common.a from the comment
  LICENSE: There is no libqemu.a anymore

 LICENSE         |    4 +-
 Makefile.objs   |    7 +-
 Makefile.target |    8 --
 qemu-tech.texi  |   10 --
 tests/Makefile  |    6 -
 tests/qruncom.c |  284 -------------------------------------------------------
 6 files changed, 4 insertions(+), 315 deletions(-)
 delete mode 100644 tests/qruncom.c

-- 
1.7.3.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 1/6 v2] tests/qruncom.c: Remove libqemu.a example
  2011-11-11 14:53 [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree Chen Wei-Ren (陳韋任)
@ 2011-11-11 14:53 ` Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target Chen Wei-Ren (陳韋任)
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Chen Wei-Ren (陳韋任) @ 2011-11-11 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Wei-Ren

From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>

  Remove libqemu example since libqemu.a is not available anymore.

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
---
 tests/qruncom.c |  284 -------------------------------------------------------
 1 files changed, 0 insertions(+), 284 deletions(-)
 delete mode 100644 tests/qruncom.c

diff --git a/tests/qruncom.c b/tests/qruncom.c
deleted file mode 100644
index 2e93aaf..0000000
--- a/tests/qruncom.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Example of use of user mode libqemu: launch a basic .com DOS
- * executable
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <inttypes.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <signal.h>
-#include <malloc.h>
-
-#include "cpu.h"
-
-//#define SIGTEST
-
-int cpu_get_pic_interrupt(CPUState *env)
-{
-    return -1;
-}
-
-uint64_t cpu_get_tsc(CPUState *env)
-{
-    return 0;
-}
-
-static void set_gate(void *ptr, unsigned int type, unsigned int dpl,
-                     unsigned long addr, unsigned int sel)
-{
-    unsigned int e1, e2;
-    e1 = (addr & 0xffff) | (sel << 16);
-    e2 = (addr & 0xffff0000) | 0x8000 | (dpl << 13) | (type << 8);
-    stl((uint8_t *)ptr, e1);
-    stl((uint8_t *)ptr + 4, e2);
-}
-
-uint64_t idt_table[256];
-
-/* only dpl matters as we do only user space emulation */
-static void set_idt(int n, unsigned int dpl)
-{
-    set_gate(idt_table + n, 0, dpl, 0, 0);
-}
-
-void g_free(void *ptr)
-{
-    free(ptr);
-}
-
-void *g_malloc(size_t size)
-{
-    return malloc(size);
-}
-
-void *g_malloc0(size_t size)
-{
-    void *ptr;
-    ptr = g_malloc(size);
-    if (!ptr)
-        return NULL;
-    memset(ptr, 0, size);
-    return ptr;
-}
-
-void *qemu_vmalloc(size_t size)
-{
-    return memalign(4096, size);
-}
-
-void qemu_vfree(void *ptr)
-{
-    free(ptr);
-}
-
-void qemu_printf(const char *fmt, ...)
-{
-    va_list ap;
-    va_start(ap, fmt);
-    vprintf(fmt, ap);
-    va_end(ap);
-}
-
-/* XXX: this is a bug in helper2.c */
-int errno;
-
-/**********************************************/
-
-#define COM_BASE_ADDR    0x10100
-
-static void usage(void)
-{
-    printf("qruncom version 0.1 (c) 2003 Fabrice Bellard\n"
-           "usage: qruncom file.com\n"
-           "user mode libqemu demo: run simple .com DOS executables\n");
-    exit(1);
-}
-
-static inline uint8_t *seg_to_linear(unsigned int seg, unsigned int reg)
-{
-    return (uint8_t *)((seg << 4) + (reg & 0xffff));
-}
-
-static inline void pushw(CPUState *env, int val)
-{
-    env->regs[R_ESP] = (env->regs[R_ESP] & ~0xffff) | ((env->regs[R_ESP] - 2) & 0xffff);
-    *(uint16_t *)seg_to_linear(env->segs[R_SS].selector, env->regs[R_ESP]) = val;
-}
-
-static void host_segv_handler(int host_signum, siginfo_t *info,
-                              void *puc)
-{
-    if (cpu_signal_handler(host_signum, info, puc)) {
-        return;
-    }
-    abort();
-}
-
-int main(int argc, char **argv)
-{
-    uint8_t *vm86_mem;
-    const char *filename;
-    int fd, ret, seg;
-    CPUState *env;
-
-    if (argc != 2)
-        usage();
-    filename = argv[1];
-
-    vm86_mem = mmap((void *)0x00000000, 0x110000,
-                    PROT_WRITE | PROT_READ | PROT_EXEC,
-                    MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
-    if (vm86_mem == MAP_FAILED) {
-        perror("mmap");
-        exit(1);
-    }
-
-    /* load the MSDOS .com executable */
-    fd = open(filename, O_RDONLY);
-    if (fd < 0) {
-        perror(filename);
-        exit(1);
-    }
-    ret = read(fd, vm86_mem + COM_BASE_ADDR, 65536 - 256);
-    if (ret < 0) {
-        perror("read");
-        exit(1);
-    }
-    close(fd);
-
-    /* install exception handler for CPU emulator */
-    {
-        struct sigaction act;
-
-        sigfillset(&act.sa_mask);
-        act.sa_flags = SA_SIGINFO;
-        //        act.sa_flags |= SA_ONSTACK;
-
-        act.sa_sigaction = host_segv_handler;
-        sigaction(SIGSEGV, &act, NULL);
-        sigaction(SIGBUS, &act, NULL);
-    }
-
-    //    cpu_set_log(CPU_LOG_TB_IN_ASM | CPU_LOG_TB_OUT_ASM | CPU_LOG_EXEC);
-
-    env = cpu_init("qemu32");
-
-    cpu_x86_set_cpl(env, 3);
-
-    env->cr[0] = CR0_PG_MASK | CR0_WP_MASK | CR0_PE_MASK;
-    /* NOTE: hflags duplicates some of the virtual CPU state */
-    env->hflags |= HF_PE_MASK | VM_MASK;
-
-    /* flags setup : we activate the IRQs by default as in user
-       mode. We also activate the VM86 flag to run DOS code */
-    env->eflags |= IF_MASK | VM_MASK;
-
-    /* init basic registers */
-    env->eip = 0x100;
-    env->regs[R_ESP] = 0xfffe;
-    seg = (COM_BASE_ADDR - 0x100) >> 4;
-
-    cpu_x86_load_seg_cache(env, R_CS, seg,
-                           (seg << 4), 0xffff, 0);
-    cpu_x86_load_seg_cache(env, R_SS, seg,
-                           (seg << 4), 0xffff, 0);
-    cpu_x86_load_seg_cache(env, R_DS, seg,
-                           (seg << 4), 0xffff, 0);
-    cpu_x86_load_seg_cache(env, R_ES, seg,
-                           (seg << 4), 0xffff, 0);
-    cpu_x86_load_seg_cache(env, R_FS, seg,
-                           (seg << 4), 0xffff, 0);
-    cpu_x86_load_seg_cache(env, R_GS, seg,
-                           (seg << 4), 0xffff, 0);
-
-    /* exception support */
-    env->idt.base = (unsigned long)idt_table;
-    env->idt.limit = sizeof(idt_table) - 1;
-    set_idt(0, 0);
-    set_idt(1, 0);
-    set_idt(2, 0);
-    set_idt(3, 3);
-    set_idt(4, 3);
-    set_idt(5, 3);
-    set_idt(6, 0);
-    set_idt(7, 0);
-    set_idt(8, 0);
-    set_idt(9, 0);
-    set_idt(10, 0);
-    set_idt(11, 0);
-    set_idt(12, 0);
-    set_idt(13, 0);
-    set_idt(14, 0);
-    set_idt(15, 0);
-    set_idt(16, 0);
-    set_idt(17, 0);
-    set_idt(18, 0);
-    set_idt(19, 0);
-
-    /* put return code */
-    *seg_to_linear(env->segs[R_CS].selector, 0) = 0xb4; /* mov ah, $0 */
-    *seg_to_linear(env->segs[R_CS].selector, 1) = 0x00;
-    *seg_to_linear(env->segs[R_CS].selector, 2) = 0xcd; /* int $0x21 */
-    *seg_to_linear(env->segs[R_CS].selector, 3) = 0x21;
-    pushw(env, 0x0000);
-
-    /* the value of these registers seem to be assumed by pi_10.com */
-    env->regs[R_ESI] = 0x100;
-    env->regs[R_ECX] = 0xff;
-    env->regs[R_EBP] = 0x0900;
-    env->regs[R_EDI] = 0xfffe;
-
-    /* inform the emulator of the mmaped memory */
-    page_set_flags(0x00000000, 0x110000,
-                   PAGE_WRITE | PAGE_READ | PAGE_EXEC | PAGE_VALID);
-
-    for(;;) {
-        ret = cpu_x86_exec(env);
-        switch(ret) {
-        case EXCP0D_GPF:
-            {
-                int int_num, ah;
-                int_num = *(uint8_t *)(env->segs[R_CS].base + env->eip + 1);
-                if (int_num != 0x21)
-                    goto unknown_int;
-                ah = (env->regs[R_EAX] >> 8) & 0xff;
-                switch(ah) {
-                case 0x00: /* exit */
-                    exit(0);
-                case 0x02: /* write char */
-                    {
-                        uint8_t c = env->regs[R_EDX];
-                        write(1, &c, 1);
-                    }
-                    break;
-                case 0x09: /* write string */
-                    {
-                        uint8_t c;
-                        for(;;) {
-                            c = *seg_to_linear(env->segs[R_DS].selector, env->regs[R_EAX]);
-                            if (c == '$')
-                                break;
-                            write(1, &c, 1);
-                        }
-                        env->regs[R_EAX] = (env->regs[R_EAX] & ~0xff) | '$';
-                    }
-                    break;
-                default:
-                unknown_int:
-                    fprintf(stderr, "unsupported int 0x%02x\n", int_num);
-                    cpu_dump_state(env, stderr, fprintf, 0);
-                    //                    exit(1);
-                }
-                env->eip += 2;
-            }
-            break;
-        default:
-            fprintf(stderr, "unhandled cpu_exec return code (0x%x)\n", ret);
-            cpu_dump_state(env, stderr, fprintf, 0);
-            exit(1);
-        }
-    }
-}
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target
  2011-11-11 14:53 [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 1/6 v2] tests/qruncom.c: Remove libqemu.a example Chen Wei-Ren (陳韋任)
@ 2011-11-11 14:53 ` Chen Wei-Ren (陳韋任)
  2011-11-11 15:02   ` Peter Maydell
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 3/6 v2] qemu-tech.texi: Remove libqemu related stuff from the document Chen Wei-Ren (陳韋任)
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Chen Wei-Ren (陳韋任) @ 2011-11-11 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Wei-Ren

From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>

  Remove qruncom target from the Makefile file since we have
removed libqemu example (qruncom.c).

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
---
 tests/Makefile |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 430e0c1..15e36a2 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -115,12 +115,6 @@ speed: sha1 sha1-i386
 	time ./sha1
 	time $(QEMU) ./sha1-i386
 
-# broken test
-# NOTE: -fomit-frame-pointer is currently needed : this is a bug in libqemu
-qruncom: qruncom.c ../ioport-user.c ../i386-user/libqemu.a
-	$(CC) $(CFLAGS) -fomit-frame-pointer $(LDFLAGS) -I../target-i386 -I.. -I../i386-user -I../fpu \
-              -o $@ $(filter %.c, $^) -L../i386-user -lqemu -lm
-
 # arm test
 hello-arm: hello-arm.o
 	arm-linux-ld -o $@ $<
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 3/6 v2] qemu-tech.texi: Remove libqemu related stuff from the document
  2011-11-11 14:53 [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 1/6 v2] tests/qruncom.c: Remove libqemu.a example Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target Chen Wei-Ren (陳韋任)
@ 2011-11-11 14:53 ` Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 4/6 v2] Makefile.target: Remove libqemu target Chen Wei-Ren (陳韋任)
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Chen Wei-Ren (陳韋任) @ 2011-11-11 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Wei-Ren

From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>

  Remove libqemu related stuff from the document since libqemu.a is not supported
anymore.

  v1 -> v2: Remove entry "qruncom.c" from "3 Regression Tests".  

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
---
 qemu-tech.texi |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/qemu-tech.texi b/qemu-tech.texi
index 62afe45..5676fb7 100644
--- a/qemu-tech.texi
+++ b/qemu-tech.texi
@@ -96,10 +96,6 @@ Alpha and S390 hosts, but TCG (see below) doesn't support those yet.
 
 @item Precise exceptions support.
 
-@item The virtual CPU is a library (@code{libqemu}) which can be used
-in other projects (look at @file{qemu/tests/qruncom.c} to have an
-example of user mode @code{libqemu} usage).
-
 @item
 Floating point library supporting both full software emulation and
 native host FPU instructions.
@@ -685,7 +681,6 @@ are available. They are used for regression testing.
 @menu
 * test-i386::
 * linux-test::
-* qruncom.c::
 @end menu
 
 @node test-i386
@@ -711,11 +706,6 @@ This program tests various Linux system calls. It is used to verify
 that the system call parameters are correctly converted between target
 and host CPUs.
 
-@node qruncom.c
-@section @file{qruncom.c}
-
-Example of usage of @code{libqemu} to emulate a user mode i386 CPU.
-
 @node Index
 @chapter Index
 @printindex cp
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 4/6 v2] Makefile.target: Remove libqemu target
  2011-11-11 14:53 [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree Chen Wei-Ren (陳韋任)
                   ` (2 preceding siblings ...)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 3/6 v2] qemu-tech.texi: Remove libqemu related stuff from the document Chen Wei-Ren (陳韋任)
@ 2011-11-11 14:53 ` Chen Wei-Ren (陳韋任)
  2011-11-11 15:00   ` Peter Maydell
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 5/6 v2] Makefile.objs: Remove libqemu_common.a from the comment Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 6/6 v2] LICENSE: There is no libqemu.a anymore Chen Wei-Ren (陳韋任)
  5 siblings, 1 reply; 13+ messages in thread
From: Chen Wei-Ren (陳韋任) @ 2011-11-11 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Wei-Ren

From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>

  Remove libqemu target from Makefile.target. I have ran the following test:
  
  - process mode: linux-user-test-0.3
  - system mode:
     - arm-test-0.2.tar.gz
     - minix204.tar.bz2
     - linux-0.2.img.bz2  

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
---
 Makefile.target |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index a111521..d1f7993 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -92,14 +92,6 @@ tci-dis.o: QEMU_CFLAGS += -I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/tci
 
 $(libobj-y): $(GENERATED_HEADERS)
 
-# libqemu
-
-translate.o: translate.c cpu.h
-
-translate-all.o: translate-all.c cpu.h
-
-tcg/tcg.o: cpu.h
-
 # HELPER_CFLAGS is used for all the code compiled with static register
 # variables
 op_helper.o ldst_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 5/6 v2] Makefile.objs: Remove libqemu_common.a from the comment
  2011-11-11 14:53 [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree Chen Wei-Ren (陳韋任)
                   ` (3 preceding siblings ...)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 4/6 v2] Makefile.target: Remove libqemu target Chen Wei-Ren (陳韋任)
@ 2011-11-11 14:53 ` Chen Wei-Ren (陳韋任)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 6/6 v2] LICENSE: There is no libqemu.a anymore Chen Wei-Ren (陳韋任)
  5 siblings, 0 replies; 13+ messages in thread
From: Chen Wei-Ren (陳韋任) @ 2011-11-11 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Wei-Ren

From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>

  Remove libqemu_common.a from the comment.

  v1 -> v2: Reverse the deletion of common-obj-y. Only remove libqemu_common.a
            from the comment.

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
---
 Makefile.objs |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index d7a6539..90afdfa 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -68,10 +68,9 @@ endif
 fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y))
 
 ######################################################################
-# libqemu_common.a: Target independent part of system emulation. The
-# long term path is to suppress *all* target specific code in case of
-# system emulation, i.e. a single QEMU executable should support all
-# CPUs and machines.
+# Target independent part of system emulation. The long term path is
+# to suppress *all* target specific code in case of system emulation,
+# i.e. a single QEMU executable should support all CPUs and machines.
 
 common-obj-y = $(block-obj-y) blockdev.o
 common-obj-y += $(net-obj-y)
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 6/6 v2] LICENSE: There is no libqemu.a anymore
  2011-11-11 14:53 [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree Chen Wei-Ren (陳韋任)
                   ` (4 preceding siblings ...)
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 5/6 v2] Makefile.objs: Remove libqemu_common.a from the comment Chen Wei-Ren (陳韋任)
@ 2011-11-11 14:53 ` Chen Wei-Ren (陳韋任)
  5 siblings, 0 replies; 13+ messages in thread
From: Chen Wei-Ren (陳韋任) @ 2011-11-11 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Chen Wei-Ren

From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>

  Remove statement about libqemu.a from LICENSE.

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
---
 LICENSE |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/LICENSE b/LICENSE
index cbd92c0..acae9a3 100644
--- a/LICENSE
+++ b/LICENSE
@@ -6,9 +6,7 @@ The following points clarify the QEMU license:
 GNU General Public License. Hence each source file contains its own
 licensing information.
 
-In particular, the QEMU virtual CPU core library (libqemu.a) is
-released under the GNU Lesser General Public License. Many hardware
-device emulation sources are released under the BSD license.
+Many hardware device emulation sources are released under the BSD license.
 
 3) The Tiny Code Generator (TCG) is released under the BSD license
    (see license headers in files).
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 4/6 v2] Makefile.target: Remove libqemu target
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 4/6 v2] Makefile.target: Remove libqemu target Chen Wei-Ren (陳韋任)
@ 2011-11-11 15:00   ` Peter Maydell
  2011-11-11 15:15     ` 陳韋任
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2011-11-11 15:00 UTC (permalink / raw)
  To: Chen Wei-Ren (陳韋任); +Cc: qemu-devel

On 11 November 2011 14:53, Chen Wei-Ren (陳韋任) <chenwj@iis.sinica.edu.tw> wrote:
>  Remove libqemu target from Makefile.target.

> diff --git a/Makefile.target b/Makefile.target
> index a111521..d1f7993 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -92,14 +92,6 @@ tci-dis.o: QEMU_CFLAGS += -I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/tci
>
>  $(libobj-y): $(GENERATED_HEADERS)
>
> -# libqemu
> -
> -translate.o: translate.c cpu.h
> -
> -translate-all.o: translate-all.c cpu.h
> -
> -tcg/tcg.o: cpu.h
> -

This commit isn't doing what the commit message claims it does.

What you're actually removing is a set of manually inserted
dependencies of some object files on their source files and
on cpu.h. There is already no libqemu target in this makefile.
What you maybe wanted to remove is just the now out of date
comment line?

Now, I think those manually inserted dependencies shouldn't
be there, because the autogenerated .d files already cover
the dependencies they specify as far as I can tell.
But that would be a different commit entirely.)

-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target
  2011-11-11 14:53 ` [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target Chen Wei-Ren (陳韋任)
@ 2011-11-11 15:02   ` Peter Maydell
  2011-11-11 15:07     ` 陳韋任
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2011-11-11 15:02 UTC (permalink / raw)
  To: Chen Wei-Ren (陳韋任); +Cc: qemu-devel

On 11 November 2011 14:53, Chen Wei-Ren (陳韋任) <chenwj@iis.sinica.edu.tw> wrote:
> From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
>
>  Remove qruncom target from the Makefile file since we have
> removed libqemu example (qruncom.c).

This should be done before the patch removing qruncom.c, not after.
Or do both in the same patch.

-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target
  2011-11-11 15:02   ` Peter Maydell
@ 2011-11-11 15:07     ` 陳韋任
  2011-11-11 15:16       ` Peter Maydell
  2011-11-11 15:19       ` Andreas Färber
  0 siblings, 2 replies; 13+ messages in thread
From: 陳韋任 @ 2011-11-11 15:07 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Chen Wei-Ren (陳韋任)

On Fri, Nov 11, 2011 at 03:02:16PM +0000, Peter Maydell wrote:
> On 11 November 2011 14:53, Chen Wei-Ren (陳韋任) <chenwj@iis.sinica.edu.tw> wrote:
> > From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
> >
> >  Remove qruncom target from the Makefile file since we have
> > removed libqemu example (qruncom.c).
> 
> This should be done before the patch removing qruncom.c, not after.
> Or do both in the same patch.

  I'll reverse the order next time. Is there a rule of thumb about how
to order those patches?

  Thanks.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 4/6 v2] Makefile.target: Remove libqemu target
  2011-11-11 15:00   ` Peter Maydell
@ 2011-11-11 15:15     ` 陳韋任
  0 siblings, 0 replies; 13+ messages in thread
From: 陳韋任 @ 2011-11-11 15:15 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Chen Wei-Ren (陳韋任)

> This commit isn't doing what the commit message claims it does.
> 
> What you're actually removing is a set of manually inserted
> dependencies of some object files on their source files and
> on cpu.h. There is already no libqemu target in this makefile.
> What you maybe wanted to remove is just the now out of date
> comment line?

  I thought the lines below "# libqemu" is related to libqemu.a
, but it's apparently not.
 
> Now, I think those manually inserted dependencies shouldn't
> be there, because the autogenerated .d files already cover
> the dependencies they specify as far as I can tell.

  You mean those *.d file under the build directory?

> But that would be a different commit entirely.)

  I'll exclude those manually inserted dependencies from this
series next time.


Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target
  2011-11-11 15:07     ` 陳韋任
@ 2011-11-11 15:16       ` Peter Maydell
  2011-11-11 15:19       ` Andreas Färber
  1 sibling, 0 replies; 13+ messages in thread
From: Peter Maydell @ 2011-11-11 15:16 UTC (permalink / raw)
  To: 陳韋任; +Cc: qemu-devel

On 11 November 2011 15:07, 陳韋任 <chenwj@iis.sinica.edu.tw> wrote:
> On Fri, Nov 11, 2011 at 03:02:16PM +0000, Peter Maydell wrote:
>> On 11 November 2011 14:53, Chen Wei-Ren (陳韋任) <chenwj@iis.sinica.edu.tw> wrote:
>> > From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
>> >
>> >  Remove qruncom target from the Makefile file since we have
>> > removed libqemu example (qruncom.c).
>>
>> This should be done before the patch removing qruncom.c, not after.
>> Or do both in the same patch.
>
>  I'll reverse the order next time. Is there a rule of thumb about how
> to order those patches?

The rule of thumb is that you should never break the tree at
any point between two patches in a series. So if you're adding
a new file then the makefile change goes in the same patch
or after it. If you're deleting a file the makefile change
happens first or in the same patch. If you're making related
changes to two files where both changes are required for things
to work (eg renaming a header file and updating the #include
lines) then the change has to be done as a single patch.

(The rule is there to allow people to find bugs later using
"git bisect" and similar tools without running into points
in the revision history where the system was broken. For a
test program it is a bit less important but it's worth
keeping to the rule anyway.)

-- PMM

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target
  2011-11-11 15:07     ` 陳韋任
  2011-11-11 15:16       ` Peter Maydell
@ 2011-11-11 15:19       ` Andreas Färber
  1 sibling, 0 replies; 13+ messages in thread
From: Andreas Färber @ 2011-11-11 15:19 UTC (permalink / raw)
  To: 陳韋任; +Cc: Peter Maydell, qemu-devel

Am 11.11.2011 16:07, schrieb 陳韋任:
> On Fri, Nov 11, 2011 at 03:02:16PM +0000, Peter Maydell wrote:
>> On 11 November 2011 14:53, Chen Wei-Ren (陳韋任) <chenwj@iis.sinica.edu.tw> wrote:
>>> From: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
>>>
>>>  Remove qruncom target from the Makefile file since we have
>>> removed libqemu example (qruncom.c).
>>
>> This should be done before the patch removing qruncom.c, not after.
>> Or do both in the same patch.
> 
>   I'll reverse the order next time. Is there a rule of thumb about how
> to order those patches?

The logic goes like this: Every single patch should build / work.

If you remove the sources, the Makefile rule no longer works.
If you remove the Makefile rule, the sources are not used.

Therefore best just squash these two commits together.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-11-11 15:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-11 14:53 [Qemu-devel] [PATCH 0/6 v2] Remove libqemu related stuff from QEMU source tree Chen Wei-Ren (陳韋任)
2011-11-11 14:53 ` [Qemu-devel] [PATCH 1/6 v2] tests/qruncom.c: Remove libqemu.a example Chen Wei-Ren (陳韋任)
2011-11-11 14:53 ` [Qemu-devel] [PATCH 2/6 v2] tests/Makefile: Remove qruncom target Chen Wei-Ren (陳韋任)
2011-11-11 15:02   ` Peter Maydell
2011-11-11 15:07     ` 陳韋任
2011-11-11 15:16       ` Peter Maydell
2011-11-11 15:19       ` Andreas Färber
2011-11-11 14:53 ` [Qemu-devel] [PATCH 3/6 v2] qemu-tech.texi: Remove libqemu related stuff from the document Chen Wei-Ren (陳韋任)
2011-11-11 14:53 ` [Qemu-devel] [PATCH 4/6 v2] Makefile.target: Remove libqemu target Chen Wei-Ren (陳韋任)
2011-11-11 15:00   ` Peter Maydell
2011-11-11 15:15     ` 陳韋任
2011-11-11 14:53 ` [Qemu-devel] [PATCH 5/6 v2] Makefile.objs: Remove libqemu_common.a from the comment Chen Wei-Ren (陳韋任)
2011-11-11 14:53 ` [Qemu-devel] [PATCH 6/6 v2] LICENSE: There is no libqemu.a anymore Chen Wei-Ren (陳韋任)

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.