Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 21994 articles
Browse latest View live

gcc-arm-linux-gnueabi command not found

I am trying to install the gnu arm toolchain for ubuntu. I first downloaded the tar from CodeSourcery. However when I go into the bin folder, I cannot run any of the binaries. I have tried with ./ and...

View Article


Determine if a compiled ELF object is 32-bit or 64-bit

I want to verify if an object has been compiled in 32-bit or 64-bit:% readelf -h my_obj ELF Header: Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, big endian...

View Article


Image may be NSFW.
Clik here to view.

Need to place const data at specific location, but the region is in the...

I need to put 2KB of const data at an exact location (internal flash) in final binary. This location is currently inside the text section of the memory. The only logical way i can think of is to split...

View Article

Go 1.13: gcc-5 not in PATH

I've installed Go 1.13.4 in Debian Linux using brew.When I try to execute go build, GO can't find gcc-5 command.So I've installed latest GCC (9.2.1) from testing repository and created a symbolic link...

View Article

Installing gfortran via macports on Mac OS high sierra

My supervisor has asked that I install a fortran compiler on my mac and suggested using MacPorts to install gcc6. I have tried to install gcc6 a number of times but each time it doesn't seem to come...

View Article


GCC fatal error: stdio.h: No such file or directory

I'm trying to compile a program in C on OS X 10.9 with GCC 4.9 (experimental). For some reason, I'm getting the following error at compile time:gcc: fatal error: stdio.h: No such file or directory I...

View Article

Building GMP 6.1.2 on ARM64 Using Custom Built GCC 7.2.0 - Assertion Errors -...

I am trying to build GMP 6.1.2 for ARMv8-A Thunderx2t99 (AARCH64) CPU on RHEL7.4-ARM64.I can build BINUTILS 2.29.1, GMP 6.1.2, and CC 7.2.0 using the system GCC 4.8.5 (provided by RHEL7.4-ARM64). No...

View Article

Why is this code 6.5x slower with optimizations enabled?

I wanted to benchmark glibc's strlen function for some reason and found out it apparently performs much slower with optimizations enabled in GCC and I have no idea why.Here's my code:#include...

View Article


g++, static initialization and -nostdlib

Compiling / linking with -nostdlib seems to prevent static initialization, even if I add my own crti.s and crtn.s with .init/.fini sections.Are there workarounds to make g++ generate static...

View Article


Switch Statement Error **control reaches end of non-void function...

I've spent a lot of time trying to figure out the reasons why this is not working correctly, but I feel like I've covered every case I need. I can't seem to find the "control reaches end of non-void...

View Article

why the code in /arch/arm/cpu/armv7m/start.s is very little? Is it complete?

In the code of arm/cpu/armv7m/start.s in u-boot2016.01 is too few compared to others..globl reset .type reset, %function reset: b _main .globl c_runtime_cpu_setup c_runtime_cpu_setup: mov pc, lr Is it...

View Article

Does the inline asm compiler barrier (memory clobber) count as an external...

Introduction/confirmation of basic factsIt is well known that with GCC style C and C++ compilers, you can use inline assembly with a "memory" clobber:asm("":::"memory"); to prevent reordering of (most)...

View Article

How does gcc on Linux know it is libc.so.6 that contains printf function?

If I do gcc hello_world.c, how does gcc/ld know it is libc.so.6 that should be linked against? Does gcc/ld go through the default shared library paths(however the linker was configured, plus some gcc...

View Article


random() method implementation in Solaris Compiler(solaris studio 12.3)

I am working on cross platform(Linux and Solaris). Random() method in Solaris and Linux gives different output. This behavior is well known as it is compiled on two different...

View Article

What is -ffreestanding option in gcc?

What is ffreestanding in gcc ? What is it used for ? I came across the following :gcc -ffreestanding -m32 -c kernel.c -o kernel.o and do not understand, what does it mean exactly.

View Article


How to link specific modules from libc?

I’m wondering is it possible to link only a specific module from libc, lets say - string.h.I’m creating a C program that is being statically linked, and needs to be as tiny as possible (memory wise). I...

View Article

How to properly make a header for a C function that receives a matrix

I'm trying to compile a C function that receives an static matrix and i want to make a header file for it. How should i define it? I tried this but i'm getting conflicting types error. This is my...

View Article


Gdal installation in Alpine compilation failure - "error: command 'gcc'...

I am trying to install Gdal in Alpine docker env. I installed the dependencies of Gdal and it went fineRUN apk add --no-cache gcc build-base /gdal/gdal-dev-2.4.0-r1.apk /gdal/gdal-2.4.0-r1.apk...

View Article

Header files are not found by GCC

Working with embedded C-projects. There are libraries, include files and so on - for micro controllers. No need for me to use GCC for a host machine and OS (Linux Mint 64 bit). As a rule...But now I'm...

View Article

Image may be NSFW.
Clik here to view.

error: command 'gcc' failed with exit status 1 error

Hey there I'm currently trying to help a host resolve an issue. The issue we getting is error: command 'gcc' failed with exit status 1 we have tried installing the gcc compiler apt-get install...

View Article
Browsing all 21994 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>