This is the mail archive of the crossgcc@sourceware.org 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] |
Heiko, All, On Sunday 19 December 2010 17:01:56 Heiko Zuerker wrote: > Quoting "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>: > > On Saturday 18 December 2010 22:31:28 Heiko Zuerker wrote: > >> I looked over the code and also couldn't find how or where the > >> CT_PATCH_LOCAL_FALLBACK_BUNDLED is handled (I could simply be blind > >> too). > > > > Does the attached fixes it for you? > > This one unfortunately does not work, since it would always try to > apply both patches. It should not, as the two 'fallback' choices also select PATCH_SINGLE, and scripts/functions@795 breaks the loop after the first directory found, if PATCH_SINGLE is set. I've just tried it here (with my previous patch applied), and it works as expected. I've made a directory as such: mkdir ${HOME}/tmp/foo.patches cp -a patches/gcc ${HOME}/tmp/foo.patches/gcc and configured crosstool-NG with: grep PATCH .config # CT_PATCH_BUNDLED is not set # CT_PATCH_LOCAL is not set # CT_PATCH_BUNDLED_LOCAL is not set # CT_PATCH_LOCAL_BUNDLED is not set # CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set CT_PATCH_LOCAL_FALLBACK_BUNDLED=y # CT_PATCH_NONE is not set CT_PATCH_ORDER="local,bundled" CT_PATCH_SINGLE=y CT_PATCH_USE_LOCAL=y CT_LOCAL_PATCH_DIR="${HOME}/tmp/foo.patches" Crostool-NG then properly uses built-in patches for all components, except for gcc, for which it uses patches from ${HOME}/tmp/foo.patches, and only that. If it had tried to also apply bundled patches, patch would have complained about 'already applied or reversed' patch. Snippet of the log file: [--SNIP--] [EXTRA] Patching 'mpfr-2.4.2' [DEBUG] Looking for patches in '/home/ymorin/tmp/foo.patches/mpfr/2.4.2'... [DEBUG] Looking for patches in '/home/ymorin/dev/crosstool-NG/ct-ng.current/patches/mpfr/2.4.2'... [DEBUG] Applying patch '/home/ymorin/dev/crosstool-NG/ct-ng.current/patches/mpfr/2.4.2/100-sin_cos_underfl [DEBUG] ==> Executing: 'patch --no-backup-if-mismatch -g0 -F1 -p1 -f' [ALL ] patching file PATCHES [ALL ] patching file VERSION [--SNIP--] [EXTRA] Patching 'gcc-4.4.3' [DEBUG] Looking for patches in '/home/ymorin/tmp/foo.patches/gcc/4.4.3'... [DEBUG] Applying patch '/home/ymorin/tmp/foo.patches/gcc/4.4.3/100-alpha-mieee-default.patch' [DEBUG] ==> Executing: 'patch --no-backup-if-mismatch -g0 -F1 -p1 -f' [ALL ] patching file gcc/config/alpha/alpha.h [ALL ] patching file gcc/config/alpha/alpha.opt [--SNIP--] [DEBUG] Applying patch '/home/ymorin/tmp/foo.patches/gcc/4.4.3/400-pr42289-fix-libffi-build-on-arm-oabi.pa [DEBUG] ==> Executing: 'patch --no-backup-if-mismatch -g0 -F1 -p1 -f' [ALL ] patching file libffi/src/arm/sysv.S [ALL ] Hunk #1 succeeded at 242 (offset 7 lines). [ALL ] Overiding config.guess and config.sub [--SNIP--] As you can see, for MPFR, it first test for a local patchset, which it does not find, so reverts back to looking for a bundled patchset, which it does find, and applies patches from there. While for gcc, it does find a local patchset, applies patches from there, and does not even look if a bundled patchset exists (hint: config.guess and .sub are after applying patches). This is what PATCH_SINGLE is intended for. > I attached a patch which works. Did you even test my patch? It Works For Me (TM). ;-) > The patch could be made much smaller, but I decided to rather make > sure others can read it. That patch should not be needed, as the existing code does exactly what is expected. Besides, the patch has a few shortcomings: - it tests for directory existence using -e when it should use -d, which means it would believe a patch dir exists, when it is in fact a file (or a fifo, or whatever); - it uses tabs instead of spaces (benign). Regards, 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 | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- 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] |