[odcctools-changes] [150] trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 17 06:37:37 PST 2006
Revision: 150
http://trac.macosforge.org/projects/odcctools/changeset/150
Author: ssen at mit.edu
Date: 2006-11-17 06:37:37 -0800 (Fri, 17 Nov 2006)
Log Message:
-----------
add support for 64-bit darwin targets
Modified Paths:
--------------
trunk/files/configure.ac
Added Paths:
-----------
trunk/patches/libstuff/
trunk/patches/libstuff/default_arch.diff
trunk/patches/libstuff/map_64bit_arches.diff
Modified: trunk/files/configure.ac
===================================================================
--- trunk/files/configure.ac 2006-09-25 17:05:21 UTC (rev 149)
+++ trunk/files/configure.ac 2006-11-17 14:37:37 UTC (rev 150)
@@ -1,4 +1,4 @@
-AC_INIT([odcctools], [622.3od15], [odcctools at opendarwin.org])
+AC_INIT([odcctools], [622.3od16], [odcctools at opendarwin.org])
AC_PREREQ([2.57])
AC_REVISION([$Revision: 1.45 $])
@@ -21,14 +21,22 @@
esac
case $target_cpu in
- powerpc*)
+ powerpc)
AC_DEFINE(EMULATED_HOST_CPU_TYPE, 18, [Emulated CPU type])
AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 100, [Emulated CPU subtype])
;;
- i?86|x86_64)
+ powerpc64)
+ AC_DEFINE(EMULATED_HOST_CPU_TYPE, 16777234, [Emulated CPU type])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 0, [Emulated CPU subtype])
+ ;;
+ i?86)
AC_DEFINE(EMULATED_HOST_CPU_TYPE, 7, [Emulated CPU type])
- AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 10, [Emulated CPU subtype])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 3, [Emulated CPU subtype])
;;
+ x86_64)
+ AC_DEFINE(EMULATED_HOST_CPU_TYPE, 16777223, [Emulated CPU type])
+ AC_DEFINE(EMULATED_HOST_CPU_SUBTYPE, 3, [Emulated CPU subtype])
+ ;;
*)
AC_MSG_ERROR([Unsupported target $target_cpu])
;;
Added: trunk/patches/libstuff/default_arch.diff
===================================================================
--- trunk/patches/libstuff/default_arch.diff (rev 0)
+++ trunk/patches/libstuff/default_arch.diff 2006-11-17 14:37:37 UTC (rev 150)
@@ -0,0 +1,20 @@
+--- get_arch_from_host.c.orig 2006-11-15 07:39:11.000000000 -0800
++++ get_arch_from_host.c 2006-11-15 07:40:27.000000000 -0800
+@@ -28,7 +28,7 @@
+ #include "stuff/openstep_mach.h"
+ #include "stuff/arch.h"
+ #include "stuff/allocate.h"
+-
++#include <config.h>
+ /*
+ * get_arch_from_host() gets the architecture from the host this is running on
+ * and returns zero if the architecture is not known and zero if the
+@@ -62,6 +62,8 @@
+ return(0);
+ }
+ mach_port_deallocate(mach_task_self(), my_mach_host_self);
++ host_basic_info.cpu_type = EMULATED_HOST_CPU_TYPE;
++ host_basic_info.cpu_subtype = EMULATED_HOST_CPU_SUBTYPE;
+
+ if(family_arch_flag != NULL){
+ family_arch_flag->cputype = host_basic_info.cpu_type;
Added: trunk/patches/libstuff/map_64bit_arches.diff
===================================================================
--- trunk/patches/libstuff/map_64bit_arches.diff (rev 0)
+++ trunk/patches/libstuff/map_64bit_arches.diff 2006-11-17 14:37:37 UTC (rev 150)
@@ -0,0 +1,77 @@
+--- get_arch_from_host.c.orig 2006-11-15 07:43:23.000000000 -0800
++++ get_arch_from_host.c 2006-11-15 07:48:37.000000000 -0800
+@@ -207,6 +207,40 @@
+ return(1);
+ }
+ break;
++ case CPU_TYPE_POWERPC64:
++ switch(host_basic_info.cpu_subtype){
++ case CPU_SUBTYPE_POWERPC_ALL:
++ if(family_arch_flag != NULL){
++ family_arch_flag->name = "ppc64";
++ family_arch_flag->cpusubtype = CPU_SUBTYPE_POWERPC_ALL;
++ }
++ if(specific_arch_flag != NULL)
++ specific_arch_flag->name = "ppc64";
++ return(1);
++ case CPU_SUBTYPE_POWERPC_970:
++ if(family_arch_flag != NULL){
++ family_arch_flag->name = "ppc64";
++ family_arch_flag->cpusubtype = CPU_SUBTYPE_POWERPC_ALL;
++ }
++ if(specific_arch_flag != NULL)
++ specific_arch_flag->name = "ppc970-64";
++ return(1);
++ default:
++ if(family_arch_flag != NULL){
++ family_arch_flag->name = "ppc64";
++ family_arch_flag->cpusubtype = CPU_SUBTYPE_POWERPC_ALL;
++ }
++ if(specific_arch_flag != NULL){
++ specific_arch_flag->name =
++ savestr("PowerPC cpusubtype 1234567890");
++ if(specific_arch_flag->name != NULL)
++ sprintf(specific_arch_flag->name,
++ "PowerPC cpusubtype %u",
++ host_basic_info.cpu_subtype);
++ }
++ return(1);
++ }
++ break;
+ case CPU_TYPE_VEO:
+ switch(host_basic_info.cpu_subtype){
+ case CPU_SUBTYPE_VEO_1:
+@@ -337,6 +371,33 @@
+ return(1);
+ }
+ break;
++ case CPU_TYPE_X86_64:
++ switch(host_basic_info.cpu_subtype){
++ case CPU_SUBTYPE_X86_64_ALL:
++ if(family_arch_flag != NULL){
++ family_arch_flag->name = "x86_64";
++ family_arch_flag->cpusubtype = CPU_SUBTYPE_X86_64_ALL;
++ }
++ if(specific_arch_flag != NULL)
++ specific_arch_flag->name = "x86_64";
++ return(1);
++ default:
++ if(family_arch_flag != NULL){
++ family_arch_flag->name = "x86_64";
++ family_arch_flag->cpusubtype = CPU_SUBTYPE_X86_64_ALL;
++ }
++ if(specific_arch_flag != NULL){
++ specific_arch_flag->name =
++ savestr("Intel family 12 model 12345678");
++ if(specific_arch_flag->name != NULL)
++ sprintf(specific_arch_flag->name,
++ "Intel family %u model %u",
++ CPU_SUBTYPE_INTEL_FAMILY(host_basic_info.cpu_subtype),
++ CPU_SUBTYPE_INTEL_MODEL(host_basic_info.cpu_subtype));
++ }
++ return(1);
++ }
++ break;
+ case CPU_TYPE_I860:
+ switch(host_basic_info.cpu_subtype){
+ case CPU_SUBTYPE_I860_ALL:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/odcctools-changes/attachments/20061117/2777ee00/attachment-0001.html
More information about the odcctools-changes
mailing list