this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge remote-tracking branch 'origin/master' into update-sources

+416 -134
+1 -1
cmake/darling_framework.cmake
··· 25 25 else (FRAMEWORK_IOSSUPPORT) 26 26 set(sys_library_dir "System/Library") 27 27 endif (FRAMEWORK_IOSSUPPORT) 28 - 28 + 29 29 if(DEFINED FRAMEWORK_PARENT) 30 30 if(NOT DEFINED FRAMEWORK_PARENT_VERSION) 31 31 # 99% of the time it's version A
+1 -1
cmake/dsym.cmake
··· 33 33 34 34 function(FindDsymutil) 35 35 # llvm-dsymutil-4.0 is not listed, because it's very buggy 36 - find_program(DSYMUTIL_EXE NAMES "llvm-dsymutil" "dsymutil" "dsymutil-7" "llvm-dsymutil-7.0" "llvm-dsymutil-6.0" "llvm-dsymutil-5.0" "llvm-dsymutil-3.9" "llvm-dsymutil-3.8" "llvm-dsymutil-3.7") 36 + find_program(DSYMUTIL_EXE NAMES "llvm-dsymutil" "dsymutil" "dsymutil-7" "llvm-dsymutil-7.0" "llvm-dsymutil-6.0" "llvm-dsymutil-5.0" "llvm-dsymutil-3.9" "llvm-dsymutil-3.8" "llvm-dsymutil-3.7" "dsymutil-10") 37 37 if (DSYMUTIL_EXE) 38 38 message(STATUS "Found dsymutil: ${DSYMUTIL_EXE}") 39 39 else (DSYMUTIL_EXE)
+6 -2
rpm/Dockerfile
··· 1 - ARG OS=fedora:30 1 + ARG OS=fedora:31 2 2 FROM ${OS} 3 3 4 4 SHELL ["bash", "-euxvc"] 5 5 6 6 RUN dnf install -y rpm-build dnf-utils rpmdevtools; \ 7 + source /etc/os-release; \ 8 + dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-${VERSION_ID}.noarch.rpm; \ 7 9 dnf clean all 8 10 9 11 # Bootstrap ··· 13 15 libglvnd-devel libjpeg-turbo-devel libjpeg-turbo-devel.i686 \ 14 16 libtiff-devel libtiff-devel.i686 mesa-libGL-devel mesa-libEGL-devel \ 15 17 python2 systemd-devel make libxml2-devel elfutils-libelf-devel \ 16 - libbsd-devel; \ 18 + libbsd-devel ffmpeg-devel pulseaudio-libs-devel openssl-devel \ 19 + giflib-devel libXrandr-devel libXcursor-devel libxkbfile-devel \ 20 + dbus-devel mesa-libGLU-devel; \ 17 21 dnf clean all 18 22 19 23 RUN mkdir -p /root/rpmbuild/SOURCES
+1 -1
rpm/SOURCES/dkms.conf
··· 1 1 PACKAGE_NAME=darling-mach 2 - PACKAGE_VERSION=0.1 2 + PACKAGE_VERSION=0.1.20200331 3 3 BUILT_MODULE_NAME="$PACKAGE_NAME" 4 4 BUILT_MODULE_LOCATION=lkm/ 5 5 DEST_MODULE_LOCATION[0]=/extra
+16 -8
rpm/SPECS/darling.spec
··· 4 4 %define debug_package %{nil} 5 5 6 6 Name: darling 7 - Version: 0.1 8 - Release: 4%{?dist} 7 + Version: 0.1.20200331 8 + Release: 1%{?dist} 9 9 Summary: Darling 10 10 11 11 Group: Utility ··· 26 26 BuildRequires: libglvnd-devel mesa-libGL-devel mesa-libEGL-devel 27 27 BuildRequires: libxml2-devel elfutils-libelf-devel 28 28 BuildRequires: libbsd-devel 29 + BuildRequires: ffmpeg-devel pulseaudio-libs-devel openssl-devel giflib-devel 30 + BuildRequires: libXrandr-devel libXcursor-devel libxkbfile-devel dbus-devel mesa-libGLU-devel 29 31 # Normally rpm will pick up all the mac pieces as dependencies. Disable that. 30 32 AutoReqProv: no 31 33 ··· 69 71 70 72 %{__install} -m 644 %{SOURCE1} %{?buildroot}/usr/src/%{name}-mach-%{version} 71 73 74 + # https://github.com/dell/dkms/issues/25 72 75 %preun mach 73 - /usr/sbin/dkms remove -m %{name}-mach -v %{version} --all || : 76 + /usr/sbin/dkms remove -m %{name}-mach -v %{version} --all --rpm_safe_upgrade || : 74 77 75 - %post mach 76 - occurrences=$(/usr/sbin/dkms status | grep "%{name}" | grep "%{version}" | wc -l) 77 - if [ ! ${occurrences} -gt 0 ]; 78 - then 79 - /usr/sbin/dkms add -m %{name}-mach -v %{version} || : 78 + %pre mach 79 + occurrences=$(/usr/sbin/dkms status "%{name}/%{version}" | wc -l) 80 + if [ ! ${occurrences} -gt 0 ]; then 81 + /usr/sbin/dkms remove -m %{name}-mach -v %{version} --all --rpm_safe_upgrade || : 80 82 fi 83 + 84 + %post mach 85 + /usr/sbin/dkms add -m %{name}-mach -v %{version} --rpm_safe_upgrade || : 81 86 /usr/sbin/dkms build -m %{name}-mach -v %{version} || : 82 87 /usr/sbin/dkms install -m %{name}-mach -v %{version} || : 83 88 ··· 90 95 %{_prefix}/src/%{name}-mach-%{version} 91 96 92 97 %changelog 98 + * Tue Aug 18 2020 Andy Neff <andy@visionsystemsinc.com> - 0.1.20200331-1 99 + - Update for latest version and Fedora 31 100 + 93 101 * Mon Aug 12 2019 Andy Neff <andy@visionsystemsinc.com> - 0.1-4 94 102 - Update for Fedora 30 95 103
+1 -1
rpm/build.bsh
··· 7 7 ln -s /src/rpm/SOURCES/darling.tar.gz /root/rpmbuild/SOURCES/ 8 8 else 9 9 # Preparing tarball 10 - tar --transform "s|^\./|./darling/|" -cf /root/rpmbuild/SOURCES/darling.tar.gz -C /src --exclude=.git --exclude SOURCES . 10 + tar --transform "s|^\./|./darling/|" -cf /root/rpmbuild/SOURCES/darling.tar.gz -C /src --exclude=.git --exclude SOURCES --exclude SRPMS --exclude RPMS . 11 11 fi 12 12 ln -s /src/rpm/SOURCES/dkms.conf /root/rpmbuild/SOURCES/ 13 13 #spectool -g -R /src/rpm/SPECS/darling.spec
+1 -1
rpm/docker-compose.yml
··· 5 5 build: 6 6 context: . 7 7 args: 8 - - OS=${RPM_OS-fedora:30} 8 + - OS=${RPM_OS-fedora:31} 9 9 volumes: 10 10 - ..:/src:ro 11 11 - ./RPMS:/root/rpmbuild/RPMS
+1 -1
rpm/tarup.bsh
··· 6 6 if [ -e "${CWD}/SOURCES/darling.tar.gz" ]; then 7 7 rm "${CWD}/SOURCES/darling.tar.gz" 8 8 fi 9 - tar --transform "s|^\./|darling/|" -cf "${CWD}/SOURCES/darling.tar.gz" -C "${CWD}/.." --exclude=.git --exclude SOURCES . 9 + tar --transform "s|^\./|darling/|" -cf "${CWD}/SOURCES/darling.tar.gz" -C "${CWD}/.." --exclude=.git --exclude SOURCES --exclude SRPMS --exclude RPMS .
+12 -5
src/dyld/CMakeLists.txt
··· 13 13 14 14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wno-availability -include ${CMAKE_SOURCE_DIR}/src/duct/include/CrashReporterClient.h") 15 15 set(CMAKE_SHARED_LINKER_FLAGS_SAVED "${CMAKE_SHARED_LINKER_FLAGS}") 16 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined,suppress") 16 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 17 17 18 18 add_definitions(-DHAVE_STDINT_H=1) 19 19 ··· 44 44 dyld3/ClosureBuilder.cpp 45 45 dyld3/Closure.cpp 46 46 dyld3/ClosureFileSystemPhysical.cpp 47 - dyld3/ClosurePrinter.cpp 47 + #dyld3/ClosurePrinter.cpp 48 48 dyld3/ClosureWriter.cpp 49 49 dyld3/Diagnostics.cpp 50 50 dyld3/shared-cache/DyldSharedCache.cpp ··· 58 58 dyld3/PathOverrides.cpp 59 59 dyld3/Tracing.cpp 60 60 61 - SIBLINGS 62 - system_c system_kernel compiler_rt platform 63 - DEPENDENCIES 61 + UPWARD 62 + system_c 63 + system_kernel 64 + system_malloc 65 + system_blocks 66 + system_pthread 67 + system_sandbox 68 + libdispatch_shared 69 + compiler_rt 70 + platform 64 71 launch 65 72 ) 66 73 set_target_properties(system_dyld PROPERTIES
+1 -2
src/kernel/emulation/linux/bsdthread/pthread_chdir.c
··· 6 6 #include "../../../../external/lkm/api.h" 7 7 #include "../fcntl/open.h" 8 8 #include "../unistd/close.h" 9 - #include "../vchroot_expand.h" 10 9 #include "per_thread_wd.h" 11 10 12 11 long sys_pthread_chdir(const char* path) 13 12 { 14 13 int rv, newfd; 15 - 14 + 16 15 newfd = sys_open(path, BSD_O_RDONLY | BSD_O_DIRECTORY | BSD_O_CLOEXEC, 0); 17 16 if (newfd < 0) 18 17 return newfd;
+4 -6
src/kernel/emulation/linux/stat/fstatat.c
··· 11 11 12 12 extern char* strcpy(char* dst, const char* src); 13 13 14 - #define AT_SYMLINK_NOFOLLOW 0x20 15 - 16 14 long sys_fstatat(int fd, const char* path, struct stat* stat, int flag) 17 15 { 18 16 int ret; ··· 23 21 return -EFAULT; 24 22 25 23 struct vchroot_expand_args vc; 26 - vc.flags = (flag & AT_SYMLINK_NOFOLLOW) ? 0 : VCHROOT_FOLLOW; 24 + vc.flags = (flag & BSD_AT_SYMLINK_NOFOLLOW) ? 0 : VCHROOT_FOLLOW; 27 25 vc.dfd = atfd(fd); 28 - 26 + 29 27 strcpy(vc.path, path); 30 28 ret = vchroot_expand(&vc); 31 29 if (ret < 0) ··· 57 55 return -EFAULT; 58 56 59 57 struct vchroot_expand_args vc; 60 - vc.flags = (flag & AT_SYMLINK_NOFOLLOW) ? 0 : VCHROOT_FOLLOW; 58 + vc.flags = (flag & BSD_AT_SYMLINK_NOFOLLOW) ? 0 : VCHROOT_FOLLOW; 61 59 vc.dfd = atfd(fd); 62 - 60 + 63 61 strcpy(vc.path, path); 64 62 ret = vchroot_expand(&vc); 65 63 if (ret < 0)
+1 -1
src/kernel/emulation/linux/unistd/faccessat.c
··· 15 15 16 16 struct vchroot_expand_args vc; 17 17 18 - vc.flags = 0; 18 + vc.flags = (flag & BSD_AT_SYMLINK_NOFOLLOW) ? 0 : VCHROOT_FOLLOW; 19 19 vc.dfd = atfd(fd); 20 20 21 21 strcpy(vc.path, filename);
+2 -2
src/kernel/emulation/linux/unistd/fchmodat.c
··· 60 60 int ret; 61 61 struct vchroot_expand_args vc; 62 62 63 - vc.flags = 0; 63 + vc.flags = (flag & BSD_AT_SYMLINK_NOFOLLOW) ? 0 : VCHROOT_FOLLOW;; 64 64 vc.dfd = atfd(fd); 65 - 65 + 66 66 strcpy(vc.path, path); 67 67 68 68 ret = vchroot_expand(&vc);
+2 -2
src/kernel/emulation/linux/unistd/linkat.c
··· 15 15 int ret; 16 16 struct vchroot_expand_args vc, vc2; 17 17 18 - vc.flags = 0; 18 + vc.flags = (flag & BSD_AT_SYMLINK_FOLLOW) ? VCHROOT_FOLLOW : 0; 19 19 vc.dfd = atfd(fd); 20 - 20 + 21 21 strcpy(vc.path, path); 22 22 23 23 vc2.flags = 0;
+8 -1
src/launchd/liblaunch/CMakeLists.txt
··· 10 10 add_definitions(-w -nostdinc) 11 11 12 12 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -include ${CMAKE_SOURCE_DIR}/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/fileport.h -ggdb") 13 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress") 13 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 14 14 15 15 mig(job.defs) 16 16 mig(helper.defs) ··· 30 30 SIBLINGS 31 31 system_c 32 32 system_kernel 33 + system_dyld 34 + DEPENDENCIES 35 + system_pthread 36 + system_malloc 37 + platform 38 + libdispatch_shared 39 + compiler_rt 33 40 ) 34 41 35 42 install(TARGETS launch DESTINATION libexec/darling/usr/lib/system)
-1
src/libinfo/CMakeLists.txt
··· 66 66 compiler_rt 67 67 launch 68 68 system_trace 69 - DEPENDENCIES 70 69 resolv-darwin 71 70 ) 72 71
+2 -1
src/libmalloc/CMakeLists.txt
··· 46 46 ${libmalloc_sources} 47 47 SIBLINGS 48 48 system_kernel 49 - system_c 50 49 platform 51 50 system_dyld 52 51 compiler_rt 52 + UPWARD 53 + system_c 53 54 ) 54 55 55 56 install(TARGETS system_malloc DESTINATION libexec/darling/usr/lib/system)
+1 -2
src/libnotify/CMakeLists.txt
··· 23 23 add_circular(system_notify FAT 24 24 SOURCES 25 25 ${notify_sources} 26 - SIBLINGS 26 + DEPENDENCIES 27 27 system_c 28 28 system_kernel 29 29 system_blocks ··· 37 37 xpc 38 38 ) 39 39 #target_link_libraries(system_notify system_c system_kernel system_blocks libdispatch_shared launch system_dyld system_malloc system_pthread) 40 - #make_fat(system_notify) 41 40 42 41 add_darling_executable(notifyutil notifyutil/notifyutil.c) 43 42
+16 -4
src/libresolv/CMakeLists.txt
··· 8 8 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/dnsinfo) 9 9 10 10 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -nostdinc -DUSE__RES_9") 11 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress") 11 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 12 12 13 13 # Hide warnings 14 14 add_definitions( ··· 51 51 set(DYLIB_COMPAT_VERSION "1.0.0") 52 52 set(DYLIB_CURRENT_VERSION "1.0.0") 53 53 set(DYLIB_INSTALL_NAME "/usr/lib/libresolv.9.dylib") 54 - add_darling_library(resolv-darwin SHARED ${resolv_sources}) 54 + 55 + add_circular(resolv-darwin FAT 56 + SOURCES 57 + ${resolv_sources} 58 + SIBLINGS 59 + system_info 60 + DEPENDENCIES 61 + system_pthread 62 + system_malloc 63 + system_c 64 + system_kernel 65 + system_dnssd 66 + system_notify 67 + system_dyld 68 + ) 55 69 set_target_properties(resolv-darwin PROPERTIES OUTPUT_NAME "resolv.9") 56 - make_fat(resolv-darwin) 57 - #target_link_libraries(resolv-darwin PRIVATE system) 58 70 59 71 InstallSymlink("libresolv.9.dylib" "${CMAKE_INSTALL_PREFIX}/libexec/darling/usr/lib/libresolv.dylib") 60 72 install(TARGETS resolv-darwin DESTINATION libexec/darling/usr/lib)
+1 -1
src/libsandbox/CMakeLists.txt
··· 8 8 src/sandbox.c 9 9 ) 10 10 set_target_properties(sandbox_not_system PROPERTIES OUTPUT_NAME sandbox.1) 11 - make_fat(sandbox) 11 + make_fat(sandbox_not_system) 12 12 target_link_libraries(sandbox_not_system system) 13 13 install(TARGETS sandbox_not_system DESTINATION libexec/darling/usr/lib) 14 14 InstallSymlink(libsandbox.1.dylib ${CMAKE_INSTALL_PREFIX}/libexec/darling/usr/lib/libsandbox.dylib)
+48 -84
src/libsystem/CMakeLists.txt
··· 30 30 31 31 set(DYLIB_INSTALL_NAME "/usr/lib/libSystem.B.dylib") 32 32 set(DYLIB_CURRENT_VERSION "1281.0.0") 33 - add_circular(system FAT 34 - SOURCES 35 - ${libsystem_sources} 36 - 37 - SIBLINGS 38 - 39 - system_malloc 33 + add_darling_library(system 34 + ${libsystem_sources} 40 35 ) 41 36 42 - target_link_libraries(system PRIVATE 43 - sandbox 44 - system_quarantine 45 - removefile 46 - system_copyfile 47 - system_coreservices 48 - system_coretls 49 - system_c 50 - system_kernel 51 - system_trace 52 - keymgr 37 + function(libsystem_reexport) 38 + while(ARGN) 39 + list(GET ARGN 0 sublib) 40 + list(GET ARGN 1 sublib_path) 53 41 54 - # workaround a CMake/ld link order bug 55 - # 56 - # for some reason, Apple's linker (which we build and use) decided that if system_malloc appears 57 - # after system_m, it won't emit LC_REEXPORT_LIBRARY for system_malloc. instead, it emits LC_LOAD_LIBRARY, 58 - # which kind of borks the System umbrella library and defeats the point of including it 59 - # 60 - # to add to that, CMake decided that, after adding system_darwin, it would no longer place system_malloc 61 - # before system_m like we had specified here 62 - # 63 - # so, as a workaround, we add this order explicitly and then add dependencies on the targets 64 - # 65 - # the `-Wl,-warn_commons` is just to fool CMake into thinking this is a link flag 66 - "-Wl,-warn_commons ../libmalloc/libsystem_malloc.dylib ../libm/libsystem_m.dylib" 42 + add_dependencies(system ${sublib}) 43 + set_property(TARGET system APPEND_STRING PROPERTY LINK_FLAGS 44 + " -Wl,-reexport_library -Wl,${CMAKE_BINARY_DIR}/${sublib_path} ") 45 + 46 + list(REMOVE_AT ARGN 0 1) 47 + endwhile(ARGN) 48 + endfunction(libsystem_reexport) 67 49 68 - system_info 69 - system_notify 70 - libdispatch_shared 71 - launch 72 - compiler_rt 73 - unwind 74 - system_dyld 75 - macho 76 - system_pthread 77 - platform 78 - system_asl 79 - system_duct 80 - system_blocks 81 - xpc 82 - corecrypto 83 - commonCrypto 84 - system_dnssd 85 - system_networkextension 86 - system_darwin 87 - libcache 50 + libsystem_reexport( 51 + system_sandbox src/sandbox/libsystem_sandbox.dylib 52 + system_quarantine src/quarantine/libquarantine.dylib 53 + removefile src/libremovefile/libremovefile.dylib 54 + system_copyfile src/copyfile/libcopyfile.dylib 55 + system_coreservices src/libsystem_coreservices/libsystem_coreservices.dylib 56 + system_coretls src/external/coretls/libsystem_coretls.dylib 57 + system_malloc src/libmalloc/libsystem_malloc.dylib 58 + system_c src/libc/libsystem_c.dylib 59 + system_kernel src/kernel/libsystem_kernel.dylib 60 + system_trace src/external/libtrace/libsystem_trace.dylib 61 + keymgr src/keymgr/libkeymgr.dylib 62 + system_m src/libm/libsystem_m.dylib 63 + system_info src/libinfo/libsystem_info.dylib 64 + system_notify src/libnotify/libsystem_notify.dylib 65 + libdispatch_shared src/external/libdispatch/libdispatch.dylib 66 + launch src/launchd/liblaunch/liblaunch.dylib 67 + compiler_rt src/external/compiler-rt/lib/builtins/libcompiler_rt.dylib 68 + system_dyld src/dyld/libdyld.dylib 69 + macho src/external/cctools/libmacho/libmacho.dylib 70 + system_pthread src/external/libpthread/src/libsystem_pthread.dylib 71 + platform src/external/libplatform/libsystem_platform.dylib 72 + system_asl src/external/syslog/libsystem_asl.tproj/libsystem_asl.dylib 73 + system_duct src/duct/src/libsystem_duct.dylib 74 + system_blocks src/external/libclosure/libsystem_blocks.dylib 75 + xpc src/external/libxpc/libxpc.dylib 76 + corecrypto src/external/corecrypto/libcorecrypto.dylib 77 + commonCrypto src/external/commoncrypto/libcommonCrypto.dylib 78 + system_dnssd src/lib/system/dnssd/libsystem_dnssd.dylib 79 + system_networkextension src/networkextension/libsystem_networkextension.dylib 80 + unwind src/libunwind/libunwind.dylib 81 + system_darwin src/libc/libdarwin/libsystem_darwin.dylib 82 + libcache src/libcache/libcache.dylib 88 83 ) 89 84 90 85 add_dependencies(system system_malloc system_m) 91 86 92 87 set_target_properties(system PROPERTIES OUTPUT_NAME "System.B") 93 - set_property(TARGET system APPEND_STRING PROPERTY LINK_FLAGS 94 - " -sub_library libsystem_malloc \ 95 - -sub_library libsystem_c \ 96 - -sub_library libsystem_kernel \ 97 - -sub_library libkeymgr \ 98 - -sub_library libsystem_m \ 99 - -sub_library libsystem_info \ 100 - -sub_library libsystem_notify \ 101 - -sub_library libquarantine \ 102 - -sub_library libsystem_blocks \ 103 - -sub_library libsystem_duct \ 104 - -sub_library libsystem_pthread \ 105 - -sub_library libsystem_platform \ 106 - -sub_library libsystem_trace \ 107 - -sub_library libdispatch \ 108 - -sub_library liblaunch \ 109 - -sub_library libremovefile \ 110 - -sub_library libcopyfile \ 111 - -sub_library libunwind \ 112 - -sub_library libdyld \ 113 - -sub_library libcompiler_rt \ 114 - -sub_library libmacho \ 115 - -sub_library libcommonCrypto \ 116 - -sub_library libsystem_sandbox \ 117 - -sub_library libsystem_coreservices \ 118 - -sub_library libsystem_coretls \ 119 - -sub_library libsystem_asl \ 120 - -sub_library libxpc \ 121 - -sub_library libcorecrypto \ 122 - -sub_library libsystem_dnssd \ 123 - -sub_library libsystem_networkextension \ 124 - -sub_library libsystem_darwin \ 125 - -sub_library libcache") 88 + 89 + make_fat(system) 126 90 127 91 install(TARGETS system DESTINATION libexec/darling/usr/lib) 128 92
+12 -5
src/sandbox/CMakeLists.txt
··· 1 1 project(libsandbox) 2 2 3 3 set(DYLIB_INSTALL_NAME "/usr/lib/system/libsystem_sandbox.dylib") 4 - add_darling_library(sandbox SHARED sandbox.c) 5 - target_link_libraries(sandbox PRIVATE system_c system_kernel system_dyld system_malloc) 6 - set_target_properties(sandbox PROPERTIES OUTPUT_NAME "system_sandbox") 7 - make_fat(sandbox) 4 + add_circular(system_sandbox FAT 5 + SOURCES 6 + sandbox.c 7 + 8 + SIBLINGS 9 + system_dyld 10 + DEPENDENCIES 11 + system_c 12 + system_kernel 13 + system_malloc 14 + ) 8 15 9 - install(TARGETS sandbox DESTINATION libexec/darling/usr/lib/system) 16 + install(TARGETS system_sandbox DESTINATION libexec/darling/usr/lib/system)
+26
src/simd/include/simd/simd.h
··· 1 + /* 2 + This file is part of Darling. 3 + 4 + Copyright (C) 2020 Lubos Dolezel 5 + 6 + Darling is free software: you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation, either version 3 of the License, or 9 + (at your option) any later version. 10 + 11 + Darling is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #ifndef SIMD_H 21 + #define SIMD_H 22 + 23 + #include <simd/vector_make.h> 24 + #include <simd/vector_types.h> 25 + 26 + #endif
+33
src/simd/include/simd/vector_make.h
··· 1 + /* 2 + This file is part of Darling. 3 + 4 + Copyright (C) 2020 Lubos Dolezel 5 + 6 + Darling is free software: you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation, either version 3 of the License, or 9 + (at your option) any later version. 10 + 11 + Darling is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #ifndef VECTOR_MAKE_H 21 + #define VECTOR_MAKE_H 22 + 23 + #include <simd/vector_types.h> 24 + 25 + inline simd_float3 simd_make_float3(float x, float y, float z) { 26 + return (simd_float3){x, y, z}; 27 + } 28 + 29 + inline simd_uint2 simd_make_uint2(unsigned int x, unsigned int y) { 30 + return (simd_uint2){x, y}; 31 + } 32 + 33 + #endif
+211
src/simd/include/simd/vector_types.h
··· 1 + /* 2 + This file is part of Darling. 3 + 4 + Copyright (C) 2020 Lubos Dolezel 5 + 6 + Darling is free software: you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation, either version 3 of the License, or 9 + (at your option) any later version. 10 + 11 + Darling is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #ifndef VECTOR_TYPE_H 21 + #define VECTOR_TYPE_H 22 + 23 + // typedef __attribute__((ext_vector_type())) ; 24 + #define simd_struct(NAME_TYPE, A, B) \ 25 + typedef struct { \ 26 + NAME_TYPE##B columns[A]; \ 27 + } NAME_TYPE##A##x##B 28 + 29 + #define simd_type(NAME_TYPE, SIZE) \ 30 + typedef NAME_TYPE##1 __attribute__((ext_vector_type(SIZE))) NAME_TYPE##SIZE 31 + 32 + typedef bool simd_bool; 33 + 34 + 35 + typedef char simd_char1; 36 + simd_type(simd_char, 2); // simd_char2 37 + simd_type(simd_char, 3); // simd_char3 38 + simd_type(simd_char, 4); // simd_char4 39 + simd_type(simd_char, 8); // simd_char8 40 + simd_type(simd_char, 16); // simd_char16 41 + simd_type(simd_char, 32); // simd_char32 42 + simd_type(simd_char, 64); // simd_char64 43 + 44 + typedef simd_char2 vector_char2; 45 + typedef simd_char3 vector_char3; 46 + typedef simd_char4 vector_char4; 47 + typedef simd_char8 vector_char8; 48 + typedef simd_char16 vector_char16; 49 + typedef simd_char32 vector_char32; 50 + 51 + 52 + typedef unsigned char simd_uchar1; 53 + simd_type(simd_uchar, 2); // simd_uchar2 54 + simd_type(simd_uchar, 3); // simd_uchar3 55 + simd_type(simd_uchar, 4); // simd_uchar4 56 + simd_type(simd_uchar, 8); // simd_uchar8 57 + simd_type(simd_uchar, 16); // simd_uchar16 58 + simd_type(simd_uchar, 32); // simd_uchar32 59 + simd_type(simd_uchar, 64); // simd_uchar64 60 + 61 + typedef simd_uchar2 vector_uchar2; 62 + typedef simd_uchar3 vector_uchar3; 63 + typedef simd_uchar4 vector_uchar4; 64 + typedef simd_uchar8 vector_uchar8; 65 + typedef simd_uchar16 vector_uchar16; 66 + typedef simd_uchar32 vector_uchar32; 67 + 68 + 69 + typedef short simd_short1; 70 + simd_type(simd_short, 2); // simd_short2 71 + simd_type(simd_short, 3); // simd_short3 72 + simd_type(simd_short, 4); // simd_short4 73 + simd_type(simd_short, 8); // simd_short8 74 + simd_type(simd_short, 16); // simd_short16 75 + simd_type(simd_short, 32); // simd_short32 76 + 77 + typedef simd_short2 vector_short2; 78 + typedef simd_short3 vector_short3; 79 + typedef simd_short4 vector_short4; 80 + typedef simd_short8 vector_short8; 81 + typedef simd_short16 vector_short16; 82 + typedef simd_short32 vector_short32; 83 + 84 + 85 + typedef unsigned short simd_ushort1; 86 + simd_type(simd_ushort, 2); // simd_ushort2 87 + simd_type(simd_ushort, 3); // simd_ushort3 88 + simd_type(simd_ushort, 4); // simd_ushort4 89 + simd_type(simd_ushort, 8); // simd_ushort8 90 + simd_type(simd_ushort, 16); // simd_ushort16 91 + simd_type(simd_ushort, 32); // simd_ushort32 92 + 93 + typedef simd_ushort2 vector_ushort2; 94 + typedef simd_ushort3 vector_ushort3; 95 + typedef simd_ushort4 vector_ushort4; 96 + typedef simd_ushort8 vector_ushort8; 97 + typedef simd_ushort16 vector_ushort16; 98 + typedef simd_ushort32 vector_ushort32; 99 + 100 + 101 + typedef int simd_int1; 102 + simd_type(simd_int, 2); // simd_int2 103 + simd_type(simd_int, 3); // simd_int3 104 + simd_type(simd_int, 4); // simd_int4 105 + simd_type(simd_int, 8); // simd_int8 106 + simd_type(simd_int, 16); // simd_int16 107 + 108 + typedef simd_int2 vector_int2; 109 + typedef simd_int3 vector_int3; 110 + typedef simd_int4 vector_int4; 111 + typedef simd_int8 vector_int8; 112 + typedef simd_int16 vector_int16; 113 + 114 + 115 + typedef unsigned int simd_uint1; 116 + simd_type(simd_uint, 2); // simd_uint2 117 + simd_type(simd_uint, 3); // simd_uint3 118 + simd_type(simd_uint, 4); // simd_uint4 119 + simd_type(simd_uint, 8); // simd_uint8 120 + simd_type(simd_uint, 16); // simd_uint16 121 + 122 + typedef simd_uint2 vector_uint2; 123 + typedef simd_uint3 vector_uint3; 124 + typedef simd_uint4 vector_uint4; 125 + typedef simd_uint8 vector_uint8; 126 + typedef simd_uint16 vector_uint16; 127 + 128 + 129 + typedef long simd_long1; 130 + simd_type(simd_long, 2); // simd_long2 131 + simd_type(simd_long, 3); // simd_long3 132 + simd_type(simd_long, 4); // simd_long4 133 + simd_type(simd_long, 8); // simd_long8 134 + 135 + typedef simd_long1 vector_long1; 136 + typedef simd_long2 vector_long2; 137 + typedef simd_long3 vector_long3; 138 + typedef simd_long4 vector_long4; 139 + typedef simd_long8 vector_long8; 140 + 141 + 142 + typedef unsigned long simd_ulong1; 143 + simd_type(simd_ulong, 2); // simd_ulong2 144 + simd_type(simd_ulong, 3); // simd_ulong3 145 + simd_type(simd_ulong, 4); // simd_ulong4 146 + simd_type(simd_ulong, 8); // simd_ulong8 147 + 148 + typedef simd_ulong1 vector_ulong1; 149 + typedef simd_ulong2 vector_ulong2; 150 + typedef simd_ulong3 vector_ulong3; 151 + typedef simd_ulong4 vector_ulong4; 152 + typedef simd_ulong8 vector_ulong8; 153 + 154 + 155 + typedef float simd_float1; 156 + simd_type(simd_float, 2); // simd_float2 157 + simd_type(simd_float, 3); // simd_float3 158 + simd_type(simd_float, 4); // simd_float4 159 + simd_type(simd_float, 8); // simd_float8 160 + simd_type(simd_float, 16); // simd_float16 161 + 162 + typedef simd_float2 vector_float2; 163 + typedef simd_float4 vector_float4; 164 + typedef simd_float8 vector_float8; 165 + typedef simd_float16 vector_float16; 166 + 167 + 168 + typedef double simd_double1; 169 + simd_type(simd_double, 2); // simd_double2 170 + simd_type(simd_double, 3); // simd_double3 171 + simd_type(simd_double, 4); // simd_double4 172 + simd_type(simd_double, 8); // simd_double8 173 + 174 + typedef simd_double2 vector_double2; 175 + typedef simd_double3 vector_double3; 176 + typedef simd_double4 vector_double4; 177 + typedef simd_double8 vector_double8; 178 + 179 + 180 + simd_struct(simd_float, 2, 2); // simd_float2x2 181 + simd_struct(simd_float, 3, 2); // simd_float3x2 182 + simd_struct(simd_float, 4, 2); // simd_float4x2 183 + simd_struct(simd_float, 2, 3); // simd_float2x3 184 + simd_struct(simd_float, 3, 3); // simd_float3x3 185 + simd_struct(simd_float, 4, 3); // simd_float4x3 186 + simd_struct(simd_float, 2, 4); // simd_float2x4 187 + simd_struct(simd_float, 3, 4); // simd_float3x4 188 + simd_struct(simd_float, 4, 4); // simd_float4x4 189 + 190 + simd_struct(simd_double, 2, 2); // simd_double2x2 191 + simd_struct(simd_double, 3, 2); // simd_double3x2 192 + simd_struct(simd_double, 4, 2); // simd_double4x2 193 + simd_struct(simd_double, 2, 3); // simd_double2x3 194 + simd_struct(simd_double, 3, 3); // simd_double3x3 195 + simd_struct(simd_double, 4, 3); // simd_double4x3 196 + simd_struct(simd_double, 2, 4); // simd_double2x4 197 + simd_struct(simd_double, 3, 4); // simd_double3x4 198 + simd_struct(simd_double, 4, 4); // simd_double4x4 199 + 200 + 201 + typedef struct { 202 + simd_double4 vector; 203 + } simd_quatd; 204 + 205 + typedef struct { 206 + simd_float4 vector; 207 + } simd_quatf; 208 + 209 + #undef simd_struct 210 + #undef simd_type 211 + #endif
+8 -1
src/startup/darling.c
··· 563 563 "/sbin:" 564 564 "/usr/local/bin"); 565 565 566 - const char* login = getlogin(); 566 + const char* login = NULL; 567 + struct passwd* pw = getpwuid(geteuid()); 568 + 569 + if (pw != NULL) 570 + login = pw->pw_name; 571 + 572 + if (!login) 573 + login = getlogin(); 567 574 if (!login) 568 575 { 569 576 fprintf(stderr, "Cannot determine your user name\n");