j****s 发帖数: 5092 | 1 The third party company added some hooks in the GCC compiler, so the compiler
will generate those builtin function calls when it sees the assignment.
You can take a look at gcc/optabs.c, it generates some libgcc library calls.
programming
assignment |
|
k****5 发帖数: 546 | 2 gcc file.c -S -emit-llvm -o -
这个可以通过,
gcc file.c -S -emit-llvm -o
这个报错。
最后这个 - 是什么意思? |
|
l***n 发帖数: 731 | 3 【 以下文字转载自 Software 讨论区 】
发信人: learn (USA), 信区: Software
标 题: 作为一个普通用户,如何安装gcc under linux
发信站: BBS 未名空间站 (Sat Jan 24 04:00:28 2009)
我的一个程序需要一个老的版本的gcc 3.3.2 编译?
作为一个普通用户,如何安装gcc3.3.2? 我不是超级用户。 |
|
|
E*V 发帖数: 17544 | 5 10.04
$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc. |
|
N****w 发帖数: 21578 | 6 g++ is part of gcc software package
though /usr/bin/gcc and /usr/bin/g++ are two files. |
|
S*A 发帖数: 7142 | 7 gcc will invoke the g++ to compile the file if it detect
the file name is cpp.
gcc can't really compile c++ embed into a C file.
c++ and C99 has syntax conflicts they don't mix.
Even complex C99 can't compile using g++. |
|
bz 发帖数: 1770 | 8 他说的specs是gcc的specs,不是rpm的specs. GCC的specs文件可以指定run-time
variables.但是格式很复杂。我也不知道怎么改。
有一 |
|
d*****i 发帖数: 194 | 9 【 以下文字转载自 Hardware 讨论区 】
发信人: dayouzi (dayouzi), 信区: Hardware
标 题: 求助:为什么ubuntu下面的gcc不能用呢?
发信站: BBS 未名空间站 (Thu Sep 22 01:02:24 2011, 美东)
刚开始接触linux,望指教
本来ubuntu里面是有gcc 4.5.2的
我写完c code,编译完了输出执行文件,运行执行文件就显示
No command 'factor' found, did you mean:
Command 'factor' from package 'coreutils' (main)
factor2: command not found
是需要改path吗?找不到.bash_profile这个文件呀。。。
搞了一晚上了,求救 |
|
f******e 发帖数: 582 | 10 I am interested in learning the assembly programs translated from gcc. That
is: suppose that I have a c program file.c, I use:
gcc -s file.c –o file.s
I want to know all the details about file.s
Could someone recommend a good website/textbook?
Thanks a lot. |
|
G*****h 发帖数: 33134 | 11 gcc docs?
but why bother, unless you work on gcc.
That |
|
e**********a 发帖数: 279 | 12 fresh newbie of linux, 好不容易装好了ubuntu 11.10, 我的目标是用g77 编译一个
很老的一个东东。
网上依葫芦画瓢的装了个老版本的g77 和新版本的gcc, 发现还是不行, gfortran 可
行, gcc不行, 不管 g77 还是 c compiler, 据说是骨子里的问题。
linux-vdso.so.1 => (0x00007fff644af000)
libc.so.6 => /lib64/libc.so.6 (0x00000037eb800000)
/lib64/ld-linux-x86-64.so.2 (0x00000037eb400000)
英文的论坛里说的都不管用, 类似 ln -s,
现在有两个没试, 一个是装 libc6-dev
一个是卸了重装低版本的。
可惜这只是想法, 因为半调子,我都不知道具体的commands 去下载和重装 ( 之前都
是照着网上的step-by-step弄的, 比如, 改sources.list, 我找不到类似的联接,
或者联结上的links 太复杂,不知... 阅读全帖 |
|
p**v 发帖数: 853 | 13 actually, we are using cygwin at work. virtual machine won't
do the work for us.
just checked gcc version and it's 4.3.4. not too shabby
so i guess you can install gcc yourself, it's not hard at all. |
|
f******y 发帖数: 2971 | 14 我最近在公司服务器上面自己编译安装了新版的gcc在/usr/bin下面,但是第二天一看
gcc又自动变为默认的4.4.7版的了。
这个是什么原因,能解决一下吗?
公司的服务器是在虚拟机上面的。 |
|
t****t 发帖数: 6806 | 15 gcc need a couple of "prerequisites", namely GMP, MPFR, MPC, cloog.
here's a detailed instruction.
https://gcc.gnu.org/install/ |
|
m*******n 发帖数: 103 | 16 本人比较土,找不到gcc的安装路径。同时用了一个库函数,但是不知道怎样查找出需要
链接的lib.
在MSDN中是很容易找的。但是在Sun Solaries GCC,怎么找?谢谢 |
|
q*****g 发帖数: 1568 | 17 【 以下文字转载自 Linux 讨论区 】
发信人: qiuxing (球星), 信区: Linux
标 题: GCC 居然允许变量长度的向量
发信站: BBS 未名空间站 (Tue Nov 1 00:47:05 2005), 转信
这个程序本来是一个标准的错误程序,我的gcc居然连个报错都不给,顺利
编译,顺利运行。结果就是拿到Windows上用VC就编译通不过,我于是就被人
嘲笑了一把(^_^):
#include
int main ()
{
int n = 5;
int a[n];
int i;
for (i = 0; i < 5; i++)
{
a[i] = 2 * i;
printf("%d\n", a[i]);
}
return 0;
} |
|
d******n 发帖数: 83 | 18 看起来
gcc -Idir
可以指定一个目录去找文件,要额外加一个目录好像用
gcc -Idir -Ldir
但是我还有第三个目录要加,怎么办?
当然,最直接的办法是在.c文件的#include里面写好文件的目录,但是因为在两个平台下
run, 文件目录不一样。:(
清高手指点!谢谢!!! |
|
b********n 发帖数: 609 | 19 原来用fedora自带的gcc,header啥的也都是自带的。吃饱了撑的svn了一个gcc自己bui
ld玩儿,呵呵。 |
|
l*********i 发帖数: 483 | 20 【 以下文字转载自 Linux 讨论区 】
发信人: lamborghini (Murcielago), 信区: Linux
标 题: gcc里面的-ffast-math
发信站: BBS 未名空间站 (Mon Jun 18 18:49:23 2007), 转信
gcc 4.1.2, Ubuntu 7.04 32bit(kernel 2.6.20-16-generic), Core Duo T2500.
man里说不能和-O一起用,偶想知道一下具体是什么原因呢?偶有个monte-carlo
的code,随机的抽取了一些初始值,-O3和-ffast-math一起用的话运行时间只有单独
用-O3或者-fast-math的10-20%左右,具体的结果看来用-O3 -ffast-math数值上
大约差了1e-7%(对偶的计算来说可以忽略不计了),但是不知道是不是普遍的情况
下是这样?究竟什么情况下-O和-ffast-math一起用会导致比较大的误差呢?另外
这个具体的是什么决定的?硬件?OS? |
|
f*******y 发帖数: 988 | 21 答不上来,g++是一个frontend么?gcc里面其他的编译器之间都是什么关系?gcc算一
个umbrella么? |
|
|
b***y 发帖数: 2799 | 23 ☆─────────────────────────────────────☆
pstwo (孤独的星) 于 (Thu Sep 22 23:34:25 2005) 提到:
I am looking for sqrt() and exp() implementation detail in GCC.
I have searched too many files but I didn't find anything.
I know that sqrt() is built-in and exp() should be a library
function.
Where can I find them ? Please help !
☆─────────────────────────────────────☆
microbe (纵使相逢应不识) 于 (Thu Sep 22 23:53:09 2005) 提到:
You need glibc source, not gcc.
☆─────────────────────────────────────☆
thrus |
|
n*******r 发帖数: 244 | 24 我平时在办公室都是用linux下的gcc+emacs,但是有时候回家想把这个程序在自己笔记
本(windows7)上继续调试一下。请问一下有没有什么windows上基于gcc的工具?我不
太喜欢用虚拟机。 |
|
d****p 发帖数: 685 | 25 Want to try some C++0x stuff with GCC. However Snow Leopard only ships 4.2.1
. Anyone has experience
installing gcc 4.3+ on os x?
Thanks. |
|
m******1 发帖数: 418 | 26 在哪个网站可以找到可以在命令行模式下安装的完整的gcc package? (Ubuntu 10.04
server 没有提供gcc安装包)
多谢。 |
|
y***d 发帖数: 2330 | 27 太狠了, gcc 是这么优化的:
f:
.LFB22:
.cfi_startproc
movl $1, %eax
ret
.cfi_endproc |
|
X****r 发帖数: 3557 | 28 看起来是个gcc bug。我试了试,把||换成|就没问题,
把(0-x)换成(unsigned int)(0-(int)x)和没问题,甚至把31换成30都对。
bug; |
|
|
f*******y 发帖数: 55 | 30 看来是个bug。这个是和有符号整数的表示有关的。应该是作者没有考虑机型。
见 http://en.wikipedia.org/wiki/Signed_number_representations
0: 00000000 (+0) and 11111111 (−0)
vs
INT_MAX and (-INT_MAX -1)
还有C99规定 INT_MIN = -INT_MAX
gcc&vc 的limits.h 中却定义 INT_MIN 为 -INT_MAX -1.
怎么都觉得这个是个大坑。曾经在mips的SOC上栽过一次。 这个作为bug fix后,要回
头再查查原来的程序了。 |
|
y***d 发帖数: 2330 | 31 怎么这 bug 都一样的?哦,好像 llvm 也是用的 gcc |
|
p****o 发帖数: 1340 | 32
才看了一下C99的定义,INT_MIN和INT_MAX的值正好相反。不过在前面一点也说了,具
体的实现必须同号,但可以在magnitude比他们大。所以gcc和VC是符合C99定义的。 |
|
k*******d 发帖数: 701 | 33 贴一章书上的内容
18.6. Optimization
GCC can apply many techniques to make the executable program that it
generates faster and/or smaller. These techniques all tend to reduce still
further the "word-for-word" correspondence between the C program you write
and the machine code that the computer reads. As a result, they can make
debugging more difficult, and are usually applied only after a program has
been tested and debugged without optimization .
There are two kinds of optimization options. You can a |
|
y**b 发帖数: 10166 | 34 原来用gcc-4.4, 6个线程运行显示600%CPU,
换到gcc-4.6,一模一样的程序和数据6个线程运行显示300%CPU。
比较了其他情况,CPU使用率都降低一半(运行时间还没来及比较)。
可能是什么缘故呢? |
|
f******e 发帖数: 582 | 35 I am interested in learning the assembly programs translated from gcc. That
is: suppose that I have a c program file.c, I use:
Gcc –S file.c –o file.s
I want to know all the details about file.s
Could someone recommend a good website/textbook?
Thanks a lot. |
|
d****n 发帖数: 1637 | 36 in Makefile
you can do
obj/%.o: src/%.c
[ Tab here ]gcc $(CFLAGS) -c $? -o $@
also you can do it in linux shell
mkdir -p obj
for i in *c; do gcc -c $i -o obj/`basename $i|sed 's/.c$/.o/g'`;done |
|
|
|
d****n 发帖数: 1241 | 39 你把以前的gcc用新的4.8.1覆盖了吗?
如果是这样,那么可能是系统自带的gdb依赖于
自带的gcc的某些库 |
|
x******a 发帖数: 6336 | 40 【 以下文字转载自 Linux 讨论区 】
发信人: xiaojiya (xiaojiya), 信区: Linux
标 题: 没有root权限怎么安装gcc(RHEL5.9)
发信站: BBS 未名空间站 (Sat Aug 23 00:09:22 2014, 美东)
rhel 5.9上现有的gcc是4.1.2,
我想安装gcc4.7或者4.8在自己的home directory下。
没有管理员,也没有网络,请问可不可用easybuild还是要手动build?
多谢
update:
make时stuck在undeclared error
stuck at ../libiberty/pex-common.c error:
1. 287:'PEX_STDERR_TO_PIPE' undeclared (first use in this function)
2. 305:'PEX_BINARY_ERROR' undeclard (first use in this function)
试了binutils-2.24也是同样的错误
any idea? thanks! |
|
l*****y 发帖数: 10 | 41 I tried to compile a C file in Unix.
but the system always said:
gcc: No such file or directory
*** Exit 1
I guess i deleted it yesterday when i want to get more disc space.
Where can I find the gcc?
Thanks a lot. |
|
l*****y 发帖数: 10 | 42 One can't delete gcc if she is not root or sys manager, right?
So my deleting any file won't be the reason of gcc unworkabe, right?
What's pkgadd?
Thanks a lot. |
|
P****r 发帖数: 140 | 43
usually u can find gcc in /usr/local/bin
if gcc is not in there, maybe u can dl one and install it in
ur home directory, |
|
i********e 发帖数: 6 | 44 【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: illuminate (黑色的眼睛), 信区: Programming
标 题: 请教gcc/g++高手
发信站: The unknown SPACE (Sun Feb 11 17:44:42 2001) WWW-POST
gcc中有没有提供类库?
就像Visual C++中的MFC。或Java中的Api类库。
我现在所有的类都从底层(系统提供的函数)写起,实在苦不堪言。
连最基本的string和数字操作都得从头写起。要是有现成的类可用,
只要生成一个对象就行的话,就可以省很多力气。 |
|
p******h 发帖数: 20 | 45 I copied a compied c file to the directory in UNIX, but when
I compiled it with GCC, then some errors will occur, but
when I used G++, then it is ok. What's the matter? what is
the difference between G++ and GCC?
Thanks! |
|
i****d 发帖数: 7 | 46 g++ package:
Description :
This package adds C++ support to the GNU C compiler. It includes
support for most of the current C++ specification, including templates
and exception handling. It does include the static standard C++
library and C++ header files; the library for dynamically linking
programs is available separately.
gcc package:
Description :
The egcs package contains the GNU Compiler Collection: cc, gcc and
egcs. You'll need this package in order to compile C/C++ code. |
|
j***y 发帖数: 2074 | 47 i am a novice in unix and i have downloaded a gcc package
for solaris 2.5, but don't know how to install it. and if
there is already a gcc of lower version, would it be
covered? i want to keep these two versions simultaneously in
one machine for some specific purpose, is it possible?
thank you very much, |
|
w*****n 发帖数: 94 | 48
gcc: installation problem, cannot exec `as': No such file or directory
Can you use gcc to compile anything else? |
|
m******g 发帖数: 91 | 49 看gentoo网上提供的说明,需要对/etc/make.conf进行配置,
让gcc针对特定的CPU进行编译优化。
好的。我的机器是pentium 233MHz MMX,
因此我改动/etc/make.conf为:
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=pentium-mmx -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
可是在执行kernel编译时,出现的却是:
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-gentoo-r5/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2
-march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
是针对i |
|
b*****n 发帖数: 684 | 50 I want to use GCC to compile a .c file into assembly code. For example, the
source code is written by C, after compilation, the output file is an assembly
code with "mov r1, r2" or something like that. Is GCC able to do this? Thanks. |
|