Live data from Hacker News

Android NDK: GCC is now deprecated, everyone should be switching to Clang

android.googlesource.com

131–140 of 259 posts

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#131
post #9

Earlier quoted context omitted.

> I would guess they describe their work as "open source" and do not talk about freedom. Wow, what an asshole. Maybe they consider legal restrictions on how other people may use their software to be the opposite of freedom? Maybe that is the truth and maybe RMS has a good point to make, but how tone deaf is to call anything that isn't GNU, "unfree"? To suggest that they don't even talk about freedom because their lic…

No words like "free" or "freedom" appear anywhere on the http://llvm.org/ homepage. The license merely says "free of charge" without any kind of rationale. Certainly there's no GNU-style manifesto explaining their carefully-considered views on the rights a software user ought to have. Think what you like about whether they should talk about freedom, but we can easily confirm that they don't .

Similarly, no words like "freedom" appear on the home pages of many popular GPL-licensed projects. That doesn't mean that, "Mono doesn't talk about freedom". It doesn't mean that, "Python doesn't talk about freedom".

It means they didn't use the word, "freedom" on their home page. OpenBSD people care about and talk about freedom, I assure you. They have a track record of ejecting software with insufficiently free licenses from inclusion their project.

FreeBSD has switched to Clang because, among other reasons, they consider it freer. You and RMS may not agree that that it is indeed freer, but it is obnoxious and demonstrably untrue to say they, "don't talk about freedom".

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#132

Earlier quoted context omitted.

> God saves a puppy anytime someone filed a compiler bug with a trivial test case that demonstrates the problem. The current (r10e) shipping version of clang cannot return 128bit floats from a function. #include int main(int c, char **v) { std::stringstream("1.5"); double x; s >> x; return x == 1.5 ? 0 : 1; } EDIT: You don't need "long double" in the above. double (or float) will show the problem. The standard librar…

Ran the program with some slight modifications and couldn't reproduce it #include #include int main(int c, char **v) { std::stringstream s("1.5"); double x; s >> x; return x == 1.5 ? 0 : 1; } Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin15.2.0 Thread model: posix

I'd be wary of concluding that "if it works on Apple Clang, it will work on all Clangs". I've seen this to be untrue in multiple cases and the root cause can be found in a multitude of locations. LLVM, Clang, libc (glibc, musl, MSVC, Apple libC,), C++ STL (libstdc++, libc++, MSVC), compiler-rt, platform ABI (Apple ABI's are pretty much SysV, except when they aren't...), and of course the actual version/branch of all of these things. It is certainly a start but unfortunately an over-generalization. :)

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#133

Earlier quoted context omitted.

RMS is an idealist. If people actually made what he proposed (envisioned), world would be much better place. It is hard to see the entire impact of Free software and even harder to predict how the world would like if people actually stood up to it but I can say that I am sure we would have: - more secure Internet - more decentralized/distributed Internet - no ISP blocks - much harder if not even impossible NSA spying…

You listed a bunch of things without substantiating. For example, how would free software prevent the NSA from spying? Internet backbone taps don't care if your HTTP implementation is running under Windows or Linux...

> how would free software prevent the NSA from spying?

A lot of hard problems come from the fact that you need lots of developer attention to build and maintain solutions that just work. The domain is tricky and complex enough to where, you can make it zero-effort for one configuration, but making it zero-effort for all possible or even all likely configurations takes more resources than is available.

The example relevant here is cryptography software. It's not hard to encrypt stuff. It's hard to make end-to-end solutions that just work, for all possible uses and across all possible platforms.

Free software has a restrictive effect of only making software platforms that are open and extensible, vastly reducing the effort needed to maintain end-to-end, user-friendly encryption.

It would make it pretty much impossible for the NSA to spy on citizens if we only had free software platforms to support.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#134
post #117

Earlier quoted context omitted.

> Look the GPL is a hard choice. It is very unfriendly to a developer who is looking to make a living on their code, since it makes selling that code as an artifact. It seems like you accidentally a word somewhere in here, but know that you can charge ANY price you want for compiled software distributed under the terms of the GPL. Your only requirement is to -upon request from one to whom you have distributed your so…

Yeah. iPhone on a train is not an ideal way to have an Internet argument. My point was it complicates the business model of selling software artifacts since the GPL does not prevent downstream dissemination of the source so long as the GPL is not violated. So the fairly common business of selling a binary blob of functionality that ceases to legally be useful after the license expires falls down with GPL licensed sof…

> And I think that [a commercial software ecosystem that favors software sellers over software buyers is] what angers people. It's certainly the impetus behind Open Source.

If I've correctly characterized your statement, I can't agree with it.

RMS was originally motivated by his sudden inability to get access to the code for the driver for their computer lab's fancy laser printer to fix an embarrassingly bad bug that was wasting a bunch of other people's time. Many people prefer open source software because the guaranteed availability of source code helps to keep software that BigCos would no longer maintain (for whatever reason) alive, or dramatically improve software that companies can't be arsed to get right. [0]

> So the fairly common business of selling a binary blob of functionality that ceases to legally be useful after the license expires falls down with GPL licensed software.

Eh? AFAICT, the model still stands.

If you've written everything in house, dual-license it. If you've not, and if you're writing software for BigCos, [1] put a clause in your support contract that stipulates that for the next X years, $CLIENT will upgrade to $LATEST_VERSION after $REASONABLE_TIME_PERIOD and will not use older versions, or else suffer termination of the support contract and monetary penalties.

I mean, lots of people pay for (and keep upgrading) RHEL rather than use Centos or Scientific Linux.

[0] Ferinstance, DD-WRT and OpenWRT have been really, really good for the state of home WiFi router security.

[1] Which -frankly- is the only place I would expect to find such a license.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#135
How diverse are the CPU manufacturers for android phones? The major concern when it comes to Clang is that developers will need to buy proprietary plugins to compile open source code that depend on proprietary features, or to have application run in native speed.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#136
post #59
post #37

Earlier quoted context omitted.

RMS saying that other developers have a different concept of software freedom is reasonable. RMS saying that the difference is important, and his idea of software freedom is reasonable and worth debating. Saying that other developers, "don't talk about freedom" because they use a different license is first class assholitry.

It's more reasonable that your stance here. You can quibble about how to define freedom, but given that RMS includes freedom from future vendor lock-in, it's entirely reasonable for him to say that other developers don't talk about freedom (as he means it) - because they don't. It's not hypothetical - BSD-derived code has been used in closed-source operating systems (both windows and notably macos) and lots of other…

> it's entirely reasonable for him to say that other developers don't talk about freedom (as he means it) - because they don't.

This is complete nonsense. Clang is replacing GCC in many BSD-licensed projects exactly because they feel it is more free than GCC. You don't have to agree that they are right, but saying they aren't talking about it is obnoxious and false.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#137
post #72

Earlier quoted context omitted.

RMS is a politician, dude; calm down. Let's look at the preceding sentences: > The Clang and LLVM developers reach different conclusions from ours because they do not share our values and goals. They object to the measures we have taken to defend freedom because they see the inconvenience of them and do not recognize (or don't care about) the need for them. I would guess they describe their work as "open source" and…

While I see where you're coming from, and I don't agree with the way you've framed this. That idiosyncratic and generally unshared definition of "freedom" does, to me, make him (and his devotees) at least a little shitty when they attempt to claim moral superiority based on it. I feel the same way about other religionists who assert judgment based on their own pet beliefs, it's not an FSF-specific thing.

Yeah, agreed that it's a shitty, though effective, rhetorical technique. I just think haroldp overreacted to it.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#138
post #89
post #69

Earlier quoted context omitted.

> Plus it seems extra presumptuous to claim some kind of inherent right to profit off derivative works of my software. Who's claiming that? On the other hand, I've met more than a few pro-FSF people who seem to think it's cromulent to claim that I don't have the right to profit off my work (which is insane; you can pick whatever license you'd like, copyleft or not, and so can I).

You aren't profiting off your work, you're piggybacking off their work with just enough tweaks to sell it. Go write your own software if you want to profit off your work. Then you won't have to deal with the copyleft licenses because you won't be using anyone else's work. Which is the exact purpose of a copyleft license.

I think you should re-read my post. I don't have a problem with other people choosing to use the GPL, and dealing with its terms or choosing not to use it. I have a problem with the temerity of people like the FSF insisting I use copyleft or I'm somehow immoral.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#139

I'm not sure if this will stoke a flamewar, because I've never seen a discussion here on this (might just be hanging around different articles). Is there any technical reason to prefer clang over gcc other than ideological reasons? I get the modular nature of llvm is useful, but is the android NDK using this feature? Quick google search shows clang lagging gcc in all but one test[0] at least on Intel Broadwell. Again…

Better security features for one. Clang supports SafeStack and Control Flow Integrity. SafeStack is much more performant than gcc's stack protectors, and gcc offers no equivalent of CFI.

So, I'm not familiar with all of the CFI protections available in clang, but is full CFI actually implemented in CLANG?

Especially with C/C++, there are a lot of potential attack vectors that would need to be closed (stack smashing, ROP, Vtable corruption). From a laymans perspective, some of these need full memory corruption protection.

Any references would be appreciated. The last time I had to adress CFI in C, static analysis (with greater precision than CLANG had) was involved.

Re: Android NDK: GCC is now deprecated, everyone should be switching to Clang

#140
post #72

Earlier quoted context omitted.

While I see where you're coming from, and I don't agree with the way you've framed this. That idiosyncratic and generally unshared definition of "freedom" does, to me, make him (and his devotees) at least a little shitty when they attempt to claim moral superiority based on it. I feel the same way about other religionists who assert judgment based on their own pet beliefs, it's not an FSF-specific thing.

Yeah, agreed that it's a shitty, though effective, rhetorical technique. I just think haroldp overreacted to it.

It can be effective, but you need a much, much stronger kind of charisma and a better grasp of rhetoric than Stallman or your typical FSF zealot. When delivered by somebody who gets spittle-flecked about this stuff, it makes you crazy and a jerk, instead of just a jerk.
Post reply on HN