]> git.saurik.com Git - apple/libsystem.git/commitdiff
Libsystem-1225.1.1.tar.gz os-x-1011 os-x-10111 os-x-10112 os-x-10113 os-x-10114 os-x-10115 os-x-10116 v1225.1.1 v1226.10.1
authorApple <opensource@apple.com>
Fri, 4 Sep 2015 17:19:29 +0000 (17:19 +0000)
committerApple <opensource@apple.com>
Fri, 4 Sep 2015 17:19:29 +0000 (17:19 +0000)
Libsystem.xcconfig
Libsystem.xcodeproj/project.pbxproj
init.c
optionallibs
requiredlibs
xcodescripts/create_system_framework.sh

index a1ddf293405866c51b83542c51fba5a11c7ccd87..e9f5bd242a03f1d9fe428a445a94372fc82a2e9b 100644 (file)
@@ -1,12 +1,8 @@
 #include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig"
-#include "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/SimulatorSupport.xcconfig"
-
-// Set INSTALL_PATH[sdk=macosx*] when SimulatorSupport.xcconfig is unavailable
-INSTALL_PATH[sdk=macosx*] = $(INSTALL_PATH_ACTUAL)
 
 BUILD_VARIANTS = normal debug
-SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator iphoneosnano iphonesimulatornano
-INSTALL_PATH_ACTUAL = /usr/lib
+SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
+INSTALL_PATH = /usr/lib
 DYLIB_CURRENT_VERSION = $(CURRENT_VERSION_STRING_$(RC_XBS))
 ORDER_FILE = $(SDKROOT)/$(APPLE_INTERNAL_DIR)/OrderFiles/libSystem.order
 ORDER_FILE[sdk=iphonesimulator*] =
@@ -14,7 +10,7 @@ OTHER_CFLAGS = -include $(BUILT_PRODUCTS_DIR)/config.$(CURRENT_ARCH).$(CURRENT_V
 OTHER_LDFLAGS = -Wl,-search_paths_first -nodefaultlibs @$(BUILT_PRODUCTS_DIR)/linker_arguments.$(CURRENT_ARCH).$(CURRENT_VARIANT).txt
 LD_GENERATE_MAP_FILE = YES
 EXECUTABLE_PREFIX = lib
-PRIVATE_HEADERS_FOLDER_PATH = $(INSTALL_PATH_PREFIX)/usr/local/include/os
+PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include/os
 LIBRARY_SEARCH_PATHS = $(SDKROOT)/usr/lib/system $(SDKROOT)/usr/local/lib/system
 GCC_NO_COMMON_BLOCKS = YES
 GCC_WARN_64_TO_32_BIT_CONVERSION = YES
@@ -24,3 +20,7 @@ GCC_TREAT_WARNINGS_AS_ERRORS = YES
 GCC_WARN_UNUSED_VARIABLE = YES
 CURRENT_VERSION_STRING_ = 159
 CURRENT_VERSION_STRING_YES = $(CURRENT_PROJECT_VERSION)
+INFOPLIST_INSTALL_PATH = Versions/B/Resources
+INFOPLIST_INSTALL_PATH[sdk=iphoneos*] =
+INFOPLIST_INSTALL_PATH[sdk=*simulator*] =
+INFOPLIST_INSTALL_PATH[sdk=watchos*] =
index c3ba59d0c105e980f599cc049a5268ce84109d8b..ab049eae56e4e2b5bc4f93d75b09dc012227a2eb 100644 (file)
@@ -62,7 +62,7 @@
                BA2BD8FF136D27FE00FF78C0 /* CopyFiles */ = {
                        isa = PBXCopyFilesBuildPhase;
                        buildActionMask = 8;
-                       dstPath = "$(INSTALL_PATH_PREFIX)/System/Library/Frameworks/System.framework/Versions/B/Resources";
+                       dstPath = "$(INSTALL_PATH_PREFIX)/System/Library/Frameworks/System.framework/$(INFOPLIST_INSTALL_PATH)";
                        dstSubfolderSpec = 0;
                        files = (
                                BA2BD900136D282200FF78C0 /* Info.plist in CopyFiles */,
diff --git a/init.c b/init.c
index e09c5237cfb861111af72195b03ff52d4a6514e5..254815e255375b28da2348d17988c805358d5a30 100644 (file)
--- a/init.c
+++ b/init.c
@@ -26,7 +26,7 @@
  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 
-#include <TargetConditionals.h>        // for TARGET_OS_EMBEDDED
+#include <TargetConditionals.h>        // for TARGET_OS_*
 
 #include <stddef.h>
 #include <stdlib.h>
@@ -37,6 +37,8 @@
 #include <errno.h>
 #include <_libkernel_init.h> // Must be after voucher_private.h
 
+#include <mach-o/dyld_priv.h>
+
 // system library initialisers
 extern void mach_init(void);                   // from libsystem_kernel.dylib
 extern void __libplatform_init(void *future_use, const char *envp[], const char *apple[], const struct ProgramVars *vars);
@@ -47,6 +49,7 @@ extern void _dyld_initializer(void);          // from libdyld.dylib
 extern void libdispatch_init(void);            // from libdispatch.dylib
 extern void _libxpc_initializer(void);         // from libxpc.dylib
 extern void _libsecinit_initializer(void);        // from libsecinit.dylib
+extern void _libtrace_init(void);              // from libsystem_trace.dylib
 
 
 // signal malloc stack logging that initialisation has finished
@@ -66,6 +69,8 @@ extern void dispatch_atfork_prepare(void);
 extern void dispatch_atfork_parent(void);
 extern void dispatch_atfork_child(void);
 
+extern void _libtrace_fork_child(void);
+
 extern void _malloc_fork_prepare(void);
 extern void _malloc_fork_parent(void);
 extern void _malloc_fork_child(void);
@@ -87,9 +92,8 @@ extern void _libcoreservices_fork_child(void);
 extern char *_dirhelper(int, char *, size_t);
 #endif
 
-#if TARGET_IPHONE_SIMULATOR
-// no-op _pthread_clear_qos_tsd in the simulator, as its an upcall from libsyscall
-#define _pthread_clear_qos_tsd NULL
+#if TARGET_OS_EMBEDDED && !TARGET_OS_WATCH && !__LP64__
+extern void _vminterpose_init(void);
 #endif
 
 // advance decls for below;
@@ -146,21 +150,40 @@ libSystem_initializer(int argc,
        // TODO: Move __malloc_init before __libc_init after breaking malloc's upward link to Libc
        __malloc_init(apple);
 
-#if !TARGET_IPHONE_SIMULATOR
+#if !TARGET_OS_SIMULATOR
        /* <rdar://problem/9664631> */
        __keymgr_initializer();
 #endif
 
        _dyld_initializer();
+
+
        libdispatch_init();
        _libxpc_initializer();
 
-#if !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
+#if !(TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR)
        _libsecinit_initializer();
 #endif
 
        __stack_logging_early_finished();
 
+#if TARGET_OS_EMBEDDED && !TARGET_OS_WATCH && !__LP64__
+       _vminterpose_init();
+#endif
+
+       _libtrace_init(); // must be initialized after dispatch
+
+#if !TARGET_OS_IPHONE
+    /* <rdar://problem/22139800> - Preserve the old behavior of apple[] for
+     * programs that haven't linked against newer SDK.
+        */
+#define APPLE0_PREFIX "executable_path="
+       if (dyld_get_program_sdk_version() < DYLD_MACOSX_VERSION_10_11){
+               if (strncmp(apple[0], APPLE0_PREFIX, strlen(APPLE0_PREFIX)) == 0){
+                       apple[0] = apple[0] + strlen(APPLE0_PREFIX);
+               }
+       }
+#endif
 
        /* <rdar://problem/11588042>
         * C99 standard has the following in section 7.5(3):
@@ -215,6 +238,7 @@ libSystem_atfork_child(void)
        _libSC_info_fork_child();
 
        _pthread_fork_child_postinit();
+       _libtrace_fork_child(); // no prep work required for the fork
 }
 
 /*  
index f7425cdc5510b1bf159d94869a88ecedf9c55ae1..2885215e2260deb031c05cc9dbca6828823a9317 100644 (file)
@@ -1,10 +1,12 @@
 keymgr
 quarantine
-system_coreservices system_sim_coreservices
+system_containermanager
+system_coreservices
 system_coretls
 system_network
-system_secinit
-system_stats
-system_trace system_sim_trace
 system_networkextension
+system_secinit
+system_sim_trace
+system_trace
 unc
+vminterpose
index 9fa7c33668b784ecfe4dab70b5a2c121bf1f12f3..55c06a939c21d5d8132f6ff943fa1a69e8b6b399 100644 (file)
@@ -1,25 +1,25 @@
-cache cache_sim
+cache
 commonCrypto
 compiler_rt
-copyfile copyfile_sim
+copyfile
 corecrypto
 dispatch
 dyld
-launch launch_sim
-macho macho_sim
-removefile removefile_sim
-system_asl system_sim_asl
-system_blocks system_sim_blocks
-system_c system_sim_c
-system_configuration system_sim_configuration
-system_dnssd system_sim_dnssd
-system_info system_sim_info
+launch
+macho
+removefile
+system_asl
+system_blocks
+system_c
+system_configuration
+system_dnssd
+system_info
 system_kernel system_sim_kernel
-system_m system_sim_m
+system_m
 system_malloc
-system_notify notify_sim
+system_notify
 system_platform system_sim_platform
 system_pthread system_sim_pthread
-system_sandbox system_sim_sandbox
+system_sandbox
 unwind unwind_sim
 xpc
index 968dc58d31de1001dbe158edb1615d2b3343c675..bbc17a9dd4e68231d226950493e24b5223651b4e 100755 (executable)
@@ -13,24 +13,37 @@ VARIANTS="$5"
 
 FPATH="/System/Library/Frameworks/System.framework"
 
+# <rdar://problem/21815807> System.framework on iOS needs to be a special snowflake.
+# Other projects install headers into Versions/B/PrivateHeaders the sub-directories
+# and symlinks still need to exist, even though they don't fit in flat bundles.
 mkdir -p "${DSTROOT}/${FPATH}" || exit 1
-ln -sf "Versions/Current/PrivateHeaders" "${DSTROOT}/${FPATH}/PrivateHeaders" || exit 1
-ln -sf "Versions/Current/Resources" "${DSTROOT}/${FPATH}/Resources" || exit 1
-
 mkdir -p "${DSTROOT}/${FPATH}/Versions" || exit 1
-ln -sf "B" "${DSTROOT}/${FPATH}/Versions/Current" || exit 1
 mkdir -p "${DSTROOT}/${FPATH}/Versions/B" || exit 1
+ln -sf "B" "${DSTROOT}/${FPATH}/Versions/Current" || exit 1
+ln -sf "Versions/Current/PrivateHeaders" "${DSTROOT}/${FPATH}/PrivateHeaders" || exit 1
+
+if [[ "${PLATFORM_NAME}" =~ macosx ]]; then
+       ln -sf "Versions/Current/Resources" "${DSTROOT}/${FPATH}/Resources" || exit 1
 
-for variant in ${VARIANTS}; do
-    suffix=""
-    if [ ${variant} != "normal" ]; then
-       suffix="_${variant}"
-    fi
-    ln -sf "Versions/Current/System${suffix}" "${DSTROOT}/${FPATH}/System${suffix}" || exit 1
+       for variant in ${VARIANTS}; do
+               suffix=""
+               if [ ${variant} != "normal" ]; then
+                       suffix="_${variant}"
+               fi
+               ln -sf "Versions/Current/System${suffix}" "${DSTROOT}/${FPATH}/System${suffix}" || exit 1
+               ln -sf "../../../../../../usr/lib/libSystem.B${suffix}.dylib" "${DSTROOT}/${FPATH}/Versions/B/System${suffix}" || exit 1
+       done
+else
+       for variant in ${VARIANTS}; do
+               suffix=""
+               if [ ${variant} != "normal" ]; then
+                       suffix="_${variant}"
+               fi
 
-    if [[ "${PLATFORM_NAME}" =~ simulator ]] ; then
-       ln -sf "../../../../../../usr/lib/libSystem${suffix}.dylib" "${DSTROOT}/${FPATH}/Versions/B/System${suffix}" || exit 1
-    else
-       ln -sf "../../../../../../usr/lib/libSystem.B${suffix}.dylib" "${DSTROOT}/${FPATH}/Versions/B/System${suffix}" || exit 1
-    fi
-done
+               if [[ "${PLATFORM_NAME}" =~ simulator ]] ; then
+                       ln -sf "../../../../usr/lib/libSystem${suffix}.dylib" "${DSTROOT}/${FPATH}/System${suffix}" || exit 1
+               else
+                       ln -sf "../../../../usr/lib/libSystem.B${suffix}.dylib" "${DSTROOT}/${FPATH}/System${suffix}" || exit 1
+               fi
+       done
+fi