Against the tide of bit rot

Zack Weinberg zackw@panix.com
Fri Aug 10 09:05:00 GMT 2001


On Fri, Aug 10, 2001 at 01:50:49AM -0700, Richard Henderson wrote:
> On Fri, Aug 10, 2001 at 03:09:29AM -0400, Zack Weinberg wrote:
> > That is one target per machine description file in the CVS tree,
> > with one important exception: MC68K.  Unlike a lot of these things,
> > people actually _use_ that chip still, so it's actually a problem.
> > My build failed with an undefined reference to init_section().
> 
> What target tuple, exactly?  I tested 4 m68k targets.

m68k-unknown-linux-gnu.  Here's the last few lines of the build log:

gcc -c -DCROSS_COMPILE -DIN_GCC    -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I. -I../../../gcc_vanilla/gcc -I../../../gcc_vanilla/gcc/. -I../../../gcc_vanilla/gcc/config -I../../../gcc_vanilla/gcc/../include \
        ../../../gcc_vanilla/gcc/config/m68k/m68k.c -o m68k.o
../../../gcc_vanilla/gcc/config/m68k/m68k.c: In function `output_addsi3':
../../../gcc_vanilla/gcc/config/m68k/m68k.c:2777: warning: comparison between signed and unsigned
../../../gcc_vanilla/gcc/config/m68k/m68k.c: In function `output_andsi3':
../../../gcc_vanilla/gcc/config/m68k/m68k.c:4111: warning: comparison between signed and unsigned
../../../gcc_vanilla/gcc/config/m68k/m68k.c: At top level:
../../../gcc_vanilla/gcc/config/m68k/m68k.c:4222: warning: `m68k_coff_asm_named_section' defined but not used
../../../gcc_vanilla/gcc/config/m68k/m68k.c:4239: warning: `m68k_svr3_asm_out_constructor' defined but not used
rm -rf libbackend.a
ar rc libbackend.a alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o combine.o conflict.o convert.o cse.o cselib.o dbxout.o debug.o dependence.o df.o diagnostic.o doloop.o dominance.o dwarf2asm.o dwarf2out.o dwarfout.o emit-rtl.o except.o explow.o expmed.o expr.o final.o flow.o fold-const.o function.o gcse.o genrtl.o ggc-common.o global.o graph.o haifa-sched.o hash.o hashtable.o ifcvt.o insn-attrtab.o insn-emit.o insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o integrate.o intl.o jump.o lcm.o lists.o local-alloc.o loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o profile.o real.o recog.o reg-stack.o regclass.o regmove.o regrename.o reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o sibcall.o simplify-rtx.o splay-tree.o ssa.o ssa-ccp.o ssa-dce.o stmt.o stor-layout.o stringpool.o timevar.o toplev.o tree.o unroll.o varasm.o varray.o version.o xcoffout.o ggc-page.o m68k.o 
ranlib libbackend.a
gcc -DCROSS_COMPILE -DIN_GCC    -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H  -o cc1 \
        c-parse.o c-lang.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o c-dump.o libcpp.a  main.o libbackend.a obstack.o      ../libiberty/libiberty.a
libbackend.a(m68k.o): In function `m68k_svr3_asm_out_constructor':
/home/zack/src/b/gcc_v_x/gcc/../../../gcc_vanilla/gcc/config/m68k/m68k.c:4247: undefined reference to `init_section'
collect2: ld returned 1 exit status
make: *** [cc1] Error 1

hmm... the undefined reference comes from a function that's gotten a
defined-but-not-used warning.  Missing #ifdefs?

the variant part of config.h is

#ifdef IN_GCC
# include "ansidecl.h"
# include "m68k/linux.h"
# include "defaults.h"
#endif
#ifndef POSIX
# define POSIX
#endif

zw



More information about the Gcc-patches mailing list