This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: BSD to Hitachi sh-hms cross compiler problems.



> Is there any way to make gcc output in srec format?   

I don't know if it will directly.  I use objcopy to convert the coff to 
srecords.  My final link command in the make file looks something like this:

LD=/hitachi/cygwin32/bin/h8300-hms-ld  -oformat coff-h8300
NM=/hitachi/cygwin32/bin/h8300-hms-nm
OBJCOPY=/hitachi/cygwin32/bin/objcopy
OBJDUMP=/hitachi/cygwin32/bin/objdump

$(TARGET) : $(OBJ_FILES) $(LINKER_SCRIPT)
    $(LD)  $(LIBDIR_FLAGS) -relax -m h8300h -Map $*.map -o $@ -T  \
                     $(LINKER_SCRIPT ) $(OBJ_FILES) -l c -l gcc $(LIB_FLAGS)    
    echo ^G^G^G    
    $(OBJCOPY) -O symbolsrec $*.x $*.mot
    $(OBJCOPY) -O srec $*.x $*.sre
    $(NM)  -C -n -t x $*.x > $*.sym
    perl util/stats.pl $*.sym
ifdef CREATE_DUMP_FILE
    $(OBJDUMP) -s -f -h -l -D -S  $*.x > $*.dmp
endif


> And if that doesn't work, how would I lin,k to libgcc.a?  I tried -lgcc as
> a linker argument (in the original makefile) and it couldn't find it.

I would try the env var  GCC_EXECPREFIX or -L<LIBDIR>
~~~~~~~~~~~~~~~~~~~ Kevin Dahlhausen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Morse Controls                                   ap096@po.cwru.edu
"Do or do not.  There is no 'Try.' "  Yoda