LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: 聚焦深空

glibc-2.11 已发布挺长时间,貌似大家很平静

[复制链接]
 楼主| 发表于 2009-11-8 21:40:25 | 显示全部楼层
http://packages.debian.org/sid/binutils-gold
The (experimental) GNU gold linker utility

Gold is a new linker, still in development, which is faster than the current linker included in binutils. It currently fails to link some applications and libraries (i.e. won't link usable kernels).

This package diverts the GNU linker (ld) with the experimental gold linker.
被雷到了,也许今后 ld 要编译两份。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-11-8 21:48:36 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-11-9 08:49:05 | 显示全部楼层
http://www.linuxfromscratch.org/ ... October/023106.html
=> http://nickclifton.livejournal.com/
=> http://nickclifton.livejournal.com/4128.html
GNU Toolchain Update, October 2009

  • Oct. 19th, 2009 at 10:46 AM

Hi Guys,

  Well the major news this month is that a big new feature has been
  added to gcc: Link-Time Optimization.

  When this feature is enabled (via the -flto command line option) gcc
  interrupts the processing of a source file after it has converted
  it into the GIMPLE format (one of GCC's internal representations).
  Then, before carrying on with its optimizations, gcc writes the
  GIMPLE out to into special sections in the output object file.
  After that gcc carries on as normal to optimize the GIMPLE and then
  convert it into machine instructions which go into the normal
  sections in the object file.

  When object files containing these special GIMPLE sections are
  linked together they can be read in and optimized before the final
  link actually takes place.  This allows for greater optimization
  opportunities, especially with inter-procedural optimizations.

  To use the link-timer optimizer -flto needs to be specified at both
  compile time and during the final link.  For example,

    gcc -c -O2 -flto foo.c
    gcc -c -O2 -flto bar.c
    gcc -o myprog -flto -O2 foo.o bar.o

  Another (simpler) way to enable link-time optimization is,

    gcc -o myprog -flto -O2 foo.c bar.c

  Note that when a file is compiled with -flto, the generated object
  file will be larger than a regular object file because it will
  contain GIMPLE bytecodes and the usual final code.  This means that
  object files with LTO information can be linked as a normal object
  file.  So, in the previous example, if the final link is done with:

    gcc -o myprog foo.o bar.o

  The only difference will be that no inter-procedural optimizations
  will be applied to produce "myprog".  The two object files foo.o and
  bar.o will be simply sent to the regular linker.

  Additionally, the optimization flags used to compile individual
  files are not necessarily related to those used at link-time.  For
  instance:

    gcc -c -O0 -flto foo.c
    gcc -c -O0 -flto bar.c
    gcc -o myprog -flto -O3 foo.o bar.o

  This will produce individual object files with unoptimized assembler
  code, but the resulting binary "myprog" will be optimized at -O3.
  Now, if the final binary is generated without -flto, then "myprog"
  will not be optimized.

  When producing the final binary with -flto, GCC will only apply
  link-time optimizations to those files that contain bytecodes.
  Therefore, you can mix and match object files and libraries with
  GIMPLE bytecodes and final object code.  GCC will automatically
  select which files to optimize in LTO mode and which files to link
  without further processing.

  There are some code generation flags that GCC will preserve when
  generating bytecodes, as they need to be used during the final link
  stage.  Currently, the following options are saved into the GIMPLE
  bytecode files: -fPIC, -fcommon and all the -m target flags.

  At link time, these options are read-in and reapplied.  Note that
  the current implementation makes no attempt at recognizing
  conflicting values for these options.  If two or more files have a
  conflicting value (e.g., one file is compiled with -fPIC and another
  isn't), the compiler will simply use the last value read from the
  bytecode files.  It is recommended, then, that all the files
  participating in the same link be compiled with the same options.

  Another feature of LTO is that it is possible to apply
  interprocedural optimizations on files written in different
  languages.  This requires some support in the language front end.
  Currently, the C, C++ and Fortran front ends are capable of emitting
  GIMPLE bytecodes, so something like this should work

    gcc -c -flto foo.c
    g++ -c -flto bar.cc
    gfortran -c -flto baz.f90
    g++ -o myprog -flto -O3 foo.o bar.o baz.o -lgfortran

  Notice that the final link is done with g++ to get the C++ runtime
  libraries and -lgfortran is added to get the Fortran runtime
  libraries.  In general, when mixing languages in LTO mode, you
  should use the same link command used when mixing languages in a
  regular (non-LTO) compilation.  This means that if your build
  process was mixing languages before, all you need to add is
  -flto to all the compile and link commands.

  If object files containing GIMPLE bytecode are stored in a library
  archive, say libfoo.a, it is possible to extract and use them
  in an LTO link if you are using gold as the linker (which, in turn
  requires GCC to be configured with --enable-gold).  To enable this
  feature, use the command line option -use-linker-plugin at
  link-time.  Eg:

    gcc -o myprog -O2 -flto -use-linker-plugin a.o b.o -lfoo

  With the linker plugin enabled, gold will extract the needed GIMPLE
  files from libfoo.a and pass them on to the running GCC to make them
  part of the aggregated GIMPLE image to be optimized.

  If you are not using gold and/or do not specify -use-linker-plugin
  then the objects inside libfoo.a will be extracted and linked as
  usual, but they will not participate in the LTO optimization
  process.

  Link time optimizations do not require the presence of the whole
  program to operate.  If the program does not require any symbols to
  be exported, it is possible to combine -flto with -fwhole-program to
  allow the interprocedural optimizers to use more aggressive
  assumptions which may lead to improved optimization opportunities.

  Regarding portability: the current implementation of LTO makes no
  attempt at generating bytecode that can be ported between different
  types of hosts.  The bytecode files are versioned and there is a
  strict version check, so bytecode files generated in one version of
  GCC will not work with an older/newer version of GCC.


  One problem with link time optimization is that it can require a lot
  of computer resources (memory and processing time).  For large
  programs this can be a problem.  One solution is to use the new
  -fwhopr command line option.  This option is identical in
  functionality to -flto but it differs in how the final link stage is
  executed.  Instead of loading all the function bodies in memory, the
  callgraph is analyzed and optimization decisions are made (whole
  program analysis or WPA).  Once optimization decisions are made, the
  callgraph is partitioned and the different sections are compiled
  separately (local transformations or LTRANS).

Cheers
  Nick   
回复 支持 反对

使用道具 举报

发表于 2009-11-11 13:13:06 | 显示全部楼层
太激进了....
我还长期使用  GCC 3.4.6和4.1.2
你们都开始 gcc 4.4.5了...
当然,是i486和 arm的 ixp 425
回复 支持 反对

使用道具 举报

发表于 2009-11-11 20:06:36 | 显示全部楼层
gcc 4.4.5?。。。还未推出吧

但 gcc-4.4.x 对比 3.4.x 及 4.1.x 编译出来的代码运行效能真的不可同日而语,代价就是编译时间越高版越长了 :(
回复 支持 反对

使用道具 举报

发表于 2009-11-11 20:20:03 | 显示全部楼层
Post by 聚焦深空;2043638
http://sourceware.org/ml/libc-alpha/2009-10/msg00063.html
这次 tarball 在发布后不久有提供,按惯例仍不是由 Ulrich Drepper 提供。
string 一族函数有针对 x86 x86_64 优化,应该能带来微量性能提升。

暂未看到 eglibc 跟进。

现系统已是 binutils-2.20/gcc-4.4.2/glibc-2.10.1,因受不了魔鬼的诱惑,今天决心再做敢死队,终於出事了 :(

今天升级时其实编译及安装都是通过了的,还未正式测试就范了极低级错误,居然白痴到在 /usr/lib 下 strip *,结果不到一分钟,即场黑屏,也不能重启,明显是库被破坏了。"贪字得个贫"的又一见证!

做得敢死队当然是有备份的,岂料本周忘记带上备份的硬盘通关,也就是说本周内都不可能修复机器了。。。
回复 支持 反对

使用道具 举报

发表于 2009-11-12 09:31:28 | 显示全部楼层
Post by d00m3d;2044790
gcc 4.4.5?。。。还未推出吧

但 gcc-4.4.x 对比 3.4.x 及 4.1.x 编译出来的代码运行效能真的不可同日而语,代价就是编译时间越高版越长了 :(


而GCC-4.2以上的版本我也经常编译对比,就是体积稍微大点,我就4MB norflash,这个是不能允许的。

还好,我是4核心,嘿嘿,编译时间我不关心,往哪里一扔,咱用本子干起它活去。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-11-12 12:45:26 | 显示全部楼层
Post by d00m3d;2044795
现系统已是 binutils-2.20/gcc-4.4.2/glibc-2.10.1,因受不了魔鬼的诱惑,今天决心再做敢死队,终於出事了 :(

诱惑是魔鬼。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-11-15 14:37:14 | 显示全部楼层
eglibc 已跟进 glibc-2.11。
回复 支持 反对

使用道具 举报

发表于 2009-11-16 13:15:21 | 显示全部楼层
LFS SVN 手冊已更新,但CLFS SVN 還未跟進,突然間落後了。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表