Re: Any way to apply patch on some archs only?
Hi,
On Thu, 29 Jan 2015, olivier sallou wrote:
> I d like to know if it is posdible to apply a patch on some archs only.
> I have some FTBS on some archs for a package. I have a patch but I d like
> to apply it only on failings archs and keep original upstream code for
> others.
>
> Patches can indeed fix an issue but be less performant/optimal...
>
> I could not find a way to do so, but i am sure some others already faced
> the case before me and can drive me to the doc i did not find :-)
Best practices are to have a patch that can be used on all architectures
so that it can be submitted upstream. When you need architecture specific
behaviour, then you need code that will test some architecture-specific
variable/macros.
In C you would usually use the preprocessor's #ifdef directives. If you
need more guidance, then you need to provide more details.
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/
Reply to: