Prerequisites
- Xcode 3.2.6 is installed at /Xcode-3_2_6
- Xcode 4.6.2 can be moved to /Applications/Xcode-4_6_2.app but is currently installed at /Applications/Xcode.app
Install Xcode 5.0.3
- Move the Xcode 4.6.2 application from /Applications to /Applications/Xcode-4_6_2.app in case things go wrong. Also, the Xcode 4 distribution will be used to supply LLVM-GCC support, so it must not be erased
- Drag the Xcode.app application into /Applications as normal
- Start Xcode 5 for the first time to complete its installation. This may take a long time is you have an anti-virus product
- Optionally install the command line tools, documentation, iOS Simulators
Restore 10.4u, 10.5, 10.6, 10.7 SDK support
cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
sudo ln -s /Xcode-3_2_6/SDKs/MacOSX10.4u.sdk .
sudo ln -s /Xcode-3_2_6/SDKs/MacOSX10.5.sdk .
sudo ln -s /Xcode-3_2_6/SDKs/MacOSX10.6.sdk .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk .
Restore GCC 4.0, 4.2, LLVM-GCC 4.2 support, and extend LLVM-GCC 4.2 to support PowerPC
• Using bash or sh, execute the following:
cd /Applications/Xcode.app/Contents/Developer/usr/bin
for SRC_FILE in /Xcode-3_2_6/usr/bin/*4.0*; do sudo ln -s "$SRC_FILE" .; done
for SRC_FILE in /Xcode-3_2_6/usr/bin/*4.2*; do if [[ ! -L "$SRC_FILE" ]]; then sudo ln -s "$SRC_FILE" .; fi done
cd /Applications/Xcode.app/Contents/Developer/usr/libexec
sudo ln -s /Xcode-3_2_6/usr/libexec/gcc gcc
• LLVM GCC support was completely removed in Xcode 5. Consequently, we link to the whole of the Xcode 4 distribution
cd /Applications/Xcode.app/Contents/Developer/usr
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2 .
cd /Applications/Xcode.app/Contents/Developer/usr/bin
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2/bin/i686-apple-darwin11-llvm-gcc-4.2 .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2/bin/i686-apple-darwin11-llvm-g++-4.2 .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-cpp-4.2 .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2 .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2 .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-g++ .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc .
• The following may be needed to build PowerPC on OS X 10.8 & 10.9, but only need to be done once as the llvm-gcc-4.2 directory is part of the Xcode 4 distribution, and so once updated, all future releases that used this Xcode4 distribution will pick up the change
cd /Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/bin
sudo ln -s /Xcode-3_2_6/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-g++-4.2 powerpc-apple-darwin12-llvm-g++-4.2
sudo ln -s /Xcode-3_2_6/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2 powerpc-apple-darwin12-llvm-gcc-4.2
sudo ln -s /Xcode-3_2_6/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-g++-4.2 powerpc-apple-darwin13-llvm-g++-4.2
sudo ln -s /Xcode-3_2_6/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2 powerpc-apple-darwin13-llvm-gcc-4.2
Restore PPC Architecture support to Xcode Build Settings
cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications
- Add the following text to MacOSX Architectures.xcspec
{
Type = Architecture;
Identifier = ppc;
Name = "Minimal (32-bit PowerPC only)";
Description = "32-bit PowerPC";
PerArchBuildSettingName = "PowerPC";
ByteOrder = big;
ListInEnum = No;
SortNumber = 201;
},
Restore GCC 4.0, 4.2, LLVM-GCC 4.2 Compiler support to Xcode Build Settings
cd /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins
sudo ln -s /Xcode-3_2_6/Library/Xcode/Plug-ins/GCC\ 4.0.xcplugin .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC\ 4.2.xcplugin .
sudo ln -s /Applications/Xcode-4_6_2.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/LLVM\ GCC\ 4.2.xcplugin .
Fix Xcode 4 Builds that never complete: /usr/bin/lipo Might be necessary for Xcode 5 builds too
For some reason, at some point in all this, /usr/bin/lipo was replaced with a 64 bit binary program that doesn’t seem to do much. The symptoms are when creating a universal binary, xcrun runs lipo repeatedly, and never completes. Eventually, the build hangs because Xcrun is waiting for a child process to complete and it doesn't properly. Executing /usr/bin/lipo directly doesn’t seem to respond in the same way as the real one.
Replace /usr/bin/lipo with the one provided in the Xcode 5 toolset. As root:
cd /usr/bin
mv lipo lipo.broken
ln -s /Applications/Xcode.app//Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden