This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ct-ng: patch howto?

Bill, All,

On Thursday 14 April 2011 18:15:16 Bill Pringlemeir wrote:
> I want to apply this patch.
> I saved the unified diff to 'patches/binutils/2.21/100-bug-47527.patch'.


> Then I re-ran my ct-ng build. However, when I look in
> 'targets/src/binutils-2.21/ld/ldlang.c', I don't see my changes.  My
> guess is that I need to modified some Makefile/script to apply the patch
> when binutils-2.21 is active.  I looked through the docs and most
> (all?) references to patch seem to refer to patching ct-ng and not the
> source tools set.  I would like to help the upstream people.

Crosstool-NG remembers what packages were extracted and patched, so it
won't try to do it again on a subsequent run. Indeed you do not want to
re-patch and already patched source tree, you'd hvae tons of conflicts,
as the patches were already applied.

In the case where you add a new patch, you have to remove the already
extracted source tree:
  rm -rf .build/src/binutils-2.21   (in your case)

and then tell crosstool-NG that binutils-2.21 has not yet been extracted
and patched:
  rm -f .build/src/.binutils-2.21{.extracted,patched}

and finally re-run crosstool-NG.

As a shortcut, if the patch you added if the first one for this conponent,
keep the extracted sources (they are pristine), and just remove the
.patched file above.

There is currently no way to do it automatically. Maybe (in the future),
crosstool-NG could remember what patches were applied, and then see if
there are new ones and apply them. But that's pretty useless in the
general case, and would make the code a bit more complex for little added
value, IMHO.

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  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

For unsubscribe information see

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]