Questions tagged [gcc]

Questions regarding GNU Compiler Collection Suite.

GNU Compiler Collection, or formerly GNU C Compiler, is a suite of compiler tools for various programming languages like: C, C++, Objective-C, Java, Ada, Fortran, and Go. The GNU Compiler collection had it's first release back in 1987. GCC has been written initially by Richard Stallman and is currently maintained by the Free Software Foundation.

713 questions
252
votes
4 answers

Why is FreeBSD deprecating GCC in favor of Clang/LLVM?

So I was surfing the net and stumbled upon this article. It basically states that FreeBSD, starting from Version 10 and above will deprecate GCC in favor of Clang/LLVM. From what I have seen around the net so far, Clang/LLVM is a fairly ambitious…
NlightNFotis
  • 7,525
  • 7
  • 32
  • 38
64
votes
4 answers

How to compile the C compiler from scratch, then compile Unix/Linux from scratch

Let's say I work for a large services organisation outside the US/UK. We use UNIX and Linux servers extensively. Reading through this article it mentions that it would be easy to insert a backdoor into a C compiler, then any code compiled with that…
David J
  • 743
  • 6
  • 6
47
votes
4 answers

configure: error: C compiler cannot create executables

I am trying to upgrade apache 2.2.15 to 2.2.27. While running config.nice taken from apache2.2.15/build I am getting following error: checking whether the C compiler works... no configure: error: in `/home/vkuser/httpd-2.2.27/srclib/apr': configure:…
Vishal
  • 597
  • 1
  • 4
  • 8
46
votes
1 answer

How long does it take to compile gcc 7.3.0?

So far it's been running for about 4 hours. One thing to note is that I did not have the prerequisites and had to download them though contrib/download_prerequisites. Not sure if it adds to the compile time or not. Machine specs listed below: 4 CPUs…
Ya.
  • 1,133
  • 1
  • 9
  • 9
42
votes
1 answer

How does this Makefile makes C program without even specifying a compiler?

I was using a Makefile from the book "Advanced Linux Programming (2001)" [code]. It was strange for me to see that GNU make does compile the code correctly, without even specifying a compiler in the Makefile. It's like baking without any…
Ho1
  • 2,552
  • 3
  • 20
  • 25
36
votes
4 answers

Relationship between cc1 and gcc?

I'm trying to install Ruby in my home directory on a Linux server (without root access), which of course requires using gcc. The closest thing I can find is a directory by that name which (if you go deep enough) contains cc1: >: find / -iname gcc…
iconoclast
  • 9,057
  • 12
  • 56
  • 95
31
votes
4 answers

What is the gold linker?

Has anyone used the gold linker before? To link a fairly large project, I had to use this as opposed to the GNU ld, which threw up a few errors and failed to link. How is the gold linker able to link large projects where ld fails? Is there some kind…
placid chat
  • 691
  • 1
  • 6
  • 19
23
votes
6 answers

Is the standard C library loaded by default in main memory in Linux?

Since the majority of the Linux kernel is written in the C language, so when the kernel gets loaded in Main memory, does the standard C library also get loaded along the Linux kernel? If that's the reason the programs written in C consume less…
Sumit Joshi
  • 355
  • 3
  • 7
23
votes
5 answers

How to install GCC 5 on debian jessie 8.1

I tried many solutions to install update for my gcc compiler on debian server. None of them worked. I need the compiler update to use new features of c++11, as this provides a stable libcxx11 ABI, and stable support for C++11 (refer here).…
mluthra
  • 331
  • 1
  • 2
  • 4
22
votes
4 answers

gcc error installing psycopg2 package for python3 on Centos 7.3

As per this answer, I performed a series of prerequisite setups to be ready to pip install python3 packages. However, when I ran python3 -m pip install psycopg2 I got the following error: Downloading/unpacking psycopg2 Downloading…
amphibient
  • 12,222
  • 18
  • 62
  • 87
22
votes
7 answers

Compiling GNU/Linux with -O3 optimization

It's said that compiling GNU tools and Linux kernel with -O3 gcc optimization option will produce weird and funky bugs. Is it true? Has anyone tried it or is it just a hoax?
uray
  • 3,830
  • 11
  • 36
  • 42
20
votes
2 answers

What sets fs:[0x28] (stack canary)?

From this post it is shown that FS:[0x28] is a stack-canary. I'm generating that same code using GCC on this function, void foo () { char a[500] = {}; printf("%s", a); } Specifically, I'm getting this assembly.. 0x000006b5 …
Evan Carroll
  • 28,578
  • 45
  • 164
  • 290
18
votes
3 answers

gcc can't link to pthread?

I have recently installed XUbuntu 11.10 64bit, but I am having problem compiling the most simple pthread example. Here is the code pthread_simple.c: #include #include main() { pthread_t f2_thread, f1_thread; void *f2(),…
chtlp
  • 283
  • 1
  • 2
  • 5
15
votes
1 answer

How does gcc know where boost is installed

I installed boost using sudo apt-get install on Ubuntu. Later I did not have to give gcc the I flag alongwith the path to the boost libraries to use boost ! Nor did I do any pkg-config --cflags --libs of any sort. What is the mystery here ? How is…
Chani
  • 418
  • 2
  • 7
  • 16
15
votes
2 answers

Why gcc show `unknown` in Target: x86_64-unknown-linux-gnu in Arch Linux?

I would like to know why when I run gcc -v under Arch Linux, it shows the unknown word in these outputs: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper Target:…
noslin005
  • 191
  • 1
  • 2
  • 7
1
2 3
47 48