Skip to content

Commit

Permalink
Merge branch 'master' into patch-32
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBrokenRail authored Apr 28, 2021
2 parents 996d243 + 1c3749b commit e8ae4fa
Show file tree
Hide file tree
Showing 9,207 changed files with 486,659 additions and 374,143 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/build_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Build Issue
about: An issue building Darling
labels: 'build'
---

**Build Log**
What is the build error?
```
Put the build log here!
```

**System Information**
What system are you building with?

| Software | Version |
| --- | --- |
| Clang | X.Y.Z |
| CMake | X.Y.Z |
| Linux Kernel | X.Y.Z |
| Darling | Git Commit Hash |
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/lkm_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: LKM Bug
about: An issue with the Linux kernel module
labels: 'bug, linux kernel module'
---

**Expected Result**
What did you expect to happen?

**Actual Result**
What did happen?

**Steps To Reproduce**
1. If possible, what steps can you take to reproduce the issue?

**``dmesg`` Output**
Run ```dmesg | grep 'overlay\|darling'```
```
Put the command output here!
```

**System Information**
What system are you using?

| Software | Version |
| --- | --- |
| Linux Kernel | X.Y.Z |
| Darling | Git Commit Hash |
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/misc_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Miscellaneous Bug
about: A miscellaneous bug in Darling
labels: 'bug'
---

**Expected Result**
What did you expect to happen?

**Actual Result**
What did happen?

**Steps To Reproduce**
1. If possible, what steps can you take to reproduce the issue?

**System Information**
What system are you using?

| Software | Version |
| --- | --- |
| Linux Kernel | X.Y.Z |
| Darling | Git Commit Hash |
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/missing_framework.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Missing Framework
about: An application requires a missing framework
labels: 'frameworks, application compatibility'
---

**Framework**
What framework is required? What does Apple's developer documentation say about it? Is it open-source?

**Test Application**
What application requires this framework?

**Steps To Reproduce**
1. If possible, what steps can you take to reproduce the issue?

**System Information**
What system are you running?

| Software | Version |
| --- | --- |
| Darling | Git Commit Hash |
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/missing_library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Missing Library
about: An application requires a missing library
labels: 'libraries, application compatibility'
---

**Library**
What library is required? What does Apple's developer documentation say about it? Is it open-source?

**Test Application**
What application requires this library?

**Steps To Reproduce**
1. If possible, what steps can you take to reproduce the issue?

**System Information**
What system are you running?

| Software | Version |
| --- | --- |
| Darling | Git Commit Hash |
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/missing_tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Missing Built-In Tool
about: MacOS contains a command-line tool that Darling does not
labels: 'enhancement'
---

**Tool**
What tool is missing? What is it supposed to do? Is it or a variant open-source?

**Example Command**
What is an example command for this tool?

**System Information**
What system are you running?

| Software | Version |
| --- | --- |
| Darling | Git Commit Hash |
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/startup_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Startup Bug
about: An issue with Darling's startup
labels: 'bug, container'
---

**Expected Result**
What did you expect to happen?

**Actual Result**
What did happen?

**Steps To Reproduce**
1. If possible, what steps can you take to reproduce the issue?

**```strace``` Output**
Run ```sudo strace -f -u $USER darling shell```, what is the output?
```
Put the command output here!
```

**``dmesg`` Output**
Run ```dmesg | grep 'overlay\|darling'```
```
Put the command output here!
```

**System Information**
What system are you running?

| Software | Version |
| --- | --- |
| Linux Kernel | X.Y.Z |
| Darling | Git Commit Hash |
50 changes: 41 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[submodule "src/external/libcxxabi"]
path = src/external/libcxxabi
url = ../darling-libcxxabi.git
[submodule "src/external/libkqueue"]
path = src/external/libkqueue
url = ../darling-libkqueue.git
[submodule "src/external/zlib"]
path = src/external/zlib
url = ../darling-zlib.git
Expand Down Expand Up @@ -199,7 +196,6 @@
[submodule "src/external/zsh"]
path = src/external/zsh
url = ../darling-zsh.git

[submodule "src/external/mail_cmds"]
path = src/external/mail_cmds
url = ../darling-mail_cmds.git
Expand Down Expand Up @@ -320,11 +316,11 @@
path = src/external/libffi
url = ../darling-libffi.git
[submodule "src/external/dbuskit"]
path = src/external/dbuskit
url = ../darling-dbuskit.git
path = src/external/dbuskit
url = ../darling-dbuskit.git
[submodule "src/external/IOKitTools"]
path = src/external/IOKitTools
url = ../darling-IOKitTools.git
path = src/external/IOKitTools
url = ../darling-IOKitTools.git
[submodule "src/external/fmdb"]
path = src/external/fmdb
url = ../fmdb.git
Expand All @@ -333,4 +329,40 @@
url = ../darling-swift.git
[submodule "src/external/glut"]
path = src/external/glut
url = ../darling-glut
url = ../darling-glut.git
[submodule "src/external/energytrace"]
path = src/external/energytrace
url = ../darling-energytrace.git
[submodule "src/external/nghttp2"]
path = src/external/nghttp2
url = ../darling-nghttp2.git
[submodule "src/external/libressl-2.2.9"]
path = src/external/libressl-2.2.9
url = ../darling-libressl.git
[submodule "src/external/libressl-2.5.5"]
path = src/external/libressl-2.5.5
url = ../darling-libressl.git
[submodule "src/external/libressl-2.6.5"]
path = src/external/libressl-2.6.5
url = ../darling-libressl.git
[submodule "src/external/libressl-2.8.3"]
path = src/external/libressl-2.8.3
url = ../darling-libressl.git
[submodule "src/external/OpenLDAP"]
path = src/external/OpenLDAP
url = ../darling-openldap.git
[submodule "src/external/passwordserver_sasl"]
path = src/external/passwordserver_sasl
url = ../darling-passwordserver_sasl.git
[submodule "src/external/MITKerberosShim"]
path = src/external/MITKerberosShim
url = ../darling-MITKerberosShim.git
[submodule "src/external/mDNSResponder"]
path = src/external/mDNSResponder
url = ../darling-mDNSResponder.git
[submodule "src/external/BerkeleyDB"]
path = src/external/BerkeleyDB
url = ../darling-BerkeleyDB.git
[submodule "src/external/libnetwork"]
path = src/external/libnetwork
url = ../darling-libnetwork.git
33 changes: 32 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ endif()

SET(CMAKE_SKIP_RPATH TRUE)

# technically ignored by CMake when building on non-Apple platforms, but it's already a standard variable for the
# SDK deployment target, so we'll just use it and then add it to the compiler flags manually
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15 CACHE STRING "The version of macOS we're simulating")

project(darling)

cmake_minimum_required(VERSION 3.10)
Expand All @@ -41,6 +45,8 @@ include(InstallSymlink)
include(MacroEnsureOutOfSourceBuild)
include(dsym)
include(xcproj)
include(architecture)
include(create_symlink)

MACRO_ENSURE_OUT_OF_SOURCE_BUILD()

Expand All @@ -53,17 +59,39 @@ if (${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "i686|i386")
message(FATAL_ERROR "This software can only be built on x86-64 systems")
endif (${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "i686|i386")

SET(IGNORED_WARNINGS "-Wno-nullability-completeness -Wno-deprecated-declarations")
SET(IGNORED_WARNINGS "-Wno-nullability-completeness -Wno-deprecated-declarations -Wno-availability")

if (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS "3.9")
SET(IGNORED_WARNINGS "${IGNORED_WARNINGS} -Wno-expansion-to-defined")
endif (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS "3.9")

if(${CMAKE_C_COMPILER_ID} STREQUAL "Clang" AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL "11")
# newer Clang chokes on the idiomatic way to use CF_ENUM; e.g. like this:
# typedef CF_ENUM(int, MyEnum) {
# MY_ENUM_THING,
# MY_ENUM_OTHER_THING,
# # etc...
# }
set(IGNORED_WARNINGS "${IGNORED_WARNINGS} -Wno-elaborated-enum-base -Wno-undef-prefix")
set(ASM_IGNORED_WARNINGS "${ASM_IGNORED_WARNINGS} -Wno-undef-prefix")
endif()

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IGNORED_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNORED_WARNINGS}")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${ASM_IGNORED_WARNINGS}")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")

# set macOS deployment version
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")

# prevent object filename conflicts for two source files that differ only in extension (e.g. `object.c` and `object.m`)
set(CMAKE_C_OUTPUT_EXTENSION ".c.o")
set(CMAKE_CXX_OUTPUT_EXTENSION ".cpp.o")
set(CMAKE_OBJC_OUTPUT_EXTENSION ".m.o")

if(CMAKE_POSITION_INDEPENDENT_CODE)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
Expand All @@ -77,13 +105,16 @@ option(TARGET_i386 "Enable i386 slices" ON)
option(TARGET_x86_64 "Enable x86_64 slices" ON)
option(DEBIAN_PACKAGING "Packaging for Debian" OFF)
option(ENABLE_TESTS "Install in-prefix unit tests" OFF)
option(ADDITIONAL_PACKAGES "Include additional pacakges not included by default in a standard macOS installation" OFF)

FindDsymutil()
find_package(Setcap REQUIRED)

# Missing CMakeLists.txt must trigger an error
cmake_policy(SET CMP0014 NEW)

generate_architecture()

add_subdirectory(src)

install(DIRECTORY DESTINATION libexec/darling/private)
Expand Down
Loading

0 comments on commit e8ae4fa

Please sign in to comment.