public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [crosstool-ng] How to create a RPM of a toolchain
@ 2010-03-24 14:43 Laurent Charpentier
  2010-03-25 21:58 ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Laurent Charpentier @ 2010-03-24 14:43 UTC (permalink / raw)
  To: crossgcc

Hi Everone,

I successfully created a toolchain with crosstool-ng (thanks a lot to the
crosstool-ng team :).

To ease deployment of this toolchain I would like to create a RPM containing the
whole toolchain files/directories.

Question: How to create a RPM of the whole toolchain?
Is it possible to break down the whole toolchain RPM into several RPMs, having
one RPM for each component of the toolchain (e.g. gcc.rpm, binutils.rpm,
glibc-devel.rpm, ...).

FYI rpmbuild works from a SPEC file (not from already-made binary files) and
then runs the full build using this file.

Thanks
Laurent





--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-24 14:43 [crosstool-ng] How to create a RPM of a toolchain Laurent Charpentier
@ 2010-03-25 21:58 ` Yann E. MORIN
  2010-03-25 22:52   ` Thomas Petazzoni
  2010-03-26  8:12   ` Oron Peled
  0 siblings, 2 replies; 9+ messages in thread
From: Yann E. MORIN @ 2010-03-25 21:58 UTC (permalink / raw)
  To: crossgcc; +Cc: Laurent Charpentier

Laurent, All,

[Laurent, the canonical address for the list is crossgcc@sourceware.org]

On Wednesday 24 March 2010 15:42:54 Laurent Charpentier wrote:
> I successfully created a toolchain with crosstool-ng (thanks a lot to the
> crosstool-ng team :).

Cheers! :-)

> To ease deployment of this toolchain I would like to create a RPM
> containing the whole toolchain files/directories.
> 
> Question: How to create a RPM of the whole toolchain?

I don't speak RPM myself, sorry.

When I have to deploy a toolchain to different machines, I:
 - either build the toolchain on every machines,
 - or make a tarball of the toolchain

The first option is valid if you have many different systems, while
the second applies if all the machines are similar enough.

Note that, the toolchain is fully relocatable, so the tarball can be
extracted on the developpers machine where they see fit, although
having a common setup across the whole development team is a sign
that there is a process inplace, while leaving all the developpers
free to do as they want is a bit of an anarchy.

> Is it possible to break down the whole toolchain RPM into several RPMs,
> having one RPM for each component of the toolchain (e.g. gcc.rpm,
> binutils.rpm, glibc-devel.rpm, ...).

There is no provision for doing that right now, and I don't see it changing
in a near future, if at all. The toolchain is intended to be a single entity
that is not splitable.

What one might envision is the toolchain part ( kernel headers + binutils +
libc + gcc ) being bundled separately from the tools (gdb / dmalloc / ... ),
and the tools being clearly separated one from the others.

There is no reason to split the toolchain part into its different components
as it is really a single thing. For example, a desktop Linux distro will
split the libc runtime from the libc [headers + static libs] part because it
makes sense, but a cross toolchain (IMNSHO) does not follow this principles.

> FYI rpmbuild works from a SPEC file (not from already-made binary files) and
> then runs the full build using this file.

You could trick rpmbuild into considering the generated toolchain to be
source files, and provide a kind of 'build+install' procedure that just
copies the toolchain files so rpmbuild can create it.

Or you could provide a 'buid+install' procedure that uses crosstool-NG
sources as the source for building the toolchain, and have rpmbuild
bundle the resulting toolchain. Just a bit convoluted, but completed
justifiable in this case.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-25 21:58 ` Yann E. MORIN
@ 2010-03-25 22:52   ` Thomas Petazzoni
  2010-03-26  8:12   ` Oron Peled
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2010-03-25 22:52 UTC (permalink / raw)
  To: crossgcc

On Thu, 25 Mar 2010 22:57:31 +0100
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> wrote:

> You could trick rpmbuild into considering the generated toolchain to be
> source files, and provide a kind of 'build+install' procedure that just
> copies the toolchain files so rpmbuild can create it.

FWIW, this is the approach I used some time ago to create Debian
packages for cross-compiling toolchains. Not the cleanest thing, but it
does the work.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-25 21:58 ` Yann E. MORIN
  2010-03-25 22:52   ` Thomas Petazzoni
@ 2010-03-26  8:12   ` Oron Peled
  2010-03-26  9:05     ` Yann E. MORIN
                       ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Oron Peled @ 2010-03-26  8:12 UTC (permalink / raw)
  To: crossgcc; +Cc: Yann E. MORIN, Laurent Charpentier

On Thursday, 25 בMarch 2010 23:57:31 Yann E. MORIN wrote:
> On Wednesday 24 March 2010 15:42:54 Laurent Charpentier wrote:
> > To ease deployment of this toolchain I would like to create a RPM
> > containing the whole toolchain files/directories.
> > 
> > Question: How to create a RPM of the whole toolchain?

I have created RPMs for Fedora. You can find the .spec files on:
  http://fedorapeople.org/~oron/crosstool-ng/

  * The crosstool-ng.spec is used to package crosstool-ng itself.
  * The toolchain-powerpc-e500v2-linux-gnuspe.spec is than used
    to build+package a specific toolchain I needed. It BuildRequire
    the crosstool-ng package, so it has to be installed first.

I opened a review request to include crosstool-ng package in the
standard Fedora distribution, but no reviewer showed up yet ;-(
Any Fedorans here? Please review:
 https://bugzilla.redhat.com/show_bug.cgi?id=532163

I also built packages for Debian (which is what we actually use
as our standard development host). If there's any Debian developer on-board
I will be happy to send the packages (the debian/ directories) of
crosstool-ng and toolchain-powerpc-e500v2-linux-gnuspe.

Cheers,

-- 
Oron Peled                                 Voice: +972-4-8228492
oron@actcom.co.il                  http://users.actcom.co.il/~oron
"Beware of bugs in the above code;
 I have only proved it correct, not tried it."
                              -- Donald E. Knuth

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-26  8:12   ` Oron Peled
@ 2010-03-26  9:05     ` Yann E. MORIN
  2010-03-26 20:17       ` Oron Peled
  2010-03-26  9:06     ` Laurent Charpentier
  2010-03-26 15:24     ` Laurent Charpentier
  2 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2010-03-26  9:05 UTC (permalink / raw)
  To: crossgcc; +Cc: Oron Peled, Hector Oron

Oron, All,

On Friday 26 March 2010 091147 Oron Peled wrote:

> I also built packages for Debian (which is what we actually use
> as our standard development host). If there's any Debian developer on-board
> I will be happy to send the packages (the debian/ directories) of
> crosstool-ng and toolchain-powerpc-e500v2-linux-gnuspe.

Yes, please! I was supposed to package crosstool-NG for Debian, after
we discussed the matter with Hector Oron at FOSDEM.

Unfortunately, I've been pretty busy, and I never made a single package
for Debian (or any other distro for that matter), so I would gladly accept
your debian/ directory for crosstool-NG.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< O_o >==-- '------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
'------------------------------'-------'------------------'--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-26  8:12   ` Oron Peled
  2010-03-26  9:05     ` Yann E. MORIN
@ 2010-03-26  9:06     ` Laurent Charpentier
  2010-03-26 15:24     ` Laurent Charpentier
  2 siblings, 0 replies; 9+ messages in thread
From: Laurent Charpentier @ 2010-03-26  9:06 UTC (permalink / raw)
  To: Yann E. MORIN, Oron Peled; +Cc: crossgcc

Thanks Oron and Yann for your answer.

Oron you did a great job to split the target toolchain (powerpc) rpm into several RPMs. I will adapt it to my x86 gcc/glibc target.

About the crosstool-ng RPM file I also found this on the Internet: http://www.flyn.org/SRPMS/crosstool-ng.spec

Laurent

--- On Fri, 3/26/10, Oron Peled <oron@actcom.co.il> wrote:

> From: Oron Peled <oron@actcom.co.il>
> Subject: Re: [crosstool-ng] How to create a RPM of a toolchain
> To: crossgcc@sourceware.org
> Cc: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>, "Laurent Charpentier" <laurent_pubs@yahoo.com>
> Date: Friday, March 26, 2010, 1:11 AM
> On Thursday, 25 בMarch 2010 23:57:31
> Yann E. MORIN wrote:
> > On Wednesday 24 March 2010 15:42:54 Laurent
> Charpentier wrote:
> > > To ease deployment of this toolchain I would like
> to create a RPM
> > > containing the whole toolchain
> files/directories.
> > > 
> > > Question: How to create a RPM of the whole
> toolchain?
> 
> I have created RPMs for Fedora. You can find the .spec
> files on:
>   http://fedorapeople.org/~oron/crosstool-ng/
> 
>   * The crosstool-ng.spec is used to package
> crosstool-ng itself.
>   * The toolchain-powerpc-e500v2-linux-gnuspe.spec is
> than used
>     to build+package a specific toolchain I
> needed. It BuildRequire
>     the crosstool-ng package, so it has to be
> installed first.
> 
> I opened a review request to include crosstool-ng package
> in the
> standard Fedora distribution, but no reviewer showed up yet
> ;-(
> Any Fedorans here? Please review:
>  https://bugzilla.redhat.com/show_bug.cgi?id=532163
> 
> I also built packages for Debian (which is what we actually
> use
> as our standard development host). If there's any Debian
> developer on-board
> I will be happy to send the packages (the debian/
> directories) of
> crosstool-ng and toolchain-powerpc-e500v2-linux-gnuspe.
> 
> Cheers,
> 
> -- 
> Oron Peled             
>                
>    Voice: +972-4-8228492
> oron@actcom.co.il 
>                 http://users.actcom.co.il/~oron
> "Beware of bugs in the above code;
>  I have only proved it correct, not tried it."
>                
>               -- Donald
> E. Knuth
> 




--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-26  8:12   ` Oron Peled
  2010-03-26  9:05     ` Yann E. MORIN
  2010-03-26  9:06     ` Laurent Charpentier
@ 2010-03-26 15:24     ` Laurent Charpentier
  2 siblings, 0 replies; 9+ messages in thread
From: Laurent Charpentier @ 2010-03-26 15:24 UTC (permalink / raw)
  To: crossgcc

Hi Oron,

Just curious ...
as Yann mentioned ("The toolchain is intended to be a single entity
that is not splitable.") the toolchain build process is all done in one step.
The question is whether to split the RPM into several RPMs or not?
I guess there is no good and bad answer.
However splitting RPMs could be dangerous: your toolchain may break if you update one subcomponent and keep the older subcomponents (libraries interact with each other). What do you think? Do you usually update few components or all of them?

I will probably go with one RPM to be on the safer side.

Laurent



      

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-26  9:05     ` Yann E. MORIN
@ 2010-03-26 20:17       ` Oron Peled
  2010-04-18 17:28         ` Hector Oron
  0 siblings, 1 reply; 9+ messages in thread
From: Oron Peled @ 2010-03-26 20:17 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc, Hector Oron

On Friday, 26 בMarch 2010 12:05:33 Yann E. MORIN wrote:
> On Friday 26 March 2010 091147 Oron Peled wrote:
> > I will be happy to send the packages (the debian/ directories) of
> > crosstool-ng and toolchain-powerpc-e500v2-linux-gnuspe.
> 
> Yes, please! I was supposed to package crosstool-NG for Debian, after
> we discussed the matter with Hector Oron at FOSDEM.
Heh, someone stole my name ;-)

> Unfortunately, I've been pretty busy, and I never made a single package
> for Debian (or any other distro for that matter), so I would gladly accept
> your debian/ directory for crosstool-NG.

Sorry, it is at my $job (not accessible from home) and since weekend just 
started and we have the Passover holiday right after, it will take about
a week to get those bits... If I don't post them by next Sunday, ping me
again.

Bye,

-- 
Oron Peled                                 Voice: +972-4-8228492
oron@actcom.co.il                  http://users.actcom.co.il/~oron
"If you have an apple and I have an apple and we exchange apples then
you and I will still each have one apple.  But if you have an idea and I
have an idea and we exchange these ideas, then each of us will have two
ideas." -- George Bernard Shaw

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng] How to create a RPM of a toolchain
  2010-03-26 20:17       ` Oron Peled
@ 2010-04-18 17:28         ` Hector Oron
  0 siblings, 0 replies; 9+ messages in thread
From: Hector Oron @ 2010-04-18 17:28 UTC (permalink / raw)
  To: Oron Peled; +Cc: Yann E. MORIN, crossgcc

Hello,

2010/3/26 Oron Peled <oron@actcom.co.il>:
>> Yes, please! I was supposed to package crosstool-NG for Debian, after
>> we discussed the matter with Hector Oron at FOSDEM.
> Heh, someone stole my name ;-)

What a cool name! :-)

Cheers,
-- 
 Héctor Orón

"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

end of thread, other threads:[~2010-04-18 17:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 14:43 [crosstool-ng] How to create a RPM of a toolchain Laurent Charpentier
2010-03-25 21:58 ` Yann E. MORIN
2010-03-25 22:52   ` Thomas Petazzoni
2010-03-26  8:12   ` Oron Peled
2010-03-26  9:05     ` Yann E. MORIN
2010-03-26 20:17       ` Oron Peled
2010-04-18 17:28         ` Hector Oron
2010-03-26  9:06     ` Laurent Charpentier
2010-03-26 15:24     ` Laurent Charpentier

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