public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* ld fails to build for target
@ 2006-04-24 18:28 Andrija Radicevic
  2006-04-24 19:37 ` Dave Korn
  0 siblings, 1 reply; 11+ messages in thread
From: Andrija Radicevic @ 2006-04-24 18:28 UTC (permalink / raw)
  To: binutils

Hi all,

I'm trying to port binutils (2.16) for a new target. After I have added the
files I need and edited .in .tgt and .am files I have run aclocal,
autoheader, automake and autoconf on each directory where I have made those
changes (except for the top src directory in which only the config.sub was
changed).
Then I have run configure, which seamed ok, and afterwards make and it
failed on building ld. Make exits whit error while doing configure in ld
with a message that it doesn't support the target and that I should check in
ld/configure.tgt for supported target?! I'm confused because I have added
the target there.
Can anybody help me out, please?

Best regards


Andrija Radicevic


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ld fails to build for target
  2006-04-24 18:28 ld fails to build for target Andrija Radicevic
@ 2006-04-24 19:37 ` Dave Korn
  2006-04-25  2:27   ` Andrija Radicevic
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Korn @ 2006-04-24 19:37 UTC (permalink / raw)
  To: andrija.radicevic, binutils

On 24 April 2006 13:11, Andrija Radicevic wrote:

> Then I have run configure, which seamed ok, and afterwards make and it
> failed on building ld. Make exits whit error while doing configure in ld
> with a message that it doesn't support the target and that I should check in
> ld/configure.tgt for supported target?! I'm confused because I have added
> the target there.


  Well, it's all just shell scripts.  Run it under "bash -x" and see what
commands are being executed and see why it goes wrong.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-24 19:37 ` Dave Korn
@ 2006-04-25  2:27   ` Andrija Radicevic
  2006-04-25  3:22     ` Andreas Schwab
  2006-04-25 15:21     ` Dave Korn
  0 siblings, 2 replies; 11+ messages in thread
From: Andrija Radicevic @ 2006-04-25  2:27 UTC (permalink / raw)
  To: Dave Korn, binutils

>
>  Well, it's all just shell scripts.  Run it under "bash -x" and see what
> commands are being executed and see why it goes wrong.
>

I have tried this too, but it didn't help me much. Obviously, I haven't 
explained the problem clearly enough.

1. the configure went ok (at least I didn't notice anything suspicuose)
2. make succeded to build everything (bfd, opcodes, gas ...) but ld
it exits with the message:

*** ld does not support target e1-coff
*** see ld/configure.tgt for supported targets
make: *** [configure-ld] Error 1

this is the message from ld/configure.tgt which is at the end of the block

case "${target}" in

...
esac

the thing is that I have the line

e1-*-coff)  targ_emul=coff_e1 ;;

in this block, but the case somehow doesn't evaluate the alias e1-coff to 
e1-*-coff

regards


Andrija Radicevic 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-25  2:27   ` Andrija Radicevic
@ 2006-04-25  3:22     ` Andreas Schwab
  2006-04-25 15:23       ` Andrija Radicevic
  2006-04-25 15:21     ` Dave Korn
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2006-04-25  3:22 UTC (permalink / raw)
  To: Andrija Radicevic; +Cc: Dave Korn, binutils

"Andrija Radicevic" <andrija.radicevic@zg.t-com.hr> writes:

> this is the message from ld/configure.tgt which is at the end of the block
>
> case "${target}" in
>
> ...
> esac
>
> the thing is that I have the line
>
> e1-*-coff)  targ_emul=coff_e1 ;;
>
> in this block, but the case somehow doesn't evaluate the alias e1-coff to
> e1-*-coff

You need to make sure that config.sub translate e1-coff into, say,
e1-unknown-coff, ie. the command "./config.sub e1-coff" should print
"e1-unknown-coff".  All target matches in the configure scripts assume
that config.sub has canonicalized the target name into the CPU-VENDOR-OS
form.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: ld fails to build for target
  2006-04-25  2:27   ` Andrija Radicevic
  2006-04-25  3:22     ` Andreas Schwab
@ 2006-04-25 15:21     ` Dave Korn
  1 sibling, 0 replies; 11+ messages in thread
From: Dave Korn @ 2006-04-25 15:21 UTC (permalink / raw)
  To: 'Andrija Radicevic', binutils

On 24 April 2006 20:38, Andrija Radicevic wrote:

> the thing is that I have the line
> 
> e1-*-coff)  targ_emul=coff_e1 ;;
> 
> in this block, but the case somehow doesn't evaluate the alias e1-coff to
> e1-*-coff

  Count the dashes!  :)


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-25  3:22     ` Andreas Schwab
@ 2006-04-25 15:23       ` Andrija Radicevic
  2006-04-25 16:40         ` Nick Clifton
  0 siblings, 1 reply; 11+ messages in thread
From: Andrija Radicevic @ 2006-04-25 15:23 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Dave Korn, binutils

You need to make sure that config.sub translate e1-coff into, say,
e1-unknown-coff, ie. the command "./config.sub e1-coff" should print
"e1-unknown-coff".  All target matches in the configure scripts assume
that config.sub has canonicalized the target name into the CPU-VENDOR-OS
form.

and this is exactly what it does, prints
e1-unknown-coff

shouldn't this match e1-*-coff?

Andrija

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-25 15:23       ` Andrija Radicevic
@ 2006-04-25 16:40         ` Nick Clifton
  2006-04-25 17:09           ` Andrija Radicevic
  0 siblings, 1 reply; 11+ messages in thread
From: Nick Clifton @ 2006-04-25 16:40 UTC (permalink / raw)
  To: Andrija Radicevic; +Cc: Andreas Schwab, Dave Korn, binutils

Hi Andrija,

>> You need to make sure that config.sub translate e1-coff into, say,
>> e1-unknown-coff, ie. the command "./config.sub e1-coff" should print
>> "e1-unknown-coff".  All target matches in the configure scripts assume
>> that config.sub has canonicalized the target name into the CPU-VENDOR-OS
>> form.
> 
> and this is exactly what it does, prints
> e1-unknown-coff
> 
> shouldn't this match e1-*-coff?

Yes....

Lets have a look at these ld/configure.tgt and config.sub files of 
yours.  Can you tar them up, zip them up and then post them ?

Cheers
   Nick


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-25 16:40         ` Nick Clifton
@ 2006-04-25 17:09           ` Andrija Radicevic
  2006-04-25 17:12             ` Nick Clifton
  0 siblings, 1 reply; 11+ messages in thread
From: Andrija Radicevic @ 2006-04-25 17:09 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Andreas Schwab, Dave Korn, binutils

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

> 
> Yes....
> 
> Lets have a look at these ld/configure.tgt and config.sub files of 
> yours.  Can you tar them up, zip them up and then post them ?
> 

here are the files

regards

Andrija


[-- Attachment #2: files.tar.bz2 --]
[-- Type: application/octet-stream, Size: 13281 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-25 17:09           ` Andrija Radicevic
@ 2006-04-25 17:12             ` Nick Clifton
  2006-04-25 19:56               ` Andrija Radicevic
  0 siblings, 1 reply; 11+ messages in thread
From: Nick Clifton @ 2006-04-25 17:12 UTC (permalink / raw)
  To: Andrija Radicevic; +Cc: Andreas Schwab, Dave Korn, binutils

Hi Andrija,

>> Lets have a look at these ld/configure.tgt and config.sub files of 
>> yours.  Can you tar them up, zip them up and then post them ?
> 
> here are the files

Right, so the config.sub file you sent does translate "e1-coff" into 
"e1-unknown-coff" and the configure.tgt file does recognise a target of 
"e1-unknown-coff".

Since the error message that you get from configure.tgt show that it 
does not recognise "e1-coff" it follows that this translation from 
"e1-coff" into "e1-unknown-coff" is not being performed.  You need to 
check what is happening in the ld/configure script around these lines:

     # Canonicalize the secondary target names.
     result=`$ac_config_sub $targ_alias 2>/dev/null`
     if test -n "$result"; then
	targ=$result
     else
	targ=$targ_alias
     fi

     . ${srcdir}/configure.tgt

This starts at line 9702 in the version of the configure file that I 
have here.  Presumably the invocation of "result=`$ac_config_sub 
$targ_alias`" is not working.  You need to find out why.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-25 17:12             ` Nick Clifton
@ 2006-04-25 19:56               ` Andrija Radicevic
  2006-05-01 15:34                 ` Andrija Radicevic
  0 siblings, 1 reply; 11+ messages in thread
From: Andrija Radicevic @ 2006-04-25 19:56 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Andreas Schwab, Dave Korn, binutils


>
> Since the error message that you get from configure.tgt show that it does 
> not recognise "e1-coff" it follows that this translation from "e1-coff" 
> into "e1-unknown-coff" is not being performed.  You need to check what is 
> happening in the ld/configure script around these lines:
>
>     # Canonicalize the secondary target names.
>     result=`$ac_config_sub $targ_alias 2>/dev/null`
>     if test -n "$result"; then
> targ=$result
>     else
> targ=$targ_alias
>     fi
>
>     . ${srcdir}/configure.tgt
>

I have found the part in my configure file, dough it looks a little bit 
different

    # Canonicalize the secondary target names.
    result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
    if test -n "$result"; then
 targ=$result
    else
 targ=$targ_alias
    fi

    . ${srcdir}/configure.tgt

obviously it must end up in the else branch (targ=$targ_alias) as you 
already said. Now I have to figure out why this happens.
Thanks for your help.

greetings

Andrija



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ld fails to build for target
  2006-04-25 19:56               ` Andrija Radicevic
@ 2006-05-01 15:34                 ` Andrija Radicevic
  0 siblings, 0 replies; 11+ messages in thread
From: Andrija Radicevic @ 2006-05-01 15:34 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Andreas Schwab, Dave Korn, binutils

>
>>
>> Since the error message that you get from configure.tgt show that it does 
>> not recognise "e1-coff" it follows that this translation from "e1-coff" 
>> into "e1-unknown-coff" is not being performed.  You need to check what is 
>> happening in the ld/configure script around these lines:
>>
>>     # Canonicalize the secondary target names.
>>     result=`$ac_config_sub $targ_alias 2>/dev/null`
>>     if test -n "$result"; then
>> targ=$result
>>     else
>> targ=$targ_alias
>>     fi
>>
>>     . ${srcdir}/configure.tgt
>>
>
> I have found the part in my configure file, dough it looks a little bit 
> different
>
>    # Canonicalize the secondary target names.
>    result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
>    if test -n "$result"; then
> targ=$result
>    else
> targ=$targ_alias
>    fi
>
>    . ${srcdir}/configure.tgt
>
> obviously it must end up in the else branch (targ=$targ_alias) as you 
> already said. Now I have to figure out why this happens.
> Thanks for your help.
>

Hi,

It turnd out that
${CONFIG_SHELL-/bin/sh} evaluates to /bin/sh
and
$ac_config_sub to /bin/sh ../../binutils-2.16/ld/../config.sub
which together obiously results with an awkward construct

After I have removed ${CONFIG_SHELL-/bin/sh}  from that particular line in 
the ld/configure script, ld was built. Now, I wonder what went wrong? I 
suspect that the autoconf (2.59) and automake (1.9.2) versions I was using 
messed the thing up. I haven't built those myself, they came with the Fedora 
Core 3 distribution I have installed on my machine.

regards

Andrija 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-05-01 15:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-24 18:28 ld fails to build for target Andrija Radicevic
2006-04-24 19:37 ` Dave Korn
2006-04-25  2:27   ` Andrija Radicevic
2006-04-25  3:22     ` Andreas Schwab
2006-04-25 15:23       ` Andrija Radicevic
2006-04-25 16:40         ` Nick Clifton
2006-04-25 17:09           ` Andrija Radicevic
2006-04-25 17:12             ` Nick Clifton
2006-04-25 19:56               ` Andrija Radicevic
2006-05-01 15:34                 ` Andrija Radicevic
2006-04-25 15:21     ` Dave Korn

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).