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

See crosstool-NG 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]

Supporting git patches?


Hi,

I'm trying to build D ( dlang.org ) cross compilers with crosstool-NG. There's a GCC D compiler, gdc ( gdcproject.org), but it's not yet included in the gcc sources. As crosstool already allows building custom languages I only need to patch the gcc sources in some way.

The gdc sources are currently distributed with a script which patches a gcc tree, but calling that script would require hacking crosstool-NG and this should work out of the box. So I thought I'd just create a diff between the unpatched GCC and the patched sources and let crosstool-NG apply this as a local patch.

It almost worked. But gdc creates new, executable files and diff/patch don't save/restore the executable bit.
So for now I just created a gcc-4.7.1.tar.bz2 archive with the patched sources and set the source tarball directory so crosstool-NG can find this file and it's working great, but a 83MB archive is a little annoying to distribute.


So I'm wondering if support for git patches could be added to crosstool-NG? Git patches have some advanced features, one of them is saving/restoring permissions. I think supporting that shouldn't be too difficult, just apply all *.gpatch files with 'git apply' and it should work, so it's probably a 2-3 line change, but my bash skills are too weak to implement this by myself :-)

(Of course I'm also happy with any other patch solution which restores the executable bit, but I only know of git diff / git apply)

--
Johannes Pfau


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


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