Description:
GNU C Compiler (gcc) user queries and answers.
|
|
|
loading shared libs
|
| |
I'm trying to get gdb to load a game that's crashing. $ file ./game ./game: POSIX shell script text executable $ gdb .libs/game GNU gdb (Gentoo 7.0 p1) 7.0 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <[link]> This is free software: you are free to change and redistribute it.... more »
|
|
Can't find libc.so.6
|
| |
I am building an ARM cross compiler on x86 linux. SYSROOT=/home/zhong/cross PREFIX=$SYSROOT/usr BINUTILS=binutils-2.20 GCC=gcc-4.4.2 GLIBC=glibc-2.10.1 My steps: 1. Install linux headers to $SYSROOT/usr/include 2. ../$BINUTILS/configure --prefix=$PREFIX --target=arm-linux --with- sysroot 3. bootstrap gcc... more »
|
|
forcing a function inline and no optimize
|
| |
Hi, I would like to implement sensitive assembler routines and use inline functions instead of cpp macros or pure assembler. Is there a way to force such functions to be inline? I want to have guarantees that the function will be expanded. Is there a way to define the complete function to not be optimized? I... more »
|
|
Predefined macros for -msse2
|
| |
Hi, I wonder whether GCC makes a predefined macro for -msse2. That is, if I compile my binary with -msse2, I get __SSE__ defined on a Mac OS X but I couldn't find a relevant, and documented, predefined macro for - mssse2. I want do something equivalent to following: ... #define HAS_SSE 1 // defined for -msse2 - but what about following?... more »
|
|
Choose a different linker than ld
|
| |
Hi, I need to force gcc to use a custom linker. The problem rise from my toolchain. I'm using a mosync.com and I have 2 alternative build systems: cmake and autotools. With both I don't how to set the linker. Cmake try to use gcc and finally gcc try to use ld but it cannot find it. So a solution could be a gcc option to set the linker. The linker is... more »
|
|
trying to compile glibc-2.11
|
| |
i have tried to compile glibc-2.11 abd got the error that my system is not supported! the name reported is i686-nt-cygwin and the following 'config.txt' file is as follows
|
|
How to override -fpack-struct ?
|
| |
Hi, I have a rather large project that heavily depends on structure packing using -fpack-struct. I would estimate several dozen structures that absolutely must be packed in order for the software to work properly. Today I encountered a problem where a third-party library that doesn't work properly when included from source code that is compiled with -... more »
|
|
-combine affects _mm_prefetch
|
| |
Hi, All, I am trying out "-combine" option on GCC to see if it will help to do inter-object optimization. I have some mmx instructions using instructions like "_mm_prefetch", and g++ complaints these symbols are undefined. I did objdump on the object file compiled using "-combine", and got these: 0000000000000000 *UND* 0000000000000000 _mm_prefetch... more »
|
|
GCC -O0+flags != -O1
|
| |
I have a test program for an algorithm. It runs fine compiled -O0; I ran it overnight last night, no seg fault. If I compile -O1 (or -O2) it seg faults after a few seconds. I used -Q -help=optimizers to list the optimizations for -O0 and -O1; I then compiled -O0 and explicitly added the list of extra optimizations... more »
|
|
Dereference or not, the argument to "m" in GCC inline assembly?
|
| |
I am writing inline assembly, implementing atomic operations. I use the "m" constraint when indicating memory (rather than registers) which is being operated upon. Example function (where atom_t is unsigned long int); INLINE atom_t abstraction_increment( atom_t *value ) { atom_t stored_flag,... more »
|
|
|