Does it make sense to fold FreeBSD specific patches to Swift into the upstream codebase?


(Brendan Sechter) #1

Currently the Swift source code is being patched so that it will build on FreeBSD. Does it make sense to just fold (most of?) these changes into the upstream Swift codebase?

A total of 9 files are patched. A casual review of the patches indicates that they are all making simple modifications so that FreeBSD is a supported operating system. Here is an example of one of the patches.

/usr/ports/lang/swift/files/patch-llvm_lib_Support_Unix_Process.inc complete listing

--- llvm/lib/Support/Unix/Process.inc.orig 2016-02-26 00:51:43 UTC

+++ llvm/lib/Support/Unix/Process.inc

@@ -36,7 +36,7 @@

// DragonFlyBSD, OpenBSD, and Bitrig have deprecated <malloc.h> for

// <stdlib.h> instead. Unix.h includes this for us already.

#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__) && \

- !defined(__OpenBSD__) && !defined(__Bitrig__)

+ !defined(__OpenBSD__) && !defined(__Bitrig__) && !defined(__FreeBSD__)

#include <malloc.h>

#endif

#if defined(HAVE_MALLCTL)


(Steve Wills) #2

Hi,

Currently the Swift source code is being patched so that it will build
on FreeBSD. Does it make sense to just fold (most of?) these changes
into the upstream Swift codebase?

That would be great. Also nice would be if there were an upstream CI for
FreeBSD at https://ci.swift.org/. I'm happy to help however I can.

A total of 9 files are patched. A casual review of the patches
indicates that they are all making simple modifications so that FreeBSD
is a supported operating system. Here is an example of one of the patches.

/usr/ports/lang/swift/files/patch-llvm_lib_Support_Unix_Process.inc
complete listing

Yep, and there are still some issues with certain versions of FreeBSD
that would be nice to iron out.

Steve

···

On 10/02/2016 13:38, Brendan Sechter wrote:


(John McCall) #3

Patches to support new targets are always(*) welcome in-tree.

John.

(*) Within reason. If your operating system only runs on an architecture with 7-bit bytes, sorry. :slight_smile:

···

On Oct 2, 2016, at 10:59 AM, Steve Wills via swift-dev <swift-dev@swift.org> wrote:
On 10/02/2016 13:38, Brendan Sechter wrote:

Currently the Swift source code is being patched so that it will build
on FreeBSD. Does it make sense to just fold (most of?) these changes
into the upstream Swift codebase?

That would be great. Also nice would be if there were an upstream CI for
FreeBSD at https://ci.swift.org/. I'm happy to help however I can.

A total of 9 files are patched. A casual review of the patches
indicates that they are all making simple modifications so that FreeBSD
is a supported operating system. Here is an example of one of the patches.

/usr/ports/lang/swift/files/patch-llvm_lib_Support_Unix_Process.inc
complete listing

Yep, and there are still some issues with certain versions of FreeBSD
that would be nice to iron out.


(Jordan Rose) #4

We're still looking into a good way to allow machines outside our network to interface with our CI, but we may come back and talk to you if/when that happens. :slight_smile:

Jordan

···

On Oct 2, 2016, at 10:59, Steve Wills via swift-dev <swift-dev@swift.org> wrote:

On 10/02/2016 13:38, Brendan Sechter wrote:

Currently the Swift source code is being patched so that it will build
on FreeBSD. Does it make sense to just fold (most of?) these changes
into the upstream Swift codebase?

That would be great. Also nice would be if there were an upstream CI for
FreeBSD at https://ci.swift.org/. I'm happy to help however I can.