{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/4804","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/4804/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/4804/comments","events_url":"https://api.github.com/repos/apple/swift/issues/4804/events","html_url":"https://github.com/apple/swift/pull/4804","id":177243101,"number":4804,"title":"FreeBSD compatibility patch","user":{"login":"kstaring","id":16140918,"avatar_url":"https://avatars.githubusercontent.com/u/16140918?v=3","gravatar_id":"","url":"https://api.github.com/users/kstaring","html_url":"https://github.com/kstaring","followers_url":"https://api.github.com/users/kstaring/followers","following_url":"https://api.github.com/users/kstaring/following{/other_user}","gists_url":"https://api.github.com/users/kstaring/gists{/gist_id}","starred_url":"https://api.github.com/users/kstaring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kstaring/subscriptions","organizations_url":"https://api.github.com/users/kstaring/orgs","repos_url":"https://api.github.com/users/kstaring/repos","events_url":"https://api.github.com/users/kstaring/events{/privacy}","received_events_url":"https://api.github.com/users/kstaring/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-09-15T17:53:59Z","updated_at":"2016-10-21T20:10:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/4804","html_url":"https://github.com/apple/swift/pull/4804","diff_url":"https://github.com/apple/swift/pull/4804.diff","patch_url":"https://github.com/apple/swift/pull/4804.patch"},"body":"This patch lets the current Swift 3 codebase compile on FreeBSD. The specific version tested with is FreeBSD 11-RC2.\r\nThe swift binary runs and perhaps more importantly, swiftc is able to at least compile simple programs-- more complicated code simply haven't been tested yet so more claims cannot be made.\r\n\r\n* although FreeBSD has Linux procfs support, this pull request includes a conditional #define for the procfs cmdline location on FreeBSD ( /proc/curproc/cmdline vs /proc/self/cmdline )\r\n* some conditional clauses in glibc.modulemap.gyb to not include a number of headers in /usr/include which don't exist/aren't needed on FreeBSD\r\n* conditionally disable pthread convenience wrappers since they didn't compile and aren't absolutely necessary to generate a running swift & swiftc\r\n* include /usr/local/include in the /stdlib/public/stubs CMakeLists.txt , otherwise the headers under /usr/local/include/unicode cannot be found\r\n* add a #define to have stdio.h export getline() in swift-demangle (see COMPATIBILITY in the FreeBSD getline(3) man page)\r\n* don't link libdl on FreeBSD\r\n\r\nPlease let me know any comments and improvements you might have.\r\n\r\nPS: due to the known ld recolation problem, it is required to (temporarily) symlink /usr/bin/ld to /usr/local/bin/ld.gold after having installed binutils.\r\n\r\nThis patch incoorporates some of @tinysun212  PR https://github.com/apple/swift/pull/3886/files#diff-99fd89ad44c4466de8ad6b8aab9c207d"},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/255453978","html_url":"https://github.com/apple/swift/pull/4804#issuecomment-255453978","issue_url":"https://api.github.com/repos/apple/swift/issues/4804","id":255453978,"user":{"login":"kstaring","id":16140918,"avatar_url":"https://avatars.githubusercontent.com/u/16140918?v=3","gravatar_id":"","url":"https://api.github.com/users/kstaring","html_url":"https://github.com/kstaring","followers_url":"https://api.github.com/users/kstaring/followers","following_url":"https://api.github.com/users/kstaring/following{/other_user}","gists_url":"https://api.github.com/users/kstaring/gists{/gist_id}","starred_url":"https://api.github.com/users/kstaring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kstaring/subscriptions","organizations_url":"https://api.github.com/users/kstaring/orgs","repos_url":"https://api.github.com/users/kstaring/repos","events_url":"https://api.github.com/users/kstaring/events{/privacy}","received_events_url":"https://api.github.com/users/kstaring/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T20:10:48Z","updated_at":"2016-10-21T20:10:48Z","body":"As a matter of fact, there will be a commit within the next hour ;-)\r\nThe commit will take care of some lingering problems. ld.gold is now automatically used for linking (one needs the binutils pkg to be installed). cmake previously didn't pick up the libicu include path and has now been replaced by working code. I'm now incoorporating the CommandLine.cpp @landonf and @dcci suggestions."}}
{"actor":{"display_login":"kstaring"}}