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

GCC inline assembly with stack operation

I am in need of such a inline assembly code: I have a pair(so, it is balanced) of push/pop operation inside the assemblyI also have a variable in memory (so, not register) as inputlike this:__asm__...

View Article


Error compiling OpenCV, fatal error: stdlib.h: No such file or directory

I'm trying to compile OpenCV. I've tried the master branch (which is currently on commit dc9602e) and version/tag 3.1.0. I'm using Fedora 24, I first tried using gcc that comes with Fedora (gcc (GCC)...

View Article


32-bit absolute addresses no longer allowed in x86-64 Linux?

64 bit Linux uses the small memory model by default, which puts all code and static data below the 2GB address limit. This makes sure that you can use 32-bit absolute addresses. Older versions of gcc...

View Article

Single multiplication makes code ~10 slower in fastmod implementation

Here is a fastmod wrapper and two operators I've implemented for using it:class fastmod { public: [[using gnu: cold]] fastmod(uint64_t denominator) : denominator_(denominator) { M_ =...

View Article

/usr/bin/ld: final link failed: Bad value while installing h5py

I'm trying to install on RHLE via pip3 h5py but I get through this problem gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall...

View Article


usage of !!, __warned and __ret_warn_once as int in WARN_ON_ONCE macro...

I was going through the WARN_ON_ONCE macro definition. I have doubt regarding the following line, what is the use of !! before condition. If we remove !! then also same will be stored in...

View Article

gcc 6.3 --> Fatal Python error: Py_Initialize: Unable to get the locale...

I am trying to install a Python package and I get this error in CentOS7:Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'Complete log...

View Article

Remove stack frame setup/initilization

I have the following program:void main1() { ((void(*)(void)) (0xabcdefabcdef)) (); } I create it with the following commands:clang -fno-stack-protector -c -static -nostdlib -fpic -fpie -O0...

View Article


Confusing Inline Assembly

static inline void insw(int port, void *addr, int cnt) { asm volatile("cld\n\trepne\n\tinsw" : "=D" (addr), "=c" (cnt) : "d" (port), "0" (addr), "1" (cnt) : "memory", "cc"); } Hey guys, I am feeling...

View Article


OpenMP GPU offloading math library?

I am trying to offload code the GPU using OpenMP 4+ directives. I am using ubuntu 16.04 with GCC 7.2 and for general cases it is working fine. My problem comes when I am trying to offload a code that...

View Article

Ways to use raco to sacrifice compile time for performance?

I had a project for my university, where I had to improve the compiler that we had written throughout the course in Racket. I was recently reading about GCC -O optimizations, and -O3 and -Ofast were...

View Article

Differences between arm64 and aarch64

I have two "unlocked" devices, an iPad mini 3, and a Galaxy Edge 6, both endowed with a terminal and a minimalistic set of unix commands. I thought both devices have arm64 processors but when I...

View Article

Unable to install latest GCC on Windows

I am trying to install GCC on my local system.I am referring thisI have successfully completed the following steps:Install CygwinInstall Required Cygwin Packages C:\cygwin64>setup-x86_64.exe -q -P...

View Article


Is it valid to link non PIC objects into an executable with PIC objects

I'm adding a thread local variable to a couple of object files that are always linked directly to executables. These objects will never be included inside a shared library (and it's safe to assume this...

View Article

Is there any way to split gcc macro arguments?

I write code that can run on GPU or CPU. In case of CUDA presence wrapper try to run function on GPU. In case of error (no memory for example) it try to run it on CPU. In case of error again it returns...

View Article


unknown type name ‘_Float64x’ when compiling gcc

I want to install gcc from source code and I checkout r236947 gcc from subversion.But I meet this error when I compiling gcc using "make -j8"Information of my LinuxLinux ubuntu 5.0.0-37-generic...

View Article

Compiling C code using Intel MKL: ld: unknown option: --no-as-needed

I wrote a C file (template.c) that uses the MKL Intel library (which I've already installed). I'm using this shell script to compile my code (template.c). Assume the C file is minimal - it imports the...

View Article


The meaning of -e option in the Intel SGX enclave linker flag

To create an SGX enclave, we have to pass long ldflags: -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ -Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive \ -Wl,--start-group...

View Article

Build shared Libray on Solaris without .SUNW_syminfo to export

I am using solaris 11.3 on x86, using gcc 4.8.2 to compile. I compiled the libpng with gcc using the follow parameter:#Compile flag:# C_FLAGS = -m32 -g -fPIC -Ixxxx -Ixxxx C_DEFINES = -D__GNU__...

View Article

C++11 Enum forward causes "underlying type mismatch"

I'm working in C++11 and including an h file implemented in C++03. In the h file I'm including there's an enum Foo defined. I want to declare a forward to it in code.h and use it in...

View Article
Browsing all 21993 articles
Browse latest View live


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