site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=7MsXJNzzwVRq5UIcprqI20GTYUTqmC98vW9QepHLrZw=; b=BCn6QEyB83U6sb0dHlgaWF3nbY3KUgk0iLVZN4jrhOLrbzOUa+NKIN/2utlCQegOoKlGHDyC/Sbo4H4g+Oqb7zjr29F7W9lvDOsylGHL2k002FaclYxR3jm01xt2FvSb7HkTCpALbVTME7JdgY5GZgLXt8a9Hu+Ukk7TV/yYY+g= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=vTVWBsVQ0Ul/QcfzFgk3ECTZVZ50GfmuJaZBq+BLV/pooKsHoHWFRuAZox2zLphEN4MLrCp3aASSwn2WTUicXZj40u8Yz9d+60aVQ4sQnwDVD4tHNJmJIhIv//rbWw8E3aWcfXQuXmhFRuC5y508iCPJ8KNPNeeUhZV2a51sllk= sorry guys it's not my question On Sat, Mar 8, 2008 at 10:51 AM, Andreas Fink <afink@list.fink.org> wrote:
On 08.03.2008, at 18:22, mm w wrote:
hi Terry it's really not that I'm asked,
I reiterate my question, is it possible to get which arch of a fat binary has been loaded? is it possible (in the case of a fat binary) to force one arch to be
loaded rather than the default one?
- use lipo to remove all arch's you dont want to use. - use get-info in finder to run in rosetta (forcing it to run as ppc (is ppc64 supported in rosetta? I don't think so)
As it was already said, the Activity Monitor application tells you which architecture an application was loaded. And of course ifdef's in the source will tell you as well as the source (after being run through preprocessor) will be different for every arch.
On Fri, Mar 7, 2008 at 10:24 PM, Terry Lambert <tlambert@apple.com> wrote:
On Mar 7, 2008, at 5:06 PM, mm w wrote:
#include <stdio.h>
/* cc -ansi -Wall -O3 -arch i386 -DARCH_X86_64=0 main.c -o main-i386 cc -ansi -Wall -O2 -arch x86_64 -DARCH_X86_64=1 main.c -o main- x86_64 lipo -create -arch i386 main-i386 -arch x86_64 main-x86_64 -o main */
/* main.c */
int main(void) { #if ARCH_X86_64 puts("hello world 64!"); #else puts("hello world!"); #endif return 0; } /* EOF */
$ ./main-i386 hello world! $ ./main-x86_64 hello world 64! $ ./main hello world 64!
1 - is there a way to know which arch/img has been loaded?
ps or activity monitor or, as you have discovered, printf.
2 - is it possible to force one arch to be loaded rather than the default one?
Check the checkbox in finder, if it's a GUI application, or:
man arch
-- Terry
-- -mmw _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/afink%40list.fink.org
This email sent to afink@list.fink.org
-- -mmw _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
mm w