[uClibc] PATCH: subst -g,,$(SAFEFLAGS)

Jaco Greeff uclibc at puxedo.org
Mon Sep 22 07:54:27 UTC 2003


Hi all,

I've picked up a problem with building 0.9.21 on my Mandrake Cooker box. 
  In the build process, it breaks with the following error:

<snip>
gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing 
-mpreferred-stack-boundary=2 -falign-jumps=0 -falign-loops=0 -Os 
-fno-builtin -nostdinc -D_LIBC -I../../../../include -I. 
-I/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/include -DNDEBUG -fPIC 
-DL_crt1 crt0.S -c -o crt1.o
strip -x -R .note -R .comment crt1.o
gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing 
-mpreferred-stack-boundary=2 -falign-jumps=0 -falign-loops=0 -Os 
-fno-builtin -nostdinc -D_LIBC -I../../../../include -I. 
-I/usr/lib/gcc-lib/i586-mandrake-linuxnu/3.3.1/include -DNDEBUG -fPIC -c 
../common/gmon-start.c -S -o gmon-start.S
In file included from ../common/gmon-start.c:21:
../../../../include/stdlib.h:35:20: stddef.h: No such file or directory
In file included from ../../../../include/sys/types.h:30,
                  from ../../../../include/stdlib.h:463,
                  from ../common/gmon-start.c:21:
../../../../include/bits/types.h:29:20: stddef.h: No such file or directory
<snip>

I've traced the problem to the following line (some differ a bit) in 
some of the Makefiles: (this from libc/sysdeps/linux/i386/Makefile)

SAFECFLAGS := $(subst -g,,$(CFLAGS))

This obviously changes occurences of "i586-mandrake-linux-gnu" to 
"i586-mandrake-linuxnu", which is not the expected behavior - as can be 
seen from the above breakage. The attached patch fixes this by 
introducing the following: (resulting in the correct behavior)

SAFECFLAGS := $(subst / -g/,,$(CFLAGS))

Greetings,
Jaco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc-0.9.21-subst-g.patch.bz2
Type: application/x-bzip2
Size: 762 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20030922/c38957de/attachment.bin 


More information about the uClibc mailing list