Skip to content

Commit

Permalink
[PATCH] uml: cross-build support : mk_thread
Browse files Browse the repository at this point in the history
mk_thread converted

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed May 5, 2005
1 parent a31769e commit 2b8b611
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 114 deletions.
2 changes: 1 addition & 1 deletion arch/um/Makefile-i386
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread
$(SYS_UTIL_DIR)/mk_sc: scripts_basic $(ARCH_DIR)/user-offsets.h FORCE
$(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@

$(SYS_UTIL_DIR)/mk_thread: scripts_basic $(ARCH_SYMLINKS) $(GEN_HEADERS) FORCE
$(SYS_UTIL_DIR)/mk_thread: scripts_basic $(ARCH_DIR)/kernel-offsets.h FORCE
$(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@

$(SYS_UTIL_DIR): scripts_basic include/asm FORCE
Expand Down
2 changes: 1 addition & 1 deletion arch/um/Makefile-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread
$(SYS_UTIL_DIR)/mk_sc: scripts_basic $(ARCH_DIR)/user-offsets.h FORCE
$(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@

$(SYS_UTIL_DIR)/mk_thread: scripts_basic $(ARCH_SYMLINKS) $(GEN_HEADERS) FORCE
$(SYS_UTIL_DIR)/mk_thread: scripts_basic $(GEN_HEADERS) $(ARCH_DIR)/kernel-offsets.h FORCE
$(Q)$(MAKE) $(build)=$(SYS_UTIL_DIR) $@

CLEAN_FILES += $(SYS_HEADERS)
6 changes: 1 addition & 5 deletions arch/um/sys-i386/util/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@

hostprogs-y := mk_sc mk_thread
always := $(hostprogs-y)

mk_thread-objs := mk_thread_kern.o mk_thread_user.o

HOSTCFLAGS_mk_thread_kern.o := $(CFLAGS) $(CPPFLAGS)
HOSTCFLAGS_mk_thread_user.o := $(USER_CFLAGS)
HOSTCFLAGS_mk_sc.o := -I$(objtree)/arch/um
HOSTCFLAGS_mk_thread.o := -I$(objtree)/arch/um
22 changes: 22 additions & 0 deletions arch/um/sys-i386/util/mk_thread.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <stdio.h>
#include <kernel-offsets.h>

int main(int argc, char **argv)
{
printf("/*\n");
printf(" * Generated by mk_thread\n");
printf(" */\n");
printf("\n");
printf("#ifndef __UM_THREAD_H\n");
printf("#define __UM_THREAD_H\n");
printf("\n");
printf("#define TASK_DEBUGREGS(task) ((unsigned long *) "
"&(((char *) (task))[%d]))\n", TASK_DEBUGREGS);
#ifdef TASK_EXTERN_PID
printf("#define TASK_EXTERN_PID(task) *((int *) &(((char *) (task))[%d]))\n",
TASK_EXTERN_PID);
#endif
printf("\n");
printf("#endif\n");
return(0);
}
22 changes: 0 additions & 22 deletions arch/um/sys-i386/util/mk_thread_kern.c

This file was deleted.

30 changes: 0 additions & 30 deletions arch/um/sys-i386/util/mk_thread_user.c

This file was deleted.

5 changes: 1 addition & 4 deletions arch/um/sys-x86_64/util/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
hostprogs-y := mk_sc mk_thread
always := $(hostprogs-y)

mk_thread-objs := mk_thread_kern.o mk_thread_user.o

HOSTCFLAGS_mk_thread_kern.o := $(CFLAGS) $(CPPFLAGS)
HOSTCFLAGS_mk_thread_user.o := $(USER_CFLAGS)
HOSTCFLAGS_mk_sc.o := -I$(objtree)/arch/um
HOSTCFLAGS_mk_thread.o := -I$(objtree)/arch/um
20 changes: 20 additions & 0 deletions arch/um/sys-x86_64/util/mk_thread.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <stdio.h>
#include <kernel-offsets.h>

int main(int argc, char **argv)
{
printf("/*\n");
printf(" * Generated by mk_thread\n");
printf(" */\n");
printf("\n");
printf("#ifndef __UM_THREAD_H\n");
printf("#define __UM_THREAD_H\n");
printf("\n");
#ifdef TASK_EXTERN_PID
printf("#define TASK_EXTERN_PID(task) *((int *) &(((char *) (task))[%d]))\n",
TASK_EXTERN_PID);
#endif
printf("\n");
printf("#endif\n");
return(0);
}
21 changes: 0 additions & 21 deletions arch/um/sys-x86_64/util/mk_thread_kern.c

This file was deleted.

30 changes: 0 additions & 30 deletions arch/um/sys-x86_64/util/mk_thread_user.c

This file was deleted.

0 comments on commit 2b8b611

Please sign in to comment.