aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-03 07:35:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-04 11:00:50 +0000
commit6085574e42bd56d2c8d9a9af403af10885018416 (patch)
tree8da28d3a388174a90b2904d21c63438837f3c780
downloadmeta-darwin-6085574e42bd56d2c8d9a9af403af10885018416.tar.gz
meta-darwin-6085574e42bd56d2c8d9a9af403af10885018416.tar.bz2
meta-darwin-6085574e42bd56d2c8d9a9af403af10885018416.zip
Initial population
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--.gitignore1
-rw-r--r--COPYING.MIT16
-rw-r--r--README24
-rw-r--r--conf/layer.conf9
-rw-r--r--conf/machine-sdk/i386-darwin.conf25
-rw-r--r--recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend3
-rw-r--r--recipes-core/packagegroups/packagegroup-cross-canadian.bbappend5
-rw-r--r--recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bbappend2
-rw-r--r--recipes-devtools/gcc/gcc-cross-canadian_4.8.bbappend14
-rw-r--r--recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bbappend10
-rw-r--r--recipes-devtools/gcc/gcc-crosssdk_4.8.bbappend9
-rw-r--r--recipes-devtools/gcc/gcc-runtime_4.8.bbappend6
-rw-r--r--recipes-devtools/gcc/libgcc_4.8.bbappend6
-rw-r--r--recipes-devtools/odcctools/files/fix-280.patch194
-rw-r--r--recipes-devtools/odcctools/files/fix-287.patch154
-rw-r--r--recipes-devtools/odcctools/odcctools-crosssdk_0.0.bb32
-rw-r--r--recipes-devtools/osx-runtime/files/LICENSE1
-rw-r--r--recipes-devtools/osx-runtime/nativesdk-osx-runtime_10.8.bb44
18 files changed, 555 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3551c9c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+OSX-sdk.zip
diff --git a/COPYING.MIT b/COPYING.MIT
new file mode 100644
index 0000000..9d982a4
--- /dev/null
+++ b/COPYING.MIT
@@ -0,0 +1,16 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README b/README
new file mode 100644
index 0000000..610d125
--- /dev/null
+++ b/README
@@ -0,0 +1,24 @@
+meta-darwin
+==========
+
+OpenEmbedded meta layer for darwin based SDKs
+
+Notes: odcctools is not 64 bit safe and forces compiles to use -m32. You also need libobjc
+installed along with 32 bit libraries for ssl (libcrypto) and libuuid.
+The odcctools2 version should be 64 bit safe and not need those workarounds.
+
+You also need a OS-X sysroot tarball/zip file generated from copied from a target
+system. This is placed in the osx-runtime files directory and is used to compile the SDK
+against it.
+
+
+This layer depends on:
+
+ URI: git://git.openembedded.org/openembedded-core
+ layers: meta
+ branch: master
+
+Layer Maintainer: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Please send changes to the yocto mailing list with [meta-darwin] in the subject line,
+cc'ing the maintainer.
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..53eb9d1
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,9 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH := "${BBPATH}:${LAYERDIR}"
+
+# We have a packages directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "meta-darwin"
+BBFILE_PATTERN_meta-darwin := "^${LAYERDIR}/"
+BBFILE_PRIORITY_meta-darwin = "8"
diff --git a/conf/machine-sdk/i386-darwin.conf b/conf/machine-sdk/i386-darwin.conf
new file mode 100644
index 0000000..5d322fa
--- /dev/null
+++ b/conf/machine-sdk/i386-darwin.conf
@@ -0,0 +1,25 @@
+SDK_ARCH = "i386"
+SDK_OS = "darwin"
+
+#GCCTHREADS_mingw32 = "win32"
+
+PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc = "nativesdk-osx-runtime"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk = "odcctools-crosssdk"
+PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-osx-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-libintl = "nativesdk-osx-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-libiconv = "nativesdk-osx-runtime"
+
+USE_NLS_darwin = "no"
+
+# Do what amounts to a NOOP
+SDK_PACKAGING_FUNC = "do_compile"
+
+SDKPKGSUFFIX = "nativesdk-darwin"
+
+# Remove -rpath and -rpath-link
+BUILDSDK_LDFLAGS = "-L${STAGING_LIBDIR} \
+ -L${STAGING_DIR_HOST}${base_libdir}"
+
+SDKUSE_NLS = "no"
+
+MACHINEOVERRIDES .= ":darwinsdk" \ No newline at end of file
diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
new file mode 100644
index 0000000..88e42a5
--- /dev/null
+++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -0,0 +1,3 @@
+RDEPENDS_${PN}_darwin = "\
+ nativesdk-libtool \
+ "
diff --git a/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend
new file mode 100644
index 0000000..7bb9fa2
--- /dev/null
+++ b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend
@@ -0,0 +1,5 @@
+RDEPENDS_${PN}_darwinsdk = "\
+ binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+ gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+ meta-environment-${TRANSLATED_TARGET_ARCH} \
+ "
diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bbappend b/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bbappend
new file mode 100644
index 0000000..f8ec68a
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bbappend
@@ -0,0 +1,2 @@
+#Remove -rpath-link and -rpath
+LDFLAGS_darwinsdk = "${BUILDSDK_LDFLAGS} -L${libdir}/.." \ No newline at end of file
diff --git a/recipes-devtools/gcc/gcc-cross-canadian_4.8.bbappend b/recipes-devtools/gcc/gcc-cross-canadian_4.8.bbappend
new file mode 100644
index 0000000..e3c29e9
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-cross-canadian_4.8.bbappend
@@ -0,0 +1,14 @@
+INSANE_SKIP_${PN}_append_darwinsdk = " staticdev"
+EXTRA_OECONF_append_darwinsdk = " --disable-nls"
+ELFUTILS_darwinsdk = ""
+
+#Remove -rpath-link and -rpath
+LDFLAGS_darwinsdk = "${BUILDSDK_LDFLAGS} -L${libdir}/.."
+
+# Change gxx-include-dir
+EXTRA_OECONF_PATHS_darwinsdk = "--with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}/usr/include/c++/4.2.1 \
+ --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
+ --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
+ --with-build-sysroot=${STAGING_DIR_TARGET}"
+
+RDEPENDS_${PN}_append_darwinsdk = " nativesdk-gettext nativesdk-gmp"
diff --git a/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bbappend b/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bbappend
new file mode 100644
index 0000000..33c5813
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bbappend
@@ -0,0 +1,10 @@
+
+LTO_darwin = "--disable-lto"
+
+do_install_append_darwin () {
+ ln -s ${STAGING_DIR_TARGET}/${target_exec_prefix}/ ${D}/${exec_prefix}/${TARGET_SYS}
+}
+
+sysroot_stage_all_append_darwin () {
+ sysroot_stage_dir ${D}${exec_prefix}/${TARGET_SYS} ${SYSROOT_DESTDIR}${exec_prefix}/${TARGET_SYS}
+}
diff --git a/recipes-devtools/gcc/gcc-crosssdk_4.8.bbappend b/recipes-devtools/gcc/gcc-crosssdk_4.8.bbappend
new file mode 100644
index 0000000..bbaf676
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-crosssdk_4.8.bbappend
@@ -0,0 +1,9 @@
+LTO_darwin = "--disable-lto"
+SYSTEMHEADERS_darwin = "/usr/include/"
+
+EXTRA_OECONF_darwin := "${@oe_filter_out('--with-linker-hash-style=${LINKER_HASH_STYLE}', '${EXTRA_OECONF}', d)}"
+EXTRA_OECONF_darwin := "${@oe_filter_out('--with-gnu-ld', '${EXTRA_OECONF}', d)}"
+EXTRA_OECONF_darwin := "${@oe_filter_out('--enable-libssp', '${EXTRA_OECONF}', d)}"
+EXTRA_OECONF_darwin := "${@oe_filter_out('--with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c\+\+', '${EXTRA_OECONF}', d)}"
+EXTRA_OECONF_append_darwin = " --disable-libssp"
+EXTRA_OECONF_append_darwin = " --with-gxx-include-dir=${STAGING_DIR_TARGET}/usr/include/c++/4.2.1"
diff --git a/recipes-devtools/gcc/gcc-runtime_4.8.bbappend b/recipes-devtools/gcc/gcc-runtime_4.8.bbappend
new file mode 100644
index 0000000..76e44da
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-runtime_4.8.bbappend
@@ -0,0 +1,6 @@
+export lt_cv_ld_exported_symbols_list = "yes"
+export ac_cv_lib_dl_dlopen = "yes"
+
+RUNTIMETARGET_darwin = "libssp"
+
+FILES_libssp_append_darwin = " ${libdir}/libssp*.dylib" \ No newline at end of file
diff --git a/recipes-devtools/gcc/libgcc_4.8.bbappend b/recipes-devtools/gcc/libgcc_4.8.bbappend
new file mode 100644
index 0000000..e14013e
--- /dev/null
+++ b/recipes-devtools/gcc/libgcc_4.8.bbappend
@@ -0,0 +1,6 @@
+do_install_append_darwin () {
+ install -d ${D}${libdir}
+ cp ${B}/${TARGET_SYS}/${BPN}/*.dylib ${D}${libdir}
+}
+
+FILES_${PN}_append_darwin = " ${libdir}/libgcc*.dylib"
diff --git a/recipes-devtools/odcctools/files/fix-280.patch b/recipes-devtools/odcctools/files/fix-280.patch
new file mode 100644
index 0000000..3ac8fbf
--- /dev/null
+++ b/recipes-devtools/odcctools/files/fix-280.patch
@@ -0,0 +1,194 @@
+Index: odcctools-9.2-ld/ld64/src/MachOReaderRelocatable.hpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/MachOReaderRelocatable.hpp 2013-08-15 14:29:30.863784082 +0000
++++ odcctools-9.2-ld/ld64/src/MachOReaderRelocatable.hpp 2013-08-15 14:29:30.931784083 +0000
+@@ -28,6 +28,7 @@
+ #include <stdint.h>
+ #include <math.h>
+ #include <unistd.h>
++#include <stdio.h>
+ #include <sys/param.h>
+ #include <mach-o/ppc/reloc.h>
+ #include <mach-o/stab.h>
+@@ -123,6 +124,21 @@
+ Kinds fKind;
+ };
+
++class BaseAtom : public ObjectFile::Atom
++{
++public:
++ BaseAtom() : fStabsStartIndex(0), fStabsCount(0) {}
++
++ virtual void setSize(uint64_t size) = 0;
++ virtual void addReference(ObjectFile::Reference* ref) = 0;
++ virtual void addLineInfo(const ObjectFile::LineInfo& info) = 0;
++ virtual void alignAtLeast(uint8_t align) = 0;
++
++ uint32_t fStabsStartIndex;
++ uint32_t fStabsCount;
++};
++
++
+
+ template <typename A>
+ Reference<A>::Reference(Kinds kind, const AtomAndOffset& at, const AtomAndOffset& toTarget)
+@@ -213,19 +229,6 @@
+ DataSegment DataSegment::fgSingleton;
+
+
+-class BaseAtom : public ObjectFile::Atom
+-{
+-public:
+- BaseAtom() : fStabsStartIndex(0), fStabsCount(0) {}
+-
+- virtual void setSize(uint64_t size) = 0;
+- virtual void addReference(ObjectFile::Reference* ref) = 0;
+- virtual void addLineInfo(const ObjectFile::LineInfo& info) = 0;
+- virtual void alignAtLeast(uint8_t align) = 0;
+-
+- uint32_t fStabsStartIndex;
+- uint32_t fStabsCount;
+-};
+
+
+ //
+Index: odcctools-9.2-ld/ld64/src/MachOWriterExecutable.hpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/MachOWriterExecutable.hpp 2013-08-15 14:29:30.863784082 +0000
++++ odcctools-9.2-ld/ld64/src/MachOWriterExecutable.hpp 2013-08-15 14:29:30.935784083 +0000
+@@ -5029,6 +5029,30 @@
+ }
+
+ template <>
++StubHelperAtom<x86_64>::StubHelperAtom(Writer<x86_64>& writer, ObjectFile::Atom& target, ObjectFile::Atom& lazyPointer)
++ : WriterAtom<x86_64>(writer, Segment::fgTextSegment), fName(stubName(target.getName())), fTarget(target)
++{
++ writer.fAllSynthesizedStubHelpers.push_back(this);
++
++ fReferences.push_back(new WriterReference<x86_64>(3, x86_64::kPCRel32, &lazyPointer));
++ fReferences.push_back(new WriterReference<x86_64>(8, x86_64::kPCRel32, writer.fDyldHelper));
++ if ( writer.fDyldHelper == NULL )
++ throw "symbol dyld_stub_binding_helper not defined (usually in crt1.o/dylib1.o/bundle1.o)";
++}
++
++// specialize lazy pointer for x86_64 to initially pointer to stub helper
++template <>
++LazyPointerAtom<x86_64>::LazyPointerAtom(Writer<x86_64>& writer, ObjectFile::Atom& target)
++ : WriterAtom<x86_64>(writer, Segment::fgDataSegment), fName(lazyPointerName(target.getName())), fTarget(target)
++{
++ writer.fAllSynthesizedLazyPointers.push_back(this);
++
++ StubHelperAtom<x86_64>* helper = new StubHelperAtom<x86_64>(writer, target, *this);
++ fReferences.push_back(new WriterReference<x86_64>(0, x86_64::kPointer, helper));
++}
++
++
++template <>
+ StubAtom<x86_64>::StubAtom(Writer<x86_64>& writer, ObjectFile::Atom& target)
+ : WriterAtom<x86_64>(writer, Segment::fgTextSegment), fName(stubName(target.getName())), fTarget(target)
+ {
+@@ -5165,20 +5189,6 @@
+ return "__jump_table";
+ }
+
+-
+-
+-template <>
+-StubHelperAtom<x86_64>::StubHelperAtom(Writer<x86_64>& writer, ObjectFile::Atom& target, ObjectFile::Atom& lazyPointer)
+- : WriterAtom<x86_64>(writer, Segment::fgTextSegment), fName(stubName(target.getName())), fTarget(target)
+-{
+- writer.fAllSynthesizedStubHelpers.push_back(this);
+-
+- fReferences.push_back(new WriterReference<x86_64>(3, x86_64::kPCRel32, &lazyPointer));
+- fReferences.push_back(new WriterReference<x86_64>(8, x86_64::kPCRel32, writer.fDyldHelper));
+- if ( writer.fDyldHelper == NULL )
+- throw "symbol dyld_stub_binding_helper not defined (usually in crt1.o/dylib1.o/bundle1.o)";
+-}
+-
+ template <>
+ uint64_t StubHelperAtom<x86_64>::getSize() const
+ {
+@@ -5211,17 +5221,6 @@
+ }
+
+
+-// specialize lazy pointer for x86_64 to initially pointer to stub helper
+-template <>
+-LazyPointerAtom<x86_64>::LazyPointerAtom(Writer<x86_64>& writer, ObjectFile::Atom& target)
+- : WriterAtom<x86_64>(writer, Segment::fgDataSegment), fName(lazyPointerName(target.getName())), fTarget(target)
+-{
+- writer.fAllSynthesizedLazyPointers.push_back(this);
+-
+- StubHelperAtom<x86_64>* helper = new StubHelperAtom<x86_64>(writer, target, *this);
+- fReferences.push_back(new WriterReference<x86_64>(0, x86_64::kPointer, helper));
+-}
+-
+
+ template <typename A>
+ LazyPointerAtom<A>::LazyPointerAtom(Writer<A>& writer, ObjectFile::Atom& target)
+Index: odcctools-9.2-ld/ld64/src/Options.cpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/Options.cpp 2013-08-15 14:29:30.863784082 +0000
++++ odcctools-9.2-ld/ld64/src/Options.cpp 2013-08-15 14:29:30.935784083 +0000
+@@ -29,6 +29,10 @@
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <vector>
++#include <stdio.h>
++#include <unistd.h>
++#include <string.h>
++#include <limits.h>
+ #include "config.h"
+
+ #include "strlcpy.h"
+Index: odcctools-9.2-ld/ld64/src/SectCreate.cpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/SectCreate.cpp 2013-08-15 14:29:30.863784082 +0000
++++ odcctools-9.2-ld/ld64/src/SectCreate.cpp 2013-08-15 14:29:30.935784083 +0000
+@@ -23,7 +23,10 @@
+ */
+
+ #include <vector>
+-
++#include <stdio.h>
++#include <unistd.h>
++#include <time.h>
++#include <string.h>
+ #include "ObjectFile.h"
+
+ namespace SectCreate {
+Index: odcctools-9.2-ld/ld64/Makefile.in
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/Makefile.in 2013-08-15 14:29:30.863784082 +0000
++++ odcctools-9.2-ld/ld64/Makefile.in 2013-08-15 14:29:30.935784083 +0000
+@@ -37,7 +37,7 @@
+ MYWARNINGS =
+ MYDEFS = -DDEBUG
+ MYLDFLAGS = -L$(top_builddir)/libstuff
+-MYLIBS = -lstuff
++MYLIBS = -lstuff -luuid
+
+ MYCOMPILEFLAGS = $(WARNINGS) $(MYWARNINGS) $(DEFS) $(MYDEFS) \
+ $(CPPFLAGS) $(MYINCLUDES) $(CFLAGS) $(MDYNAMICNOPIC)
+Index: odcctools-9.2-ld/ld64/src/ld.cpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/ld.cpp 2013-08-15 11:27:10.000000000 +0000
++++ odcctools-9.2-ld/ld64/src/ld.cpp 2013-08-15 14:38:22.975773627 +0000
+@@ -639,12 +639,12 @@
+
+ void Linker::getVMInfo(vm_statistics_data_t& info)
+ {
+- mach_msg_type_number_t count = sizeof(vm_statistics_data_t) / sizeof(natural_t);
+- kern_return_t error = host_statistics(mach_host_self(), HOST_VM_INFO,
+- (host_info_t)&info, &count);
+- if (error != KERN_SUCCESS) {
++ //mach_msg_type_number_t count = sizeof(vm_statistics_data_t) / sizeof(natural_t);
++ //kern_return_t error = host_statistics(mach_host_self(), HOST_VM_INFO,
++ // (host_info_t)&info, &count);
++ //if (error != KERN_SUCCESS) {
+ bzero(&info, sizeof(vm_statistics_data_t));
+- }
++ //}
+ }
+
+ void Linker::printStatistics()
diff --git a/recipes-devtools/odcctools/files/fix-287.patch b/recipes-devtools/odcctools/files/fix-287.patch
new file mode 100644
index 0000000..44a1516
--- /dev/null
+++ b/recipes-devtools/odcctools/files/fix-287.patch
@@ -0,0 +1,154 @@
+Index: odcctools-9.2-ld/ld64/src/MachOReaderRelocatable.hpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/MachOReaderRelocatable.hpp 2013-08-15 16:31:17.183614865 +0000
++++ odcctools-9.2-ld/ld64/src/MachOReaderRelocatable.hpp 2013-08-15 16:31:17.251614861 +0000
+@@ -28,6 +28,7 @@
+ #include <stdint.h>
+ #include <math.h>
+ #include <unistd.h>
++#include <stdio.h>
+ #include <sys/param.h>
+
+ #include <vector>
+@@ -83,6 +84,25 @@
+ uint32_t offset;
+ };
+
++class BaseAtom : public ObjectFile::Atom
++{
++public:
++ BaseAtom() : fStabsStartIndex(0), fStabsCount(0) {}
++
++ virtual void setSize(uint64_t size) = 0;
++ virtual void addReference(ObjectFile::Reference* ref) = 0;
++ virtual void sortReferences() = 0;
++ virtual void addLineInfo(const ObjectFile::LineInfo& info) = 0;
++ virtual uint64_t getObjectAddress() const = 0;
++ virtual uint32_t getOrdinal() const { return fOrdinal; }
++ virtual void setOrdinal(uint32_t value) { fOrdinal = value; }
++ virtual const void* getSectionRecord() const = 0;
++ virtual bool isAlias() const { return false; }
++
++ uint32_t fStabsStartIndex;
++ uint32_t fStabsCount;
++ uint32_t fOrdinal;
++};
+
+ template <typename A>
+ class Reference : public ObjectFile::Reference
+@@ -268,26 +288,6 @@
+
+ LinkEditSegment LinkEditSegment::fgSingleton;
+
+-class BaseAtom : public ObjectFile::Atom
+-{
+-public:
+- BaseAtom() : fStabsStartIndex(0), fStabsCount(0) {}
+-
+- virtual void setSize(uint64_t size) = 0;
+- virtual void addReference(ObjectFile::Reference* ref) = 0;
+- virtual void sortReferences() = 0;
+- virtual void addLineInfo(const ObjectFile::LineInfo& info) = 0;
+- virtual uint64_t getObjectAddress() const = 0;
+- virtual uint32_t getOrdinal() const { return fOrdinal; }
+- virtual void setOrdinal(uint32_t value) { fOrdinal = value; }
+- virtual const void* getSectionRecord() const = 0;
+- virtual bool isAlias() const { return false; }
+-
+- uint32_t fStabsStartIndex;
+- uint32_t fStabsCount;
+- uint32_t fOrdinal;
+-};
+-
+ class BaseAtomSorter
+ {
+ public:
+Index: odcctools-9.2-ld/ld64/src/Options.cpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/Options.cpp 2013-08-15 16:31:17.183614865 +0000
++++ odcctools-9.2-ld/ld64/src/Options.cpp 2013-08-15 16:31:17.251614861 +0000
+@@ -28,6 +28,10 @@
+ #include <mach/vm_prot.h>
+ #include <fcntl.h>
+ #include <vector>
++#include <stdio.h>
++#include <unistd.h>
++#include <string.h>
++#include <limits.h>
+
+ #include "strlcpy.h"
+ #include "config.h"
+Index: odcctools-9.2-ld/as/read.c
+===================================================================
+--- odcctools-9.2-ld.orig/as/read.c 2013-08-15 11:27:09.000000000 +0000
++++ odcctools-9.2-ld/as/read.c 2013-08-15 17:03:04.983570702 +0000
+@@ -507,7 +507,6 @@
+ { "lcomm", s_lcomm, 0 },
+ { "line", s_line, 0 },
+ { "long", cons, 4 },
+- { "word", cons, 4 },
+ { "quad", cons, 8 },
+ { "lsym", s_lsym, 0 },
+ { "section", s_section, 0 },
+Index: odcctools-9.2-ld/ld64/src/ld.cpp
+===================================================================
+--- odcctools-9.2-ld.orig/ld64/src/ld.cpp 2013-08-15 16:31:17.183614865 +0000
++++ odcctools-9.2-ld/ld64/src/ld.cpp 2013-08-15 16:53:09.007584481 +0000
+@@ -2926,42 +2926,42 @@
+ switch (fArchitecture) {
+ case CPU_TYPE_POWERPC:
+ if ( mach_o::relocatable::Reader<ppc>::validFile(p) )
+- return this->addObject(new mach_o::relocatable::Reader<ppc>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addObject(new mach_o::relocatable::Reader<ppc>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( mach_o::dylib::Reader<ppc>::validFile(p, info.options.fBundleLoader) )
+- return this->addDylib(new mach_o::dylib::Reader<ppc>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addDylib(new mach_o::dylib::Reader<ppc>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( archive::Reader<ppc>::validFile(p, len) )
+- return this->addArchive(new archive::Reader<ppc>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addArchive(new archive::Reader<ppc>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ break;
+ case CPU_TYPE_POWERPC64:
+ if ( mach_o::relocatable::Reader<ppc64>::validFile(p) )
+- return this->addObject(new mach_o::relocatable::Reader<ppc64>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addObject(new mach_o::relocatable::Reader<ppc64>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( mach_o::dylib::Reader<ppc64>::validFile(p, info.options.fBundleLoader) )
+- return this->addDylib(new mach_o::dylib::Reader<ppc64>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addDylib(new mach_o::dylib::Reader<ppc64>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( archive::Reader<ppc64>::validFile(p, len) )
+- return this->addArchive(new archive::Reader<ppc64>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addArchive(new archive::Reader<ppc64>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ break;
+ case CPU_TYPE_I386:
+ if ( mach_o::relocatable::Reader<x86>::validFile(p) )
+- return this->addObject(new mach_o::relocatable::Reader<x86>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addObject(new mach_o::relocatable::Reader<x86>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( mach_o::dylib::Reader<x86>::validFile(p, info.options.fBundleLoader) )
+- return this->addDylib(new mach_o::dylib::Reader<x86>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addDylib(new mach_o::dylib::Reader<x86>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( archive::Reader<x86>::validFile(p, len) )
+- return this->addArchive(new archive::Reader<x86>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addArchive(new archive::Reader<x86>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ break;
+ case CPU_TYPE_X86_64:
+ if ( mach_o::relocatable::Reader<x86_64>::validFile(p) )
+- return this->addObject(new mach_o::relocatable::Reader<x86_64>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addObject(new mach_o::relocatable::Reader<x86_64>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( mach_o::dylib::Reader<x86_64>::validFile(p, info.options.fBundleLoader) )
+- return this->addDylib(new mach_o::dylib::Reader<x86_64>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addDylib(new mach_o::dylib::Reader<x86_64>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( archive::Reader<x86_64>::validFile(p, len) )
+- return this->addArchive(new archive::Reader<x86_64>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addArchive(new archive::Reader<x86_64>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ case CPU_TYPE_ARM:
+ if ( mach_o::relocatable::Reader<arm>::validFile(p) )
+- return this->addObject(new mach_o::relocatable::Reader<arm>::Reader(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addObject(new mach_o::relocatable::Reader<arm>(p, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( mach_o::dylib::Reader<arm>::validFile(p, info.options.fBundleLoader) )
+- return this->addDylib(new mach_o::dylib::Reader<arm>::Reader(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addDylib(new mach_o::dylib::Reader<arm>(p, len, info.path, info.options, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ else if ( archive::Reader<arm>::validFile(p, len) )
+- return this->addArchive(new archive::Reader<arm>::Reader(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
++ return this->addArchive(new archive::Reader<arm>(p, len, info.path, info.modTime, fOptions.readerOptions(), fNextInputOrdinal), info, len);
+ break;
+ break;
+ }
diff --git a/recipes-devtools/odcctools/odcctools-crosssdk_0.0.bb b/recipes-devtools/odcctools/odcctools-crosssdk_0.0.bb
new file mode 100644
index 0000000..ce7be71
--- /dev/null
+++ b/recipes-devtools/odcctools/odcctools-crosssdk_0.0.bb
@@ -0,0 +1,32 @@
+SRC_URI = "svn://svn.macosforge.org/repository/odcctools;protocol=http;module=trunk"
+SRC_URI = "svn://iphone-dev.googlecode.com/svn/branches;protocol=http;module=odcctools-9.2-ld \
+ file://fix-${SRCREV}.patch"
+LICENSE = "ApplePSLicense-2.0"
+SRCREV = "287"
+
+PV = "0.0+svnr${SRCPV}"
+S = "${WORKDIR}/odcctools-9.2-ld"
+
+LIC_FILES_CHKSUM = "file://APPLE_LICENSE;md5=dacaafbaf91483700da837d31213a1e8"
+
+inherit autotools crosssdk
+
+PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
+
+EXTRA_OECONF = "--enable-ld64"
+BUILD_CFLAGS += "-m32"
+BUILD_LDFLAGS += "-m32"
+BUILD_CXXFLAGS += "-m32"
+
+do_install_append () {
+ ln -s ../libexec ${D}${bindir}/../libexec
+ ln -s ${TARGET_SYS}/gcc ${D}${exec_prefix}/libexec/gcc
+ mv ${D}${bindir}/${TARGET_PREFIX}ld ${D}${bindir}/${TARGET_PREFIX}ld_classic
+ ln -s ${TARGET_PREFIX}ld64 ${D}${bindir}/${TARGET_PREFIX}ld
+}
+
+
+sysroot_stage_all_append () {
+ sysroot_stage_dir ${D}${bindir}/.. ${SYSROOT_DESTDIR}${bindir}/..
+ sysroot_stage_dir ${D}${exec_prefix}/libexec ${SYSROOT_DESTDIR}${exec_prefix}/libexec
+}
diff --git a/recipes-devtools/osx-runtime/files/LICENSE b/recipes-devtools/osx-runtime/files/LICENSE
new file mode 100644
index 0000000..c20143a
--- /dev/null
+++ b/recipes-devtools/osx-runtime/files/LICENSE
@@ -0,0 +1 @@
+Proprietary \ No newline at end of file
diff --git a/recipes-devtools/osx-runtime/nativesdk-osx-runtime_10.8.bb b/recipes-devtools/osx-runtime/nativesdk-osx-runtime_10.8.bb
new file mode 100644
index 0000000..dc81604
--- /dev/null
+++ b/recipes-devtools/osx-runtime/nativesdk-osx-runtime_10.8.bb
@@ -0,0 +1,44 @@
+DESCRIPTION = "Runtime libraries from OSX"
+LICENSE = "Proprietary"
+
+COMPATIBLE_HOST = ".*-darwin.*"
+
+SRC_URI = "file://OSX-sdk.zip \
+ file://LICENSE"
+
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=03fe683ef28b9ddfe7f658a0f4b3b80e"
+
+S = "${WORKDIR}/OSX-sdk"
+#B = "${WORKDIR}/build-${TARGET_SYS}"
+
+inherit nativesdk
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+PROVIDES += "virtual/nativesdk-libc"
+PROVIDES += "virtual/nativesdk-${SDK_PREFIX}libc-initial"
+PROVIDES += "virtual/nativesdk-${SDK_PREFIX}libc-for-gcc"
+
+# Work around pulling in eglibc for now...
+PROVIDES += "virtual/nativesdk-libintl"
+PROVIDES += "virtual/nativesdk-libiconv"
+
+do_configure () {
+ :
+}
+
+do_compile () {
+ :
+}
+
+do_install () {
+ cp -r ${S}/* ${D}/
+}
+
+FILES_${PN} = "/usr"
+FILES_${PN}-staticdev = "/usr/lib/*.a"
+
+sysroot_stage_all() {
+ sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
+}
+