how to implement conditional patches?

View: New views
3 Messages — Rating Filter:   Alert me  

how to implement conditional patches?

by Robert P. J. Day :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


  perhaps i missed it but it doesn't look like there's a mechanism in
crosstool to implement conditional patches.  i'm thinking specifically
of applying an NPTL-related patch to glibc *only* if one selects that
they want to build with NPTL instead of linuxthreads.

  the patch is glibc-5070_all_cross-compile-nptl.patch, which can be
found here:

http://dev.gentoo.org/~halcy0n/glibc/patches/5070_all_cross-compile-nptl.patch

as i read it, you should apply this patch *only* if you're building
with NPTL, so you can't just toss it into the glibc patches directory
where it will be applied every time.

  my thought is to introduce a patch subdirectory for these kinds of
conditional patches:

        glibc-x.y.z/
                ... regular patches ...
                nptl/
                        glibc-5070_all_cross-compile-nptl.patch

and so on.

  you can call the subdirectory whatever you want, since it will be
the job of the crosstool utility to handle checking the build specs
and figuring out what patches to apply.

  thoughts?

rday

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@...


Re: how to implement conditional patches?

by Mike Frysinger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Dec 05, 2005 at 06:57:40AM -0500, Robert P. J. Day wrote:
> http://dev.gentoo.org/~halcy0n/glibc/patches/5070_all_cross-compile-nptl.patch
>
> as i read it, you should apply this patch *only* if you're building
> with NPTL, so you can't just toss it into the glibc patches directory
> where it will be applied every time.

no, the patch is safe to apply all the time
-mike

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@...


Re: how to implement conditional patches?

by Robert P. J. Day :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 5 Dec 2005, Mike Frysinger wrote:

> On Mon, Dec 05, 2005 at 06:57:40AM -0500, Robert P. J. Day wrote:
> > http://dev.gentoo.org/~halcy0n/glibc/patches/5070_all_cross-compile-nptl.patch
> >
> > as i read it, you should apply this patch *only* if you're
> > building with NPTL, so you can't just toss it into the glibc
> > patches directory where it will be applied every time.
>
> no, the patch is safe to apply all the time

oh, i wasn't aware of that.  so it's fine regardless of whether you're
enabling the linuxthreads or NPTL add-on?  cool.  that makes life
simpler.

rday

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@...