[uClibc] [buildroot] Patch file in root dir, failure to apply binutils patches

michael tesch tesch1 at gmail.com
Thu Sep 9 10:41:35 UTC 2004


Hi again,

So, it happened exactly the same to me, just 5 mins after I replied.
The real problem, only caused when you have a *.patch file in the
main build directory, is that the Makefiles don't escape the globbing
operator they're passing to patch-kernel.sh.  Attached is a patch to
fix that.

mt

On Thu, 9 Sep 2004 12:21:20 +0200, michael tesch <tesch1 at gmail.com> wrote:
> Hi,
> 
> Why should patches in the main directory be applied?
> Looking in the makefile make/binutils-uclibc.mk shows:
> 
> $(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
>         # Apply appropriate binutils patches.
>         $(SOURCE_DIR)/patch-kernel.sh $(BINUTILS_DIR) \
>                 $(SOURCE_DIR)/binutils/$(BINUTILS_VERSION) *.patch
>         touch $(BINUTILS_DIR)/.patched
> 
> the patch-kernel.sh utility only applies patches in the directory
> specified in its second argument, in this case
> "$(SOURCE_DIR)/binutils/$(BINUTILS_VERSION)" - so - try putting
> your patches in that directory.
> 
> best regards
> mt
> 
> 
> 
> 
> On Thu, 9 Sep 2004 11:27:00 +0200, Thomas Petazzoni
> <thomas.petazzoni at enix.org> wrote:
> > Hello,
> >
> > I just found a strange thing with buildroot compilation process. When
> > you have a .patch file in the main directory of buildroot and you start
> > the compilation process, buildroot doesn't patch binutils. The
> > compilation process goes on, but fails later on, because binutils hasn't
> > been patched and -uclibc arches don't exist.
> >
> > I reproduced the bug with current CVS with these few steps :
> >  1) Modify Makefile to compile for ARCH:=mips. I think the problem also
> > appears with other arches, but I didn't check.
> >  2) touch machin.patch
> >  3) make
> >  4) Select MIPS32, Big Endian, with MMU. I think the problem also
> > appears with other values, but I didn't check.
> >
> > After decompression of binutils, I have :
> >
> > ====================================================
> > # Apply appropriate binutils patches.
> > /home/u1/Thomas/test2-buildroot/buildroot/sources/patch-kernel.sh
> > /home/u1/Thomas/test2-buildroot/buildroot/toolchain_build_mips/binutils-2.15.90.0.3
> > /home/u1/Thomas/test2-buildroot/buildroot/sources/binutils/2.15.90.0.3
> > *.patch
> >
> > Applying
> > /home/u1/Thomas/test2-buildroot/buildroot/sources/binutils/2.15.90.0.3/machin.patch
> > using plaintext:
> > cat:
> > /home/u1/Thomas/test2-buildroot/buildroot/sources/binutils/2.15.90.0.3/machin.patch:
> > No such file or directory
> > touch
> > /home/u1/Thomas/test2-buildroot/buildroot/toolchain_build_mips/binutils-2.15.90.0.3/.patched
> > ====================================================
> >
> > Then, later on, the compilation process fails with the following message
> > :
> >
> > ====================================================
> > *** ld does not support target mips-unknown-linux-uclibc
> > *** see ld/configure.tgt for supported targets
> > make[1]: *** [configure-ld] Error 1
> > make[1]: Leaving directory
> > `/home/u1/Thomas/test2-buildroot/buildroot/toolchain_build_mips/binutils-2.15.90.0.3-build'
> > ====================================================
> >
> > I didn't looked inside the Makefile and scripts to see what is wrong.
> >
> > Another problem : if you try make clean, it fails :
> >
> > =====================================================
> > Thomas at patator:~/test2-buildroot/buildroot$ make clean
> > make
> > DESTDIR=/home/u1/Thomas/test2-buildroot/buildroot/build_mips/staging_dir
> > -C
> > /home/u1/Thomas/test2-buildroot/buildroot/toolchain_build_mips/sed-4.0.8
> > uninstall
> > make: ***
> > /home/u1/Thomas/test2-buildroot/buildroot/toolchain_build_mips/sed-4.0.8:
> > No such file or directory.  Stop.
> > make: *** [host-sed-clean] Error 2
> > =====================================================
> >
> > Feel free to ask for more details,
> >
> > Thomas
> > --
> > PETAZZONI Thomas - thomas.petazzoni at enix.org
> > http://thomas.enix.org - Jabber: kos_tom at sourcecode.de
> > KOS: http://kos.enix.org/ - Lolut: http://lolut.utbm.info
> > Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7
> >
> >
> > 
> > _______________________________________________
> > uClibc mailing list
> > uClibc at uclibc.org
> > http://uclibc.org/mailman/listinfo/uclibc
> >
> >
> >
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uclibc_buildroot-glob-escape.patch
Type: application/octet-stream
Size: 10355 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20040909/6d0e75ce/attachment.obj 


More information about the uClibc mailing list