-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD: Search for newest clang compatible candidate #169
Conversation
I'd prefer we keep using un-suffixed version if it is present, checking for it first, even if it is not the newest version. This respects system-wide choices made by the |
/etc/alternatives seems to be some linuxism, it is not supported at all on FreeBSD (it's not in the base system). Clang base system version on a FreeBSD 10.2-RELEASE is 3.4.1. So, user has to install a clang package >= 3.5 in order to be compatible with what's defined in this shell script. For example, clang 3.5 package would install /usr/local/bin/clang35, /usr/local/bin/clang++35 etc. I didn't know about that alternatives system on Linux, I'm only using FreeBSD. |
Yes, it is.
Right, that was the intent. On FreeBSD, when would one get the un-suffixed 'clang' binary? And which version of Clang would it be on a recent system? |
the un-suffixed clang binary is only install with the base binaries installation, so whenever one is installing FreeBSD >= 9.1-RELEASE. |
3.4.1 is old, I agree. Since 11-CURRENT will ship with a new Clang, I'd prefer special casing older FreeBSD systems, pinning a specific version of Clang known to work there, while defaulting to the system compiler from the base installation in the general case. @GuillaumeBibaut, what do you think? |
Sure I understand about the general case. Would setting the HOST_CC and HOST_CXX variable before starting the build script be enough ? It doesn't feel really automatic, but it could be documented. |
The convention is to set the CC and CXX variables if we were to support it. I'm concerned that this would cause us to give people working on different systems different build advice, which would create barriers for contributing. build-script should just do the right thing for every system that we support. |
Sorry for the latency. I understand such barriers, but actually FreeBSD gets those barriers more than any other already supported OS for Swift build. I don't really know how to "pin" a specific version of clang in this script, or at least I don't understand what you've meant here. I'd really like to help contribute, but I don't really get what the solution could be. What I can tell you is that I'm trying to build Swift as a normal user on a FreeBSD 10.2-RELEASE where clang 3.4.1 is already installed in /usr/bin/clang and /usr/bin/clang++. I'd really like to come to a solution for this, but I don't really know how to make it. :) |
I understand that. When I said "pin" I meant check for OS version, and if it is a specific one (say, FreeBSD 10.*), then use "clang3x" binary, as appropriate for that system, skipping the automatic detection. Does this sound reasonable? |
I guess it is reasonable, I'll try to send in a new patch. |
I just hope that would be good enough :) I've also tried to merge the master in my branch to be sure it can be merged. |
@GuillaumeBibaut The differences tab shows other changes in addition to build-script changes... I'm not sure that's intended. May I ask you |
well ... I'm trying to follow some howto to rebase and squash commit, but it seems it has only add more files. |
Should I close this pull request and create a new one with just my patch ? |
Yeah do it and please tell me how and from where to learn language and
|
I had to reset to my git clone command and apply back the changes for FreeBSD support of clang. Let's hope it's ok now. |
Thank you, merging! |
FreeBSD: Search for newest clang compatible candidate
* The default `clang` that comes with FreeBSD 11 can already compile swift, so there is no need to install it separately. (See related [pull request](swiftlang/swift#169).) * `e2fsprogs-lluuid` has been renamed to `e2fsprogs-libuuid`. * When compiling swift the following error occurred: clang: error: invalid linker name in argument '-fuse-ld=gold' `binutils` supplies the missing linker.
Add fast path for queue.async(flags: .barrier)
Add fast path for queue.async(flags: .barrier) Signed-off-by: Daniel A. Steffen <[email protected]>
Documentation of printing phase and departures from Oppen's algorithm
Add casting methods to protocols
XFAIL for swift-4.2-branch the things that are failing and XFAILed on…
Seach for newest clang compatible candidate, and make this FreeBSD clang packages compatible.