linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* cross compiling a library with ELDK
@ 2007-09-18 13:02 Murat Artun
  2007-09-18 22:41 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Murat Artun @ 2007-09-18 13:02 UTC (permalink / raw)
  To: linuxppc-embedded

Hello all,

I want to cross compile a free software library with ELDK 3.1.1 for
powerpc. I have ELDK installed under directory /opt and my system and
PATH is set properly. I have a few points to be clarified:

- GCC toolchain components for cross compiling have "ppc_8xx-" prefix
in their names. In addition, I learned from trial and error that by
setting --host=CROSS_ENV results generation of a Makefile with
compilation tools to be prefixed with CROSS_ENV. So I set
--host=ppc_8xx but I received below error from configure script:

checking host system type... Invalid configuration `ppc_8xx': machine
`ppc_8xx' not recognized
configure: error: /bin/sh scripts/config.sub ppc_8xx failed

I have checked config.sub file and could not find ppc_8xx as a machine
type. I have added it myself properly and executed configure script
and generated a Makefile with all ppc_8xx prefixed GCC toolchain
components (g++, ar, ranlib etc.). Considering that I have edited
config.sub file, is this the true way of cross compilation? Or, if
not, what is the way of specifying machine type for ELDK cross
compilation and making the configure script to generate a Makefile
with ppc_8xx prefixed GCC toolchain components.

- For a cross compilation with ELDK how can we be sure that config.h
file for a software packet is generated properly? I mean, how can we
be sure that ELDK components is checked instead of our host linux
system for generating a config.h file by the configure script?

Thanks in advice...
-- 
M u r at  A r t u n, MSc.
   Design Engineer

"be conservative in what you do, be liberal in what you accept from others"

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

* Re: cross compiling a library with ELDK
  2007-09-18 13:02 cross compiling a library with ELDK Murat Artun
@ 2007-09-18 22:41 ` Wolfgang Denk
  2007-09-19  8:28   ` Murat Artun
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2007-09-18 22:41 UTC (permalink / raw)
  To: Murat Artun; +Cc: linuxppc-embedded

In message <4e5a3720709180602g20ccc060hbf7f091839a18c99@mail.gmail.com> you wrote:
> 
> I want to cross compile a free software library with ELDK 3.1.1 for
> powerpc. I have ELDK installed under directory /opt and my system and
> PATH is set properly. I have a few points to be clarified:

May I recommend that, as a first step, you read the documentation?

> - For a cross compilation with ELDK how can we be sure that config.h
> file for a software packet is generated properly? I mean, how can we

You cannot be sure. You will always have to check.

> be sure that ELDK components is checked instead of our host linux
> system for generating a config.h file by the configure script?

RTFM. See especially the two bullets at
http://www.denx.de/wiki/view/DULG/ELDKRebuildingComponents#Section_3.7.2.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Wisdom is one of the few things that looks bigger the further away it
is.                               - Terry Pratchett, _Witches Abroad_

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

* Re: cross compiling a library with ELDK
  2007-09-18 22:41 ` Wolfgang Denk
@ 2007-09-19  8:28   ` Murat Artun
  0 siblings, 0 replies; 3+ messages in thread
From: Murat Artun @ 2007-09-19  8:28 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-embedded

Wolfgang,

Thanks for your response...

I confess I did not read the whole documentation from scratch, but I
have browsed many sections especially related with my issue. I should
say it is always said in documentation that setting $CROSS_COMPILE
environment variable is necessary, but that did not work for me.

Specifically, I am trying to cross compile osip library with EDLK (not
an ELDK component). When I execute the configure script I want the
config.h to be generated to reflect the target system. As from your
last response I understand that I always need to make sure by checking
config.h file myself.

After I have posted this problem I found the below thread:

http://ozlabs.org/pipermail/linuxppc-embedded/2003-July/011785.html

Following the same, I have achieved generation of config.h by checking
ELDK components and GNU cross tools to be prefixed with ppc_8xx.

Although I was not able to build shared libraries with the generated
makefile, building static libraries was OK. But it seems as if it is
somehow difficult to cross build a SW component that is not a part of
ELDK, and this is harder than "Rebuilding ELDK Components" which is
specified to be so straightforward in the documentation.

Thanks and regards...

On 9/19/07, Wolfgang Denk <wd@denx.de> wrote:
> In message <4e5a3720709180602g20ccc060hbf7f091839a18c99@mail.gmail.com> you wrote:
> >
> > I want to cross compile a free software library with ELDK 3.1.1 for
> > powerpc. I have ELDK installed under directory /opt and my system and
> > PATH is set properly. I have a few points to be clarified:
>
> May I recommend that, as a first step, you read the documentation?
>
> > - For a cross compilation with ELDK how can we be sure that config.h
> > file for a software packet is generated properly? I mean, how can we
>
> You cannot be sure. You will always have to check.
>
> > be sure that ELDK components is checked instead of our host linux
> > system for generating a config.h file by the configure script?
>
> RTFM. See especially the two bullets at
> http://www.denx.de/wiki/view/DULG/ELDKRebuildingComponents#Section_3.7.2.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> Wisdom is one of the few things that looks bigger the further away it
> is.                               - Terry Pratchett, _Witches Abroad_
>


-- 
M u r at  A r t u n, MSc.
   Design Engineer

"be conservative in what you do, be liberal in what you accept from others"

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

end of thread, other threads:[~2007-09-19  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 13:02 cross compiling a library with ELDK Murat Artun
2007-09-18 22:41 ` Wolfgang Denk
2007-09-19  8:28   ` Murat Artun

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 NNTP newsgroup(s).