tech-toolchain archive

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

changing optimization for crunchgen components

OK, so now I've run into a problem that I don't seen an
obvious way around...

I'm stuck trying to build the 'fsdb' pieces that will get
crunch'd and then linked together in /rescue.

(Built environment is Solaris x86, target is netbsd-5-rc3-ish,
but I don't think it matters.)

Anyway -- my gcc 4.3.3 targeted coldfire compiler is giving
up the ghost when it tries to compile fsdb.c with "-Os". [1]

If I specify "-O1", the compiler will work.

How do I set the optimization flags for just one source file of
the stuff that gets put into in the /rescue binary?

Doing what I've done in other places in sbin, and usr.bin (e.g.):

.if ${MACHINE_ARCH} == "m68k" && ${MACHINE} == "coldfire"
COPTS.fsdb.c+= -O1

This doesn't work.  The crunch compile still comes out with -Os, and
doesn't pick up my COPTS setting.  In the other places where I've
needed to override the optimization, I get "...-gcc -O2 -pipe .... -O1
" in the generated compile invocation, and gcc honors the last -O flag
on the command line, so adding the extra COPTS ends up working out
alright for me.


[1] /nbsd/coldfire-5/tools/bin/m68k--netbsdelf-gcc -Os -pipe 
-fno-optimize-sibling-calls -msoft-float -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional 
-Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual 
-Wwrite-strings -Wextra -Wno-unused-parameter -Werror -march=isac -mcpu=54455 
-msoft-float -I/nbsd/nbsd-5/sbin/fsck -I/nbsd/nbsd-5/sbin/fsck_ffs 
-DWAPBL_DEBUG_PRINT=0 -nostdinc -isystem /nbsd/coldfire-5/nbuild/usr/include 
-DRESCUEDIR=\"/rescue\" -c -Wno-pointer-sign /nbsd/nbsd-5/sbin/fsdb/fsdb.c
/nbsd/nbsd-5/sbin/fsdb/fsdb.c: In function 'find_indirblks64':
/nbsd/nbsd-5/sbin/fsdb/fsdb.c:744: error: unable to generate reloads for:
(insn:QI 68 67 69 7 /nbsd/nbsd-5/sbin/fsdb/fsdb.c:635 (parallel [
            (set (cc0)
                (compare (reg:DI 0 %d0 [orig:37 D.6312 ] [37])
                    (reg:DI 2 %d2 [orig:44 D.4945 ] [44])))
            (clobber (reg:DI 65))
        ]) 12 {*} (expr_list:REG_DEAD (reg:DI 0 %d0 [orig:37 D.6312 
] [37])
        (expr_list:REG_UNUSED (reg:DI 65)
/nbsd/nbsd-5/sbin/fsdb/fsdb.c:744: internal compiler error: in find_reloads, at 
Please submit a full bug report,
with preprocessed source if appropriate.
See <> for instructions.

Home | Main Index | Thread Index | Old Index