[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/tech/ - Technology

Catalog

Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Flag
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 3 per post.


File: 1458313841272.jpeg (46.95 KB, 547x334, 547:334, 1349459520.jpeg)

 No.545721

Will this replace gcc as the default compiler?

Is anyone actively using it?

 No.545723

Don;t a lot of programs actually rely on GCC specifically though?


 No.545725

>>545723

You mean they rely on hacks and tricks? Or they use it because it performs better?


 No.545728

>>545725

I mean is, doesn't GCC use some libraries and shit used as dependencies by a lot of programs?


 No.545729

>>545728

I am not sure what you are on about. Can you point me to some literature or anything about this issue?


 No.545735

>>545729

I think anon is talking about the GCC extensions.


 No.545748

Clang is awesome, but what i love about it is that it's fostering competition with gcc and they both have improved tremendeously through this.

All the clang tools are very useful from clang-format (state of the art in source code formatting) to clang-tidy (best free c and c++ linter, haven't had a rawpointer dangle since i've integrated in into my workflow) but nevertheless, having both a permissive and a nonpermissive licence for high profile compilers is a very good situation and i hope it stays that way.


 No.545762

Whether it's better or not is irrelevant. It represents part of a larger attempt to supplant the GNU coreutils or basic GNU/Linux userspace with alternatives that are ostensibly free, but in reality have big corporate backing and are fundamentally unhackable.


 No.545781

It compiles faster and it gives more useful warnings and errors than GCC, but the result performs worse. I actively use it as a compiler during testing.

>>545762

No, Apple did it because they didn't like how GCC (would have) required them to make other things free, mostly Objective C and Swift. Most of the GNU/Linux userspace doesn't give them that problem.

There's nothing fundamentally wrong with corporate backing, and Clang in particular is not unhackable.

>>545748

Why is having a high-profile base for proprietary compilers a good thing? Clang/LLVM being permissive only benefits you if you want to make a proprietary compiler. Compiler licensing doesn't affect the licensing of the software you compile with it.


 No.545791

>>545781

>No, Apple did it because they didn't like how GCC (would have) required them to make other things free, mostly Objective C and Swift. Most of the GNU/Linux userspace doesn't give them that problem.

What's interesting about this is that GCC contains objective c support, and swift was just recently open sourced.


 No.545801

FreeBSD-10/i386 moved to Clang a ?year and a bit ago. Phronoix did some benchmarks of FBSD/GCC and FBSD/Clang at the time, and GCC gave better code across the board.

NetBSD recently added a knob to build with Clang on i386/amd64 ...but there's too many clang-unsupported CPUs in NBSD for it to become a default.


 No.545803

>>545791

GCC contains Objective C support because Clang didn't exist when Objective C was created. Objective C being libre is basically the reason Clang exists.

Swift was just recently liberated - it was proprietary for over a year.


 No.545817

>>545721

I used it before for some of my earlier projects. Thing is, every distro I've ever used came with gcc by default and my stuff is still too simple to see a difference.


 No.545839

In terms of code base, LLVM is a million times nicer than GCC. GCC is a mess of spaghetti code, LLVM is tidy with as little bloat as possible.

In terms of license, maturity, compiler optimization suite, and actual usage, GCC is king. The only area that LLVM is better in real-world use is warning/error output and utilities like clang-format.


 No.545912

File: 1458330171241.jpg (17.37 KB, 300x188, 75:47, 1426217369168.jpg)

Okay guys don't have an autistic fit now but

how about using clang on windows? It can't be worse than the microshit compiler right? RIGHT?


 No.545936

clang people will often cry about gcc's 'undefined behavior' optimizations but they're why gcc consistently smokes their compiler. How long until they implement those optimizations and pretend they'd not shit all over gcc for them for years?


 No.546051

>>545781

In the context of gcc vs clang, it's not just about making a proprietary compiler, but any proprietary tools that need hooks into the compiler. E.g. the main reason Apple backs clang afaik is so that they have a compiler that can integrate with xcode.


 No.546090

>>545762

gcc is literally fundamentally unhackable. Stallman intentionally designed it that way because he didn't want it to even be possible for vendors to make their own tools with it.

Everyone that wanted to repurpose the compiler, even the open source devs, left for clang because it was designed to be modular and reusable. So the vast majority of tools out there that need C++ parsing or whatever embed clang.

Fucking autistic Stallman drones and your warped view of reality.

>>545912

Microsoft's compiler isn't that bad, it handles intrinsics much better than GCC at least, and they FINALLY started supporting the important bits of C99 a few years ago.

The problem is that at the exact same time that they started supporting C99, they also fucked Visual Studio so hard that it leaves your Windows 7 installation stuttering even after you uninstall it. Something about a forced "upgrade" to dwm.


 No.546098

>>546090

I just want a decent compiler for windows is that too much to ask?


 No.546311

>>546098

Why? Windows isn't for developers. It's for end-users.


 No.546335

>>546098

What's wrong with mingw-w64?


 No.546348

>>546335

Dont use mingw, use tdm-gcc

http://tdm-gcc.tdragon.net/


 No.546353

I don't know about the compiler itself, but when it comes to debugging I way prefer LLBD's interface. the GDB interface feels like commands were added on a whim whereas the LLDB commands form a hierarchy of commands. It's like using a Unix program inside a Unix program. The only thing I miss is a proper tutorial or user manual instead of having to dig though all the help messages.

https://www.youtube.com/watch?v=R1SsByHiMWQ

>>546311

(not that anon) Well duh, if you want to make software for users you need a compiler to build it for distribution.


 No.546488

>>546353

I've cross compiled for one arch to another. Is from one OS to another much different?


 No.546931

>>545721

>Will this replace gcc as the default compiler?

probably not. gcc has the advantage of being more mature, and it is being actively developed by companies too

>>545725

I think he meant both.

GCC extends the basic C standard with some features that Clang is trying to replicate. Some projects use std=gnu, some others do not.

Compiled binaries usually perform better. GCC is better at optimizing code, and Clang/LLVM builds code faster and using less memory (probably because it doesn't optimize as much as GCC).

>>545781

> it gives more useful warnings and errors than GCC

false: https://gcc.gnu.org/wiki/ClangDiagnosticsComparison

>>545781

>>546051

you both fundamentally agree. XCode could have used GCC's internals without problem, but it would have had to be released under the GPL as well. GCC even has a plugin architecture built-in.

>>545801

>FreeBSD

why am I not surprised? Many FreeBSD developers work on virtual machines running inside OSX in macbooks Apple donates to them.

>>545803

>Objective C being libre is basically the reason Clang exists.

so much this.

Steve Retarded Jobs didn't know his copyright law, much less he understood free software; so when he heard that there was a "free" compiler available he immediately instructed his employees to create Objective-C with it, and he never imagined that the FSF would require him to not keep Objective-C closed.

>>545839

>The only area that LLVM is better in real-world use is warning/error output and utilities like clang-format

I don't think so. Clang probably has nicer static analysis tools, but GCC is now on par if not better in terms of warning/error output. See the link above.

The only area where LLVM is better is in JIT capabilities, because GCC has no JIT at all although I think a Red Hat employee was working on it. This is why Mesa uses an LLVM software fallback; OpenGL needs to be optimized and compiled at runtime.

>>546090

so full of bullshit.

Stallman doesn't mind vendors interfacing with GCC, but he wants to do his best using the influence of GCC to spread the GPL to dependent projects. GCC is in fact explicitly designed to allow GPL tools to interoperate with it (i.e. Emacs) but it is also explicitly designed to to make it hard for non-GPL projects to interoperate with it. If you want to leverage GCC's capabilities you need to link to it; there's no easy way to pass data through IPC or something that wouldn't trigger a copyright derivative in court.

Hats off to Stallman for fighting relentlessly for the free software cause. The GCC case shows how fucking focused he is. It's a shame LLVM was created to be the bitch of proprietary masters, because it makes GCC lose its advantage bringing more free software to the world.

With LLVM this is not a problem because LLVM doesn't use the GPL. There's no extra library capabilities in LLVM that GCC lacks.

You fucking gullible retards that swallow anything the popular opinion throws at you. Why don't you fucking do your own research before spouting the same nonsense? You ungrateful cunts wouldn't even be able to program in Objective-C without sucking Apple's dick, hadn't it been for Stallman and his magnificent GCC agenda.


 No.547401

>>546488

gee whizkid you tell me

>>546931

>freebsd is developed on mac

trashman.jpg


 No.547510

>>546488

Optimus Kek


 No.547542

>>545723

just your gnu/cancerware working as intended anon


 No.547748

File: 1458569570931.png (33.89 KB, 480x112, 30:7, sql-loves-prism.png)

>>547542

Hello Microsoft!




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]