public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "pati (sent by Nabble.com)" <lists@nabble.com>
To: gcc@gcc.gnu.org
Subject: gcc help
Date: Wed, 30 Nov 2005 22:40:00 -0000	[thread overview]
Message-ID: <1725379.post@talk.nabble.com> (raw)


Hi , 

I am new to gcc and shell commands. I am trying to compile my code using gcc 3.3.2 provided with AMD Au1550 development CD. When I compile my code, I get an error message with undefined references to printf and other file i/o functions. I saw a couple of emails in the forum with the same problem.But, I think I have problem with the makefile I am using. I never wrote a make file before and I am using the makefile from the hello World example given with Au1550 CD. It works for that example, but it crashes with my code. 
I am attching the makefile with this email.. 

# Program name 
NAME = test 

# Endian 
ifndef ENDIAN 
ENDIAN = EL 
endif 

# Tool-chain used for compilation of code 
# Win32 Cygwin toolchain 
TOOLCHAIN = cygwin 
# Monta Vista Hard Hat Linux toolchain 
#TOOLCHAIN = hhl 

ifeq ($(TOOLCHAIN),cygwin) 
TOOLSDIR = /usr/local/comp/mips-elf/gcc-3.3.2 
AS = $(TOOLSDIR)/bin/mips-elf-as 
CC = $(TOOLSDIR)/bin/mips-elf-gcc -fno-builtin 
LD = $(TOOLSDIR)/bin/mips-elf-ld 
OD = $(TOOLSDIR)/bin/mips-elf-objdump 
OC = $(TOOLSDIR)/bin/mips-elf-objcopy 

#STRIP = $(TOOLSDIR)/bin/mips-elf-strip 
endif 

ifeq ($(TOOLCHAIN),hhl) 
TOOLSDIR = /opt/hardhat/devkit/mips/fp_le 
AS = $(TOOLSDIR)/bin/mips_fp_le-as 
CC = $(TOOLSDIR)/bin/mips_fp_le-gcc -fno-pic -mno-abicalls 
LD = $(TOOLSDIR)/bin/mips_fp_le-ld 
OD = $(TOOLSDIR)/bin/mips_fp_le-objdump 
OC = $(TOOLSDIR)/bin/mips_fp_le-objcopy 
#STRIP = $(TOOLSDIR)/bin/mips_fp_le-strip 
endif 

RM = rm -f 

# 
# GCC options valid for Au1000 
# 
CFLAGS = -mips32 -G 0 -O2 -$(ENDIAN) -D$(ENDIAN) -Wa,-G0,-non_shared -I. 

# 
# Default rules for compiling/assembling 
# 
.c.o: 
        $(CC) -c $(CFLAGS) $< -o $@ 

.S.o: 
        $(CC) -c $(CFLAGS) -D_ASSEMBLER_ $< -o $@ 

# 
# Files to compile 
# 
OBJS = \ 
        test.o 

# 
# Rule for making 
# 
all: $(OBJS) 
        $(LD) -$(ENDIAN) -T test.ld -G 0 $(OBJS) -o $(NAME).elf 
        $(OD) -D $(NAME).elf > $(NAME).dis 
        $(OC) -O srec $(NAME).elf $(NAME).rec 

clean: 
        $(RM) *.o 
        $(RM) *.dis 
        $(RM) *.rec 
        $(RM) *.elf 
        $(RM) *~ 

I got the linnker directive from the hello world example.I assume the problem is with the linker and with the test.ld file from the hello world example. 

I used SDE toolchain before with the same code ,but a different make file but I never got this problem before. 

I really need help on this immediately. 

Thanks in advance - Pati

--
Sent from the gcc - General forum at Nabble.com:
http://www.nabble.com/gcc-help-t648991.html#a1725379

             reply	other threads:[~2005-11-30 22:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30 22:40 pati (sent by Nabble.com) [this message]
2005-11-30 23:04 ` Mike Stump
  -- strict thread matches above, loose matches on Subject: below --
2010-05-18 18:11 packet
2010-05-18 18:18 ` Joel Sherrill
2005-03-29 17:54 Gcc help andre
2005-03-29 18:10 ` andre
2005-03-29 19:02 ` Eljay Love-Jensen
2005-03-29 19:15   ` Eljay Love-Jensen
2004-09-09  9:53 GCC help Sonawane Sachin Vijayku
2004-09-09 10:08 ` Sonawane Sachin Vijayku
2004-09-09 10:25 ` Ranjit Mathew
2004-09-09 10:37 ` Nathan Sidwell
2004-09-09 10:40   ` Nathan Sidwell
2004-01-22  8:22 gcc help Andrew
2004-01-22 22:06 ` Jim Wilson
2003-12-03 17:48 GCC help George Ciobanu
2003-12-04 20:10 ` Jim Wilson
2002-10-25 16:21 gcc help MICHAEL GOODWIN
2002-02-19  5:32 GCC help aditya nishandar
2002-02-19  8:12 ` Philipp Thomas
     [not found] <616BE6A276E3714788D2AC35C40CD18D29DB3D@whale.softwire.co.uk>
2001-12-18 23:44 ` gcc help Rupert Wood
2001-12-18 12:16 ashish  kamble
2001-10-14 22:12 GCC help pradeep kumar mishra
2001-10-15  4:49 ` Erik Mouw
2000-07-21 14:42 Gcc Help Anjul Srivastava
2000-07-21 14:35 Koaps
2000-07-21 14:49 ` Alexandre Oliva
2000-06-13 14:09 GCC Help Amir Elaguizy
2000-06-13 14:15 ` llewelly
2000-06-13 14:16 ` Mo McKinlay
2000-06-13 14:37 ` Alexandre Oliva
1998-12-15 10:18 Eric Methot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1725379.post@talk.nabble.com \
    --to=lists@nabble.com \
    --cc=gcc@gcc.gnu.org \
    --cc=udaynag@softrisc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).