[uClibc][patch] GNU Make $PWD vs. pwd (mipsel)

Geoffrey Espin espin at idiom.com
Mon Apr 22 19:09:03 UTC 2002


I see there is a CVS repository for minimal generic buildroot...
but I guess all the real action is at under tuxscreen.  Anyways,
when using tuxscreen's build-root for mipsel, I get:

mkdir -p /home/espin/www/tuxscreen/buildroot-tux/build/stage/include/
ln -s /home/espin/www/tuxscreen/buildroot-tux/build/linux/include/linux /home/espin/www/tuxscreen/buildroot-tux/build/stage/include/
ln -s /home/espin/www/tuxscreen/buildroot-tux/build/linux/include/asm /home/espin/www/tuxscreen/buildroot-tux/build/stage/include/
touch /home/espin/www/tuxscreen/buildroot-tux/build/stage/include/.linuxlink
make -C /home/espin/www/tuxscreen/buildroot-tux/build/uClibc
make[1]: Entering directory `/home/espin/www/tuxscreen/buildroot-tux/build/uClibc'
rm -f include/asm;
/bin/sh: cd: /home/espin/www/tuxscreen/buildroot-tux/libc/sysdeps/linux: No such file or directory
/bin/sh: cd: /home/espin/www/tuxscreen/buildroot-tux/ldso/ldso: No such file or
directory
/bin/sh: cd: /home/espin/www/tuxscreen/buildroot-tux/libpthread/linuxthreads/sysdeps: No such file or directory
rm -f include/linux
ln -fs /home/espin/www/tuxscreen/buildroot-tux/build/linux/include/linux include/linux
rm -rf include/bits
mkdir -p include/bits
+ rm -f include/bits/syscall.h
+ TOPDIR=./
+ CC=mipsel-linux-gcc 
+ /bin/sh .//extra/scripts/gen_bits_syscall_h.sh
make -C libc/sysdeps/linux/mipsel headers
make: Entering an unknown directory
make: *** libc/sysdeps/linux/mipsel: No such file or directory.  Stop.
make: Leaving an unknown directory
make[1]: *** [headers] Error 2
make[1]: Leaving directory `/home/espin/www/tuxscreen/buildroot-tux/build/uClibc'
make: *** [/home/espin/www/tuxscreen/buildroot-tux/build/uClibc/lib/libc.a] Error 2


The problem stems from GNU Make not having $PWD in sync with the
real `pwd`, so that "$(MAKE) -C $(UCLIBC_DIR)" in make/linux.mk
doesn't set $PWD properly.  This fix, to the top-level
uClibc/Makefile, works around this.  It is only a "mipsel" problem,
as mipsel is the only arch with a directory fixup using $PWD.

Next problem: fixing "--shared_support=false" to mean, don't bother
with building "ldso" at all on arches that don't have it, yet. :-)

Geoff
-- 
Geoffrey Espin
espin at idiom.com
--

--- Makefile.ORIG	Wed Apr 10 21:26:32 2002
+++ Makefile	Mon Apr 22 11:27:07 2002
@@ -83,11 +83,11 @@
 	    ln -fs $(KERNEL_SOURCE)/include/asm-mips include/asm; \
 	elif [ $(TARGET_ARCH) = "mipsel" ];then \
 	    ln -fs $(KERNEL_SOURCE)/include/asm-mips include/asm; \
-	    cd $(PWD)/libc/sysdeps/linux; \
+	    cd `pwd`/libc/sysdeps/linux; \
 	    ln -fs mips mipsel; \
-	    cd $(PWD)/ldso/ldso; \
+	    cd `pwd`/ldso/ldso; \
 	    ln -fs mips mipsel; \
-	    cd $(PWD)/libpthread/linuxthreads/sysdeps; \
+	    cd `pwd`/libpthread/linuxthreads/sysdeps; \
 	    ln -fs mips mipsel; \
 	elif [ $(TARGET_ARCH) = "h8300" ];then \
 	    ln -fs $(KERNEL_SOURCE)/include/asm-h8300 include/asm; \



More information about the uClibc mailing list