* cross compilation issue
@ 2007-10-16 14:24 Venkatesh Ananthakrishnan, TLS-Chennai
2007-10-16 14:51 ` ravi.rao
0 siblings, 1 reply; 5+ messages in thread
From: Venkatesh Ananthakrishnan, TLS-Chennai @ 2007-10-16 14:24 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
Hai
I am newbi to linux.
I wrote the application usb libusb which works fine with x86 pc.
I want to compile the application for ppc. I have cross compiled libusb.
I have tool chain also.
If I give ppc_6xx-gcc filename.c
It gives the error message as usb.h No such a file or directory.
How to give include path and library path during compilation?
Please do the needful
Regards,
Venkatesh
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
[-- Attachment #2: Type: text/html, Size: 4005 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cross compilation issue
2007-10-16 14:24 cross compilation issue Venkatesh Ananthakrishnan, TLS-Chennai
@ 2007-10-16 14:51 ` ravi.rao
2007-10-16 16:36 ` Leisner, Martin
0 siblings, 1 reply; 5+ messages in thread
From: ravi.rao @ 2007-10-16 14:51 UTC (permalink / raw)
To: avenkatesh
Cc: linuxppc-embedded-bounces+ravi.rao=rflelect.com,
linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2603 bytes --]
Hi,
Easiest way is to edit the x86 Makefile so that gcc and ld points to Ur
tool chain's ppc_6xx-gcc & ppc_6xx-ld..
Thanks,
Ravishankar Govindarao
RFL Electronics Inc.
E-mail : Ravi.Rao@rflelect.com
Voice: 973.334.3100 Ext. 233
Fax: 973.334.3863
CONFIDENTIALITY NOTE
This e-mail, including any attachments, may contain confidential and/or
legally privileged information. The Information is intended only for the
use of the individual or entity named on this e-mail . If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or the taking of any action in reliance on the contents of
this transmitted Information is strictly prohibited. Further, if you are
not the intended recipient, please notify us by return e-mail and delete
the Information promptly.
"Venkatesh Ananthakrishnan, TLS-Chennai" <avenkatesh@hcl.in>
Sent by: linuxppc-embedded-bounces+ravi.rao=rflelect.com@ozlabs.org
10/16/2007 10:24 AM
To
<linuxppc-embedded@ozlabs.org>
cc
Subject
cross compilation issue
Hai
I am newbi to linux.
I wrote the application usb libusb which works fine with x86 pc.
I want to compile the application for ppc. I have cross compiled libusb. I
have tool chain also.
If I give ppc_6xx-gcc filename.c
It gives the error message as usb.h No such a file or directory.
How to give include path and library path during compilation?
Please do the needful
Regards,
Venkatesh
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of
this message without the prior written consent of the author of this
e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
[-- Attachment #2: Type: text/html, Size: 4726 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: cross compilation issue
2007-10-16 14:51 ` ravi.rao
@ 2007-10-16 16:36 ` Leisner, Martin
2007-10-16 19:07 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Leisner, Martin @ 2007-10-16 16:36 UTC (permalink / raw)
To: ravi.rao, avenkatesh
Cc: linuxppc-embedded-bounces+ravi.rao=rflelect.com,
linuxppc-embedded
I sometimes found this painful...
I have a simple script in a configured directory "make-line" which looks =
like
bash2 :2 mleisner@linuxcom-01 11:53:58; cat make-line
#! /bin/bash
exec make ARCH=3Dpowerpc =
CROSS_COMPILE=3D/opt/denx/eldk4.1/usr/bin/ppc_74xx- =
INSTALL_MOD_PATH=3D${PWD}/root $*
I know hardhat linux had a strategy to make . files hiding the names of =
ARCH/CROSS_COMPILE -- so typing make
would work once configured...
IMHO it should be hardcoded in the Makefile after configuration -- it =
causes a lot of grief if you FORGET
to specify one of these and just type "make".
One of the things I want to do is look at how the linux make system =
works now (I recall at times I edit the Makefile
to hardcode these things).
marty
________________________________________
From: linuxppc-embedded-bounces+martin.leisner=3Dxerox.com@ozlabs.org =
[mailto:linuxppc-embedded-bounces+martin.leisner=3Dxerox.com@ozlabs.org] =
On Behalf Of ravi.rao@rflelect.com
Sent: Tuesday, October 16, 2007 10:52 AM
To: avenkatesh@hcl.in
Cc: linuxppc-embedded-bounces+ravi.rao=3Drflelect.com@ozlabs.org; =
linuxppc-embedded@ozlabs.org
Subject: Re: cross compilation issue
Hi,=20
=A0Easiest way is to edit the x86 Makefile so that gcc and ld points to =
Ur tool chain's ppc_6xx-gcc & ppc_6xx-ld..=20
Thanks,
Ravishankar Govindarao
RFL Electronics Inc.
E-mail : Ravi.Rao@rflelect.com=20
Voice: 973.334.3100 Ext. 233
Fax: 973.334.3863=20
=A0=20
CONFIDENTIALITY NOTE
This e-mail, including any attachments, may contain confidential and/or =
legally privileged information.=A0 The Information is intended only for =
the use of the individual or entity named on this e-mail .=A0 If you are =
not the intended recipient, you are hereby notified that any disclosure, =
copying, distribution, or the taking of any action in reliance on the =
contents of this transmitted Information is strictly prohibited.=A0 =
Further, if you are not the intended recipient, please notify us by =
return e-mail and delete the Information promptly.=20
=A0=20
=A0=20
=A0=20
"Venkatesh Ananthakrishnan, TLS-Chennai" <avenkatesh@hcl.in>=20
Sent by: linuxppc-embedded-bounces+ravi.rao=3Drflelect.com@ozlabs.org=20
10/16/2007 10:24 AM=20
To
<linuxppc-embedded@ozlabs.org>=20
cc
Subject
cross compilation issue
Hai=20
I am newbi to linux.=20
I wrote the application usb libusb which works fine with x86 pc.=20
I want to compile the application for ppc. I have cross compiled libusb. =
I have tool chain also.=20
If I give ppc_6xx-gcc filename.c=20
It gives the error message as usb.h No such a file or directory.=20
How to give include path and library path during compilation?=20
Please do the needful=20
=A0=20
Regards,=20
Venkatesh=20
=A0=20
DISCLAIMER:
-------------------------------------------------------------------------=
----------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and =
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its =
affiliates. Any views or opinions presented in=20
this email are solely those of the author and may not necessarily =
reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, =
modification, distribution and / or publication of=20
this message without the prior written consent of the author of this =
e-mail is strictly prohibited. If you have=20
received this email in error please delete it and notify the sender =
immediately. Before opening any mail and=20
attachments please check them for viruses and defect.
-------------------------------------------------------------------------=
----------------------------------------------
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded=20
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: cross compilation issue
2007-10-16 16:36 ` Leisner, Martin
@ 2007-10-16 19:07 ` Wolfgang Denk
2007-10-16 19:34 ` Leisner, Martin
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2007-10-16 19:07 UTC (permalink / raw)
To: Leisner, Martin
Cc: linuxppc-embedded,
linuxppc-embedded-bounces+ravi.rao=rflelect.com
Dear Martin,
in message <556445368AFA1C438794ABDA8901891C0750DDF0@USA0300MS03.na.xerox.net> you wrote:
>
> #! /bin/bash
>
> exec make ARCH=powerpc CROSS_COMPILE=/opt/denx/eldk4.1/usr/bin/ppc_74xx- INSTALL_MOD_PATH=${PWD}/root $*
Note that this is *NOT* a suppoted value for CROSS_COMPILE. Please set
your PATH to include the /opt/denx/eldk4.1/usr/bin directory, and set
CROSS_COMPILE=ppc_74xx-
> I know hardhat linux had a strategy to make . files hiding the names of ARCH/CROSS_COMPILE -- so typing make
> would work once configured...
>
> IMHO it should be hardcoded in the Makefile after configuration -- it causes a lot of grief if you FORGET
> to specify one of these and just type "make".
I disagree. Such an approach will hit you as soon as you run a command
not from "make", but from the command line.
Instead, please set and export thse variables in your shell
environment, where each tool can pick it up.
If you have to switch environments frequently you can use some shell
functions to do so. For example, ELDK 4.1 which you use comes with
the "eldk_init" script ("/opt/denx/eldk4.1/eldk_init" in your
installation) which can be "sourced" from the shell like this:
$ source /opt/denx/eldk4.1/eldk_init 74xx
ARCH=ppc
CROSS_COMPILE=ppc_74xx-
DEPMOD=/opt/denx/eldk4.1/usr/bin/depmod.pl
PATH=/opt/denx/eldk4.1/usr/bin:/opt/denx/eldk4.1/bin: ...
$
ELDK 4.2 will use a much cleverer script "eldk-switch" which allows
to select versions and board like this:
-> eldk-switch -r4.1 sequoia
[ sequoia is using PPC440EPx ]
Setup for ppc_4xxFP (using ELDK 4.1)
-> eldk-switch -r4.2 TQM8540
[ TQM8540 is using MPC8540 ]
Setup for ppc_85xx (using ELDK 4.2)
-> eldk-switch -r4.0 MPC860
Setup for ppc_8xx (using ELDK 4.0)
-> eldk-switch MPC7448
Setup for ppc_74xx (using ELDK 4.2)
> One of the things I want to do is look at how the linux make system works now (I recall at times I edit the Makefile
> to hardcode these things).
Never edit the Makefile - this is always a Bad Thing (TM) to do.
Make sure to either set the ARCH and CROSS_COMPILE ariables in your
environment (this is IMHO the more convenient way) or pass them on
the make command line.
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
Wenn Du ein' weise Antwort verlangst, Mußt Du vernünftig fragen.
-- Goethe, Invektiven
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: cross compilation issue
2007-10-16 19:07 ` Wolfgang Denk
@ 2007-10-16 19:34 ` Leisner, Martin
0 siblings, 0 replies; 5+ messages in thread
From: Leisner, Martin @ 2007-10-16 19:34 UTC (permalink / raw)
To: Wolfgang Denk
Cc: linuxppc-embedded,
linuxppc-embedded-bounces+ravi.rao=rflelect.com
Wolfgang,
I disagree vehemently with "modifying" you session to suit the platform.
This becomes a problem when cross-platforms > 1. When I "set the PATH =
and
environment variables" I have the same problem -- I go to a different=20
platform, type make and get bad results. =20
Why is modifying the makefile a "bad thing?" hardhat did it, and =
afterwards
the cross-compile/arch becomes painless and transparent. Building ways =
to=20
construct software with fewer chances of human error is IMHO a "good =
thing".
I tend to lock down my source tree, and have a link tree for each =
platform.
So I'm not changing my build parameters, hard coding these things in the =
makefile
becomes a "set and forget" operation.
I agree with "problems" running from command lines...I often link in=20
special tools into ~/bin so I can find them (instead of modifying my =
path).
But I can go weeks without having to run a tool from the command line, =
make's I run daily.
Having to "source" a script is another thing you can "forget" to do.
I often "forget" to run my 'make-line' script, and when I quickly hit =
<cntl>-C I don't
have problems (but sometimes I do).
marty
PS:
To cross developers, its VERY handy to build a copy of binutils which =
support multiple=20
architectures -- so the
only thing which is really platform dependent is gas...so my host =
nm/objcopy/objdump/ld
supports all the platforms I'm working on...
-----Original Message-----
From: Wolfgang Denk [mailto:wd@denx.de]
Sent: Tue 10/16/2007 3:07 PM
To: Leisner, Martin
Cc: ravi.rao@rflelect.com; avenkatesh@hcl.in; =
linuxppc-embedded-bounces+ravi.rao=3Drflelect.com@ozlabs.org; =
linuxppc-embedded@ozlabs.org
Subject: Re: cross compilation issue
=20
Dear Martin,
in message =
<556445368AFA1C438794ABDA8901891C0750DDF0@USA0300MS03.na.xerox.net> you =
wrote:
>=20
> #! /bin/bash
>=20
> exec make ARCH=3Dpowerpc =
CROSS_COMPILE=3D/opt/denx/eldk4.1/usr/bin/ppc_74xx- =
INSTALL_MOD_PATH=3D${PWD}/root $*
Note that this is *NOT* a suppoted value for CROSS_COMPILE. Please set
your PATH to include the /opt/denx/eldk4.1/usr/bin directory, and set
CROSS_COMPILE=3Dppc_74xx-=20
> I know hardhat linux had a strategy to make . files hiding the names =
of ARCH/CROSS_COMPILE -- so typing make
> would work once configured...
>=20
> IMHO it should be hardcoded in the Makefile after configuration -- it =
causes a lot of grief if you FORGET
> to specify one of these and just type "make".
I disagree. Such an approach will hit you as soon as you run a command
not from "make", but from the command line.
Instead, please set and export thse variables in your shell
environment, where each tool can pick it up.
If you have to switch environments frequently you can use some shell
functions to do so. For example, ELDK 4.1 which you use comes with
the "eldk_init" script ("/opt/denx/eldk4.1/eldk_init" in your
installation) which can be "sourced" from the shell like this:
$ source /opt/denx/eldk4.1/eldk_init 74xx
ARCH=3Dppc
CROSS_COMPILE=3Dppc_74xx-
DEPMOD=3D/opt/denx/eldk4.1/usr/bin/depmod.pl
PATH=3D/opt/denx/eldk4.1/usr/bin:/opt/denx/eldk4.1/bin: ...
$
ELDK 4.2 will use a much cleverer script "eldk-switch" which allows
to select versions and board like this:
-> eldk-switch -r4.1 sequoia
[ sequoia is using PPC440EPx ]
Setup for ppc_4xxFP (using ELDK 4.1)
-> eldk-switch -r4.2 TQM8540
[ TQM8540 is using MPC8540 ]
Setup for ppc_85xx (using ELDK 4.2)
-> eldk-switch -r4.0 MPC860
Setup for ppc_8xx (using ELDK 4.0)
-> eldk-switch MPC7448
Setup for ppc_74xx (using ELDK 4.2)
> One of the things I want to do is look at how the linux make system =
works now (I recall at times I edit the Makefile
> to hardcode these things).
Never edit the Makefile - this is always a Bad Thing (TM) to do.
Make sure to either set the ARCH and CROSS_COMPILE ariables in your
environment (this is IMHO the more convenient way) or pass them on
the make command line.
Best regards,
Wolfgang Denk
--=20
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
Wenn Du ein' weise Antwort verlangst, Mu=DFt Du vern=FCnftig fragen.
-- Goethe, Invektiven
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-16 19:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16 14:24 cross compilation issue Venkatesh Ananthakrishnan, TLS-Chennai
2007-10-16 14:51 ` ravi.rao
2007-10-16 16:36 ` Leisner, Martin
2007-10-16 19:07 ` Wolfgang Denk
2007-10-16 19:34 ` Leisner, Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox