public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: p0ulp3 <p0ulp3@gmail.com>
To: "Jim Wilson" <wilson@tuliptree.org>
Cc: gcc-help@gcc.gnu.org, brian@dessent.net
Subject: Re: [v850] cross compiler - file v850.md
Date: Mon, 14 Apr 2008 16:04:00 -0000	[thread overview]
Message-ID: <231785cb0804140125v23184f67p9bda2be1701b6dbc@mail.gmail.com> (raw)
In-Reply-To: <47FFCAF6.7060605@tuliptree.org>

Hi,

>  You must use the some options when linking as when compiling.  Add -mv850e
> to LDFLAGS and your problem will go away, as that tells gcc to use the v850e
> version of libgcc.  And drop the explicit -L option, that isn't necessary or
> useful.
>
>  Jim

You solved a part of the problem, the flag -mv850e was missing for the
linker, and now the symbols callt_... are resolved, but the symbols
___DI() and ___EI() are still unresolved :

$ make clean && make 2>&1 | tee make.out
rm -rf src/*.o
rm -rf *.i
rm -rf *.s
/tools/gnu/bin/v850-elf-gcc.exe -o src/Display.o -c -mv850e -I/tools/gnu/v850-el
f/include/ src/Display.c
/tools/gnu/bin/v850-elf-gcc.exe -o src/main.o -c -mv850e -I/tools/gnu/v850-elf/i
nclude/ src/main.c
src/main.c: In function 'main':
src/main.c:39: warning: return type of 'main' is not 'int'
/tools/gnu/bin/v850-elf-gcc.exe -o test -mv850e src/Display.o src/main.o
src/main.o: In function `_main':
main.c:(.text+0x10): undefined reference to `___DI'
main.c:(.text+0x30): undefined reference to `___EI'
src/main.o: In function `_INTP5':
main.c:(.text+0x370): undefined reference to `___EI'
collect2: ld returned 1 exit status
make: *** [test] Error 1

So I have replaced each call of __DI() and __EI() by asm("di") and
asm("ei") and the program is linked now but if anyone has an idea to
solve this problem, let me know.

Thanks again for your help
p0ulp3

  reply	other threads:[~2008-04-14  8:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 17:36 p0ulp3
2008-04-11 12:14 ` Brian Dessent
2008-04-11 15:02   ` p0ulp3
2008-04-11 23:54     ` Jim Wilson
2008-04-14 16:04       ` p0ulp3 [this message]
2008-04-14 18:06         ` Jim Wilson

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=231785cb0804140125v23184f67p9bda2be1701b6dbc@mail.gmail.com \
    --to=p0ulp3@gmail.com \
    --cc=brian@dessent.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=wilson@tuliptree.org \
    /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).