how to implement conditional patches?

Robert P. J. Day rpjday@mindspring.com
Mon Dec 5 12:02:00 GMT 2005


  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@sources.redhat.com



More information about the crossgcc mailing list