tech-toolchain archive

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

RE: changing optimization for crunchgen components



        I've started building ramdisk images using crunchgen and the general 
distrib area of code.  I recently ran into a similar problem with compiler 
flags specified in this manner.  Modifying a line similar to this cleared up 
the problem.  So, it may not be rescue per say that is dying, it may be some 
other (ramdisk, small foot print, or so on) use of crunchgen.
        The flags came from this makefile (where crunchgen is invoked), but I 
didn't need to modify the optimization level.  The flags were propagated 
through the entire build process, and really should clear this up.
        If I've missed something, could you clarify how the '-d' flag is 
involved (I assume that is the make invocation).   And is it the '-d' flag 
causes it to expand the DBG macro?  I'd like to know if you tried it at least.

-----Original Message-----
From: tech-toolchain-owner%NetBSD.org@localhost 
[mailto:tech-toolchain-owner%NetBSD.org@localhost] On Behalf Of Izumi Tsutsui
Sent: Monday, April 13, 2009 9:54 AM
To: lidl%pix.net@localhost
Cc: mrg%eterna.com.au@localhost; tech-toolchain%NetBSD.org@localhost; 
tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: changing optimization for crunchgen components

> i'd guess this is what is tripping you up:
> 
>       src/rescue/Makefile:DBG=            -Os

And it's passed to crunchgen via -d flag.
There is no way to specify -O1 per source
unless you edit a generated makefile, I guess.

See also src/doc/HACKS for the gcc bug:
---
        hack    gcc4-m68000
        cdate   Fri Feb  8 10:29:37 PST 2008
        mdate   Sun May  4 15:37:19 UTC 2008
        who     mrg, tsutsui
        file    rescue/Makefile : 1.21
        file    sbin/dump_lfs/Makefile  : 1.9
        file    sbin/fsck_ffs/Makefile  : 1.35
        file    sbin/fsdb/Makefile      : 1.22
        file    share/mk/sys.mk : 1.96
        file    usr.sbin/ndbootd/Makefile       : 1.5
        descr
                Several internal compiler errors with gcc -O1
                around 64bit integer arithmetic.
                This hack uses -O1 and adds some -fno-tree-foo options
                to avoid the problem.
                This might be related with GCC Bugzilla Bug 32424.
        kcah
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index