Running RedHat7 w/g++ version 4.8.3 w/j5 arg and o3 optimization. We currently have a file that is approx 90,000 lines long (a whole bunch of wrapper functions). The compile of this file currently takes between 30 and 40 mins. What is the best strategy to speed this build time? Would build time increase if it was split between multiple files?
Tag: gcc
bsd-finger won’t Make correctly
I ran across an interesting issue. My system is Arch Linux (latest) on an ASUS laptop. Now, the really weird issue: finger is not automatically installed with Arch. I attempted to use pacman to install it, and it’s not in the repositories. It IS in the AUR. I downloaded the AUR file, un-tarred the tar with tar -xvf bsd-finger0.17.tar.gz. This
What are the recommended GNU linker options to specify $ORIGIN in RPATH?
Assume my platform is vanilla (non-embedded) x86-64 Linux using GNU build toolchain (GCC, etc.). To specify $ORIGIN in RPATH, I know about the linker option: -Wl,-rpath,’$$ORIGIN’. Today, I discovered another option: -Wl,-z,origin. Should I always include -Wl,-z,origin when using -Wl,-rpath,’$$ORIGIN’? Official GNU ld docs, say: Marks the object may contain $ORIGIN. Related, but different: https://stackoverflow.com/questions/33853271/what-are-the-recommended-gnu-linker-options-to-specify-rpath Answer I know about the
How to find whether a given address is in heap or in stack
I have a requirement to find whether a given address is in heap or in stack. Is there a reliable way to do this in Linux? I have thought about the following approach assuming that the stack will grow downward and heap will grow up towards stack. How reliable is this solution? We don’t use gcc split-stack. [edit – I
Mem alloced via mmap without munmap will cause leak after process exits or terminals
there is the code about alloc mem via mmap void *ret = mmap(NULL, 4 * 1024, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); when process exits normally, the memory will be return to os ? Answer According to the man and under unmap: The region is also automatically unmapped when the process is terminated. Which sounds very reasonable as
How do I find what libraries need to be installed on a client linux machine if I compile a binary with a newer version of gcc?
Say I have a C++ binary that was compiled with a version of gcc say 4.4.x, which is used on a client linux box. If I want to upgrade my compiler to use a newer one, say 4.9.3 (because I want to use C++11): What kind of things would need to be upgraded on the client box to run this
Why does toolchain name have separate OS and EABI fields.?
For eg. arm-unknown-linux-gnueabi Now, once the OS i.e Linux is fixed, the C Library will be fixed (GLibc) and hence the calling convention and ABI being followed will be fixed. What is the requirement of 4th field i.e. ABI separately? Can a toolchain use a different ABI from the one used by underlying OS and LIBC. In that case how
When using the GCC driver, what makes a static lib “incompatible”?
So what I am trying to do is on Ubuntu 14.04 (x86_64) I want to set up musl-libc based on the latest released 1.1.11 version which is available at this moment. What I did was to: Install multilib support for GCC: sudo apt-get –no-install-recommends install gcc-multilib Configure the libraries for 32-bit and 64-bit respectively and install them into separate folders:
Is it possible to compile statically with gcc or g++ on Linux based systems?
I am working on a project which I would like to be able to “ship” to other Linux based computers as a complete executable with no dependencies. (In order that I can copy just the 1 file to other systems, and then run that file on those systems.) In the windows world, I think static linking is done just by
/bin/sh: 1: arm-linux-gcc: not found on ubuntu
I m trying to build using gcc arm cross compiler and i get following error Building file: ../src/application.c Invoking: GCC C Compiler arm-linux-gcc -O3 -Wall -c -I -fmessage-length=0 -MMD -MP -MF”src/application.d” -MT”src/application.d” -o “src/application.o” “../src/application.c” /bin/sh: 1: arm-linux-gcc: not found i also check my path setting and i had proper valid path to the arm-linux-gcc and also linux “which” command