或许标题没有准确表述问题: 我知道,当我操作gcc foo.c
时。 海湾合作委员会呼吁开展所有工作的其他次方案,使主要优惠方案仅成为一个接口。 但是,如何做到这一点?
使用<条码>系统条码>或<条码>。 或者其他一些职能? 我之所以要知道这一点,是因为我希望在类似制度的基础上建立一个网络拖网机,届时将有一个接口方案和若干其他次级项目,如<条码>/条码>和<条码><<>。
如果已经问了这一问题,那么我就没有利用搜查或“有类似头衔的问题”来发现这一问题,我感到担忧。
事先感谢你。
或许标题没有准确表述问题: 我知道,当我操作gcc foo.c
时。 海湾合作委员会呼吁开展所有工作的其他次方案,使主要优惠方案仅成为一个接口。 但是,如何做到这一点?
使用<条码>系统条码>或<条码>。 或者其他一些职能? 我之所以要知道这一点,是因为我希望在类似制度的基础上建立一个网络拖网机,届时将有一个接口方案和若干其他次级项目,如<条码>/条码>和<条码><<>。
如果已经问了这一问题,那么我就没有利用搜查或“有类似头衔的问题”来发现这一问题,我感到担忧。
事先感谢你。
虽然你的问题确实较为笼统(仅以gcc
为例),但我的第一个想法是使用<代码>strace<>code>来说明它所做的事情。 关于我的系统(Ubuntu 11.10/x64),我只读了strace
,如:
strace -F -o sout gcc -Wall -o test test.c
This shows system calls for the gcc
process, while following forks (-F
) and sending the output of the trace to sout
. Doing this, I can see that gcc
here calls vfork()
, and then execve()
in the child, though the actual program s source might just do a simple fork()
/exec()
.
The relevant output from sout
is:
26264 stat("/usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1", {st_mode=S_IFREG|0755, st_size=11248824, ...}) = 0
26264 access("/usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1", X_OK) = 0
26264 vfork() = 26265
26264 wait4(26265, <unfinished ...>
26265 execve("/usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1", ["/usr/lib/gcc/x86_64-linux-gnu/4."..., "-quiet", "-imultilib", ".", "-imultiarch", "x86_64-linux-gnu", "test.c", "-quiet", "-dumpbase", "test.c", "-mtune=generic", "-march=x86-64", "-auxbase", "test", "-Wall", "-fstack-protector", ...], [/* 46 vars */]) = 0
At the begnning of each line is the pid of the process running. So the primary process calls stat()
to find cc1
, then forks, and the child executes it.
尽管如此,我本可以不引用你的话回答你的问题;因为k/exec是把分处理从你方案中提出去的共同办法。
Following along from this question: how-do-i-check-if-gcc-is-performing-tail-recursion-optimization, I noticed that using gcc with -fPIC seems to destroy this optimization. I am creating a shared ...
I would like to know how to generate assembler code from a C program using Unix. I tried the gcc: gcc -c file.c I also used firstly cpp and then try as but I m getting errors. I m trying to build an ...
OK, I have old Metrowerks code for Mac and Windows where the previous developer used pre-compiled headers for every project that this code base builds. How does one get rid of Pre-compiled headers, ...
I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....
I ve recently set up a MinGW + MSYS environment on my laptop to check how things are with Netbeans C/C++ support. Everything seems to work fine, however, during my testing I have noticed a difference ...
I d like to compile my application for version 10.5 and forward. Ever since I upgraded to Snow Leopard and installed the latest XCode, gcc defaults to 10.6. I ve tried -isysroot /Developer/SDKs/...
We can get the type returned by function in gcc using the typeof operator as follows: typeof(container.begin()) i; Is it possible to do something similar for functions taking some arguments, but not ...
Is it possible to create binaries of other platform on Linux? Say I have a program that can be compiled using gcc to .o file but can we use it to output exe that can be run on windows ?