• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 64-bit compilation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 64-bit compilation


  • Subject: Re: 64-bit compilation
  • From: Jeff Harrell <email@hidden>
  • Date: Tue, 8 Jul 2003 15:51:25 -0500

Perhaps I should have been more specific.

Here's a program.

int main(void) {
fprintf(stdout, "sizeof(void*) = %d", sizeof(void*));
return 0;
}

(I wrote that in Mail. Don't laugh at me if it doesn't compile.)

When I run a program like that on my G4, I get "sizeof(void*) = 4." This makes sense: a void pointer is 4 bytes long, or 32 bits.

Presumably, one will be able to take that same program, wave one's magic wand, and compile it in such a way that when run on a G5, it reports "sizeof(void*) = 8," or 64 bits.

How?

If I were on an SGI, I would do "cc -n32 foo.c" to get sizeof(void*) to be 4, and "cc -64 foo.c" to get sizeof(void*) to be 8. I don't know how to do it with GCC on a Mac, though.

Again: I realize this is really, really premature. I'm just wondering is all.

Thanks.

On Tuesday, July 8, 2003, at 03:44 PM, otherguy wrote:

http://developer.apple.com/technotes/tn/tn2087.html

is probably a good place to start for curiosity-minded people.

On Tuesday, July 8, 2003, at 02:27 PM, Jeff Harrell wrote:

I know this is absurdly premature, but can anybody enlighten me on the right way to compile an existing application for 64-bit "mode" on the G5? I know existing applications will run without recompilation and get ILP32; what flag or set of flags would one need to hand the compiler to get LP64? Really I'm just curious.

Thanks.

--
email@hidden
http://homepage.mac.com/jharrell

_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev




--
email@hidden
http://homepage.mac.com/jharrell
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: 64-bit compilation
      • From: "Alastair J.Houghton" <email@hidden>
    • Re: 64-bit compilation
      • From: Eric Schlegel <email@hidden>
  • Prev by Date: firstLineHeadIndent <-> firstLineTailIndent
  • Next by Date: Re: NSFileWrapper Bug/Problem
  • Previous by thread: 64-bit compilation
  • Next by thread: Re: 64-bit compilation
  • Index(es):
    • Date
    • Thread