Offset before square bracket in x86 intel asm on GCC
From all the docs I've found, there is no mention of syntax like offset[var+offset2] in Intel x86 syntax but GCC with the following flags gcc -S hello.c -o - -masm=intelfor this program...
View ArticleWIFCONTINUED not recognised
I'm writing a C program and GCC doesn't recognise WIFCONTINUED. I've included the library that contains it (sys/wait.h) and checked that the library does exist on my machine.My program:#include...
View ArticleWhy does gcc8.3 appear to attempt to compile an unused template function?
Consider (the name of the file is hello.cpp) this code; the idea is to engineer a safe casting of numeric types without loss or overflow. (I'm porting some code from MSVC to g++).#include...
View ArticleAllow a specific undefined reference with GCC
In a C++ program with GCC I am using linker flag -Wl,--no-undefined so the linker will throw an error if there are undefined references. Is there a pragma or something I can put in the code next to a...
View Article[MAKEFILE]: How to copy cpp source files from different source folders into...
My Current makefile looks like the following, and it build the targets correctly. But it fails to build the targets in one instance, that is when the length of the path to source files becomes too...
View Articlextensa-lx106-elf-gcc cannot find libraries
I'm trying to use esp8266-arduino-make on Windows 10 using CLion. I have installed the Arduino IDE and used version 2.4 of the ESP8266 community board repository. However when attempting to link the...
View Articleafter upgrade to gcc9.3 linking segfaults in lto-wrapper but LTO is disabled
I just upgraded gcc form 7.5 to 9.3 and started to have gcc linker segfaults - but only on armv7 target (the same all sources are building/linking OK for aarch64/x86_64 targets).Segfault is in...
View ArticleA NOOB really need help for GNU make
//makefile.conf.SUFFIXES : .c .occ = gccCFLAG = -cOFLAG = -oO2FLAG = -O2WPIFLAG = -lwringPiRM = rm -rfTARGET_SRCS = main.cTARGET_OBJS = $(TARGET_SRCS:$.c=$.o)TARGET_NAMES =...
View ArticleC/C++: How to print a stack trace? [duplicate]
when gcc/g++ encounters an ICE (internal compiler error), then recent versions of the compiler will print a neat stack trace before exiting.Questions: What technology is used to implement that? GCC is...
View ArticleHow do we install gcc-go to AIX machine power-pc-7 bigendian 64 bit?
I have a AIX machine which runs on power-pc-7 bigendian 64 bit I understand installing Go compiler is easy for Windows,Linux and Mac but if we want to install it on AIX then it involves different...
View ArticleHow does GCC print a stack trace?
when gcc/g++ encounters an ICE (internal compiler error), then recent versions of the compiler will print a neat stack trace before exiting.Questions: What technology is used to implement that? GCC is...
View ArticleMake / gcc cryptic error 2: how to have more information?
I have this C++ project which compiles using a Makefile, and sometimes when (my guess) there are some missing includes, I get a cryptic "error 2" message and the make process stops.I suspect the...
View Articlegcc optimization flags for Xeon?
I'd want your input which gcc compiler flags to use when optimizing for Xeons?There's no 'xeon' in mtune or march so which is the closest match?
View ArticleMSYS2 MinGW strange multiple definition of...
I'm trying to build a fairly large application that works fine on Linux with MSYS2. I've almost got it to build but I'm now getting a pretty odd linker error:The error is something about having...
View ArticleCan't compile C++ code in vscode MacOS Catalina
I am trying to write c++ using vscode on Mac, but I kept receiving this error when trying to run any code.The code I want to run:#include <iostream>int main() { std::cout << "Hello World!";...
View ArticleGCC -O2 and __attribute__((weak))
It looks like GCC with -O2 and __attribute__((weak)) produces different results depending on how you reference your weak symbols. Consider this:$ cat weak.c#include <stdio.h>extern const int...
View ArticleCMake not recognizing compiler on MacOS with Xcode Generator
I have installed CMake 3.17.1, gcc 9.3.0, openmpi 3.1.5 and other tools on my Mac (10.15.4) using spack. I am able to configure and build my code with the following optionscmake ../ \...
View Articlepip fails to install imread - gcc-9: error: unrecognized command line option...
So I was trying to install imread with pip3 but I had some old version of gcc(4.2), so I installed it via brew but when I do CC=gcc-9 pip3 install imread I get the following...
View ArticleHow to compile linux kernel module without system Makefile
I have arm-linux device I don't have the Makefile to the kernel to build kernel module.I have gcc cross compiler to this arch.How can I compile kernel module without have the Makefile of the kernel?
View ArticleGCC -O0 Generating Weird AVX extra store/reload instructions with intrinsics...
I have created a simple, vectorized C function to square each element in an array. The code is as follows:#include <immintrin.h>void square(const double* arr, uint len, double* outarr) { __m256d...
View Article