Em Thursday 07 February 2008, 4d4c47 escreveu:
> vejam o link:
>
> http://www.forumdebian.com.br/topico-5668_apt_build_e_um_belo_pega_trouxas.
>html
>
> "tava aqui compilando com o apt-build, e percebi que ele não otimiza
> p***a nenhuma, façam o teste:
>
> $ sudo apt-build install --force-yes xgalaga
>
> Código:
> ... gcc -I. -I.. -O2 -g -DXF86VIDMODE  -DHAVE_CONFIG_H   -c -o scale.o
> scale.c gcc -I. -I.. -O2 -g -DXF86VIDMODE  -DHAVE_CONFIG_H   -c -o
> triangle.o triangle.c gcc -I. -I.. -O2 -g -DXF86VIDMODE  -DHAVE_CONFIG_H  
> -c -o color.o color.c gcc -I. -I.. -O2 -g -DXF86VIDMODE  -DHAVE_CONFIG_H  
> -c -o image.o image.c gcc -I. -I.. -O2 -g -DXF86VIDMODE  -DHAVE_CONFIG_H  
> -c -o menu.o menu.c gcc -I. -I.. -O2 -g -DXF86VIDMODE  -DHAVE_CONFIG_H   -c
> -o scroll.o scroll.c rm -f libsprite.a
> ar rc libsprite.a border.o cursor.o init.o misc.o sector.o buffer.o data.o
> line.o mouse.o text.o circle.o event.o makewindow.o point.o tile.o
> cleararea.o fill.o mapwindow.o scale.o triangle.o color.o image.o menu.o
> scroll.o ranlib libsprite.a
> make[2]: Saindo do diretório
> `/var/cache/apt-build/build/xgalaga-2.0.34/libsprite' [b]gcc -I. -O2 -g[/b]
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c main.c -o main.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c images.c -o images.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c data.c -o data.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c paths.c -o paths.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c pathfile.c -o pathfile.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c title.c -o title.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c explosions.c -o explosions.o gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c score.c -o score.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c highscore.c -o highscore.o gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c prize.c -o prize.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c sound.c -o sound.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c nas_sound.c -o nas_sound.o gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c frate.c -o frate.o gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -DORIGINAL_XGALAGA -c linux-joystick.c -o linux-joystick.o rm -f xgalaga
> gcc -lXxf86vm -o xgalaga main.o images.o data.o paths.o pathfile.o title.o
> explosions.o score.o highscore.o prize.o sound.o nas_sound.o frate.o
> linux-joystick.o -lX11 -lXmu -lXt -lXext -lXpm libsprite/libsprite.a gcc
> -I. -O2 -g -DXF86VIDMODE -DHAVE_CONFIG_H 
> -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c main.c -o main.o.hyper gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c images.c -o images.o.hyper gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c data.c -o data.o.hyper gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c paths.c -o paths.o.hyper gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c pathfile.c -o pathfile.o.hyper gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c title.c -o title.o.hyper gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c explosions.c -o explosions.o.hyper gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c score.c -o score.o.hyper gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c highscore.c -o highscore.o.hyper gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c prize.c -o prize.o.hyper gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c sound.c -o sound.o.hyper gcc -I. -O2 -g -DXF86VIDMODE
> -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c nas_sound.c -o nas_sound.o.hyper gcc -I. -O2 -g
> -DXF86VIDMODE -DHAVE_CONFIG_H  -DXGALAGADIR=\"/usr/share/games/xgalaga/\"
> -DSOUNDSERVER=\"/usr/share/games/xgalaga/xgal.sndsrv.oss\"
> -UORIGINAL_XGALAGA -c frate.c -o frate.o.hyper
>
> "gcc -I. -O2 -g ..."
> essa foi a otimização que ele usou, mas meu /etc/apt/apt-build.conf está
> dessa forma:
>
> Código:
> build-dir = /var/cache/apt-build/build
> repository-dir = /var/cache/apt-build/repository
> Olevel = -O2
> mtune = -march=pentium4 -ffast-math -pipe -fomit-frame-pointer
> options = " "
> make_options = " "
>
> ele não usou a linha "mtune = -march=pentium4 -ffast-math -pipe
> -fomit-frame-pointer" então não ouve otimização nenhuma, e isso é um
> problema bem chato, é um belo pega-trouxas e fui um dos primeiros a
> cair."


        Não uso o apt-build, mas eu acho que você está fazendo alguma 
configuração 
errada...


        Abraço,
        Davi Vidal

Responder a