Next Previous Contents

9. Specs 档□例

这里是一份 specs 的□例。这将使 gcc 用 glibc2 来编译与连结。 它应该位於 /usr/lib/gcc-lib/<新系统目录>/<gcc 版本>. 假如你用的是 x86 的系统,那你也许可以直接将这一段复制到档案里去。

 *asm:
 %{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}

 *asm_final:
 %{pipe:-}

 *cpp:
 %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}

 *cc1:
 %{profile:-p}

 *cc1plus:

 *endfile:
 %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s

 *link:
 -m elf_i386 %{shared:-shared}   %{!shared:     %{!ibcs:       %{!static:       %{rdynamic:-export-dynamic}     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}}  %{static:-static}}}

 *lib:
 %{!shared: %{pthread:-lpthread}        %{profile:-lc_p} %{!profile: -lc}}

 *libgcc:
 -lgcc

 *startfile:
 %{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}                  %{!p:%{profile:gcrt1.o%s}                         %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}

 *switches_need_spaces:

 *signed_char:
 %{funsigned-char:-D__CHAR_UNSIGNED__}

 *predefines:
 -D__ELF__ -Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)

 *cross_compile:
 0

 *multilib:
 . ;
 


Next Previous Contents