<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.finkproject.org/index.php?action=history&amp;feed=atom&amp;title=Fink%3APackaging%3Ax86_64</id>
	<title>Fink:Packaging:x86 64 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.finkproject.org/index.php?action=history&amp;feed=atom&amp;title=Fink%3APackaging%3Ax86_64"/>
	<link rel="alternate" type="text/html" href="https://wiki.finkproject.org/index.php?title=Fink:Packaging:x86_64&amp;action=history"/>
	<updated>2026-06-03T13:28:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.finkproject.org/index.php?title=Fink:Packaging:x86_64&amp;diff=89&amp;oldid=prev</id>
		<title>Fingolfin: Removing  {{Fink_Header}}</title>
		<link rel="alternate" type="text/html" href="https://wiki.finkproject.org/index.php?title=Fink:Packaging:x86_64&amp;diff=89&amp;oldid=prev"/>
		<updated>2010-05-06T20:23:50Z</updated>

		<summary type="html">&lt;p&gt;Removing  {{Fink_Header}}&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page contains information about building packages for the x86_64 architecture.&lt;br /&gt;
&lt;br /&gt;
==Fink and x86_64==&lt;br /&gt;
&lt;br /&gt;
Fink allows users to choose either a 32- or 64-bit Fink installation on 10.6 systems with 64-bit capable processors. Most packages do not need to be patched to support 64-bit systems because Finks adds /sw/var/lib/fink/path-prefix-10.6 to the PATH environmental variable before a package is built. This directory contains aliases for commonly used compiler driver names such as cc, gcc, c++, g++, and adds the appropriate -arch flag when invoking them: -arch i386 for 32-bit Fink, -arch x86_64 for 64-bit Fink. Note that -arch is an Apple GCC only flag.&lt;br /&gt;
&lt;br /&gt;
This should be enough for most build systems. However, there are some caveats.&lt;br /&gt;
&lt;br /&gt;
==Autoconf-based build systems==&lt;br /&gt;
&lt;br /&gt;
Autoconf-based systems use the config.guess script to identify the system type; the resulting identification is a triplet cpu-vendor-os. On Mac OS X, these triplets follow the format cpu-apple-darwinX, where cpu is powerpc, i386, or x86_64, and X is the major version outputted by uname -r. Valid examples are i386-apple-darwin9 and x86_64-apple-darwin10.&lt;br /&gt;
&lt;br /&gt;
Depending on the verifications performed by the configure script, it might be necessary to specify on which system type the resulting programs or libraries are meant to run. This is the purpose of the &amp;lt;tt&amp;gt;--host&amp;lt;/tt&amp;gt;=system_type parameter. Also, &amp;lt;tt&amp;gt;--build&amp;lt;/tt&amp;gt; should be defined whenever &amp;lt;tt&amp;gt;--host&amp;lt;/tt&amp;gt; is.&lt;br /&gt;
&lt;br /&gt;
In order to set &amp;lt;tt&amp;gt;--build&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;--host&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;ConfigureParams&amp;lt;/tt&amp;gt;, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ConfigureParams: --build=%m-apple-darwin`uname -r | cut -d. -f1` --host=%m-apple-darwin`uname -r | cut -d. -f1`&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or the equivalent in &amp;lt;tt&amp;gt;CompileScript&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Carbon==&lt;br /&gt;
&lt;br /&gt;
The [http://developer.apple.com/carbon Carbon API] contains libraries that are 32-bit only as well as libraries that are both 32- and 64-bit. Packages that build against Carbon libraries might need to be restricted to powerpc and i386 architectures (i.e., ''not'' x86_64) if they use functions that are only available in 32-bit format.&lt;br /&gt;
&lt;br /&gt;
==The LP64 data model==&lt;br /&gt;
&lt;br /&gt;
Mac OS X uses the LP64 data model, the same used in Linux. In LP64, &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt; is a 32-bit data type, whilst &amp;lt;tt&amp;gt;long&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;long long&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;size_t&amp;lt;/tt&amp;gt; are 64-bit data types. Pointers are 64-bit and cannot be stored in &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt; variables. When a program is being compiled for x86_64, GCC automatically defines the &amp;lt;tt&amp;gt;__LP64__&amp;lt;/tt&amp;gt; macro — use it in case you need conditional compilation for that architecture. More information is available in [http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/64bitPorting/index.html Apple's 64-bit Transition Guide].&lt;br /&gt;
&lt;br /&gt;
==-mdynamic-no-pic==&lt;br /&gt;
&lt;br /&gt;
In x86_64, GCC's -mdynamic-no-pic flag, which allowed applications not to be position-independent (PIC), is a no operation. This means that in x86_64 code must always be position-independent. See http://lists.apple.com/archives/Darwin-dev/2009/Dec/msg00035.html&lt;br /&gt;
&lt;br /&gt;
==Xcode projects==&lt;br /&gt;
&lt;br /&gt;
The ARCHS build setting can be used to specify a target architecture for an Xcode project as follows:&lt;br /&gt;
&lt;br /&gt;
 xcodebuild ARCHS=target_architecture &lt;br /&gt;
&lt;br /&gt;
Valid examples of &amp;lt;tt&amp;gt;target_architecture&amp;lt;/tt&amp;gt; include &amp;lt;tt&amp;gt;x86_64&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;i386&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;ppc&amp;lt;/tt&amp;gt;. Note that on PowerPC machines Fink expands &amp;lt;tt&amp;gt;%m&amp;lt;/tt&amp;gt; as &amp;lt;tt&amp;gt;powerpc&amp;lt;/tt&amp;gt; instead of the &amp;lt;tt&amp;gt;ppc&amp;lt;/tt&amp;gt; value supported by Xcode.&lt;br /&gt;
&lt;br /&gt;
[[Category: Fink|Packaging:x86_64]]&lt;br /&gt;
[[Category: Fink Packaging|x86_64]]&lt;/div&gt;</summary>
		<author><name>Fingolfin</name></author>
	</entry>
</feed>