[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: x86 Debian 下的 gcc 默认生成的目标文件究竟是 i486 还是 i686 ?



2012/3/11 Deng Xiyue <manphiz-guest@users.alioth.debian.org>:
> 2012/3/10 Plain_Text <resation@gmail.com>:
>>
>>
>>   前几天列表里讨论了相关问题,我做了一个这样的试验。
>>
>> $ gcc -c main.c -o main.o
>> $ gcc -march=i486 -c main.c -o main_i486.o
>> $ gcc -march=i686 -c main.c -o main_i686.o
>>
>> $ diff main.o main_i486.o
>> Binary files main.o and main_486.o differ
>>
>> $ diff main.o main_i686.o
>>
>>
>>   其中 main.c 是一个简单的 C 程序。可以看出,默认生成的是 i686 版本。
>> 可问题是,在 gcc -v 下却看到 Target: i486-linux-gnu .
>>
>
> 这里的 target 应该是决定 gcc 自己的执行文件是什么架构,而不是 gcc 默认生成的文件的架构。
>
**begin quote***

There are three system names that the build knows about: the machine
you are building on (build), the machine that you are building for
(host), and the machine that GCC will produce code for (target). When
you configure GCC, you specify these with --build=, --host=, and
--target=.

**end quote***
http://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html
>>   究竟是怎么回事?
>>
>>
>>
>>
>> --
>> To UNSUBSCRIBE, email to debian-chinese-gb-REQUEST@lists.debian.org
>> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>> Archive: [🔎] 20120310231657.GA2680@localhost.localdomain">http://lists.debian.org/[🔎] 20120310231657.GA2680@localhost.localdomain
>>



-- 
________________________
Yes, I use Debian GNU/L
wolf python london(WPL)
Do as you soul should do !
________________________


Reply to: