<div>thanks for the reply :).</div>
<div>when i checked the linux src for mips in asm-mips folder PAGE_SIZE was defined only in kernel context.</div>
<div>if __KERNEL__ was defined only then was PAGE_SIZE defined. on the other hand PAGE_SIZE is defined for non kernel context in i386 and arm asm folders. i was able to fix the problem by defining PAGE_SIZE in asm-mips/page.h. that compiled the uClibc-0.9.26, then i compiled full build of gcc-3.3.3 and also was able to run test programs on the ubnt litestation2 mips-4kc board.</div>

<div>&nbsp;isnt there a patch available for doing this the right way? i understand that making changes in the kernel code is not a good idea. is there a fix available for this problem?<br>i would like to post my findings about the toolchain build procedure but not before getting the right solution for this problem.</div>

<div>&nbsp;</div>
<div>regards</div>
<div>abhijit</div>
<div>&nbsp;</div>
<div class="gmail_quote">On Fri, Apr 4, 2008 at 12:37 AM, Filippo ARCIDIACONO &lt;<a href="mailto:filippo.arcidiacono@st.com">filippo.arcidiacono@st.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I suggest you to upgrade the uClibc to the 0.9.29 version.<br>
<div>
<div></div>
<div class="Wj3C7c"><br>&gt; -----Original Message-----<br>&gt; From: <a href="mailto:uclibc-bounces@uclibc.org">uclibc-bounces@uclibc.org</a><br>&gt; [mailto:<a href="mailto:uclibc-bounces@uclibc.org">uclibc-bounces@uclibc.org</a>] On Behalf Of abhijit ayarekar<br>
&gt; Sent: Thursday, April 03, 2008 10:12 PM<br>&gt; To: <a href="mailto:uclibc@uclibc.org">uclibc@uclibc.org</a><br>&gt; Subject: Problems in compiling for mips<br>&gt;<br>&gt; I am trying to compile uclibc-0.9.26 with binutils-2.15,<br>
&gt; gcc-3.3.3, kernel headers version 2.4.27<br>&gt;<br>&gt; when i run make i get the following error<br>&gt;<br>&gt; [root@shastabuild uClibc-0.9.26]# make CROSS=mips-linux-<br>&gt; + ./extra/scripts/fix_includes.sh -k<br>
&gt; + /mnt/hdb/mips-toolchain/kernel/linux-kernel-2.4 -t mips<br>&gt; Current kernel version is 2.4.27-ubnt0<br>&gt;<br>&gt; Using kernel headers from 2.4.27-ubnt0 for architecture &#39;mips&#39;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; provided in directory<br>
&gt; /mnt/hdb/mips-toolchain/kernel/linux-kernel-2.4<br>&gt;<br>&gt; + TOPDIR=.<br>&gt; + CC=mips-linux-gcc<br>&gt; + /bin/sh extra/scripts/gen_bits_syscall_h.sh<br>&gt; + cmp include/bits/sysnum.h include/bits/sysnum.h.new mv -f<br>
&gt; + include/bits/sysnum.h.new include/bits/sysnum.h<br>&gt; make -C libc/sysdeps/linux/common headers<br>&gt; make[1]: Entering directory<br>&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/libc/sysdeps/li<br>nux/common&#39;<br>
&gt; ln -fs ../libc/sysdeps/linux/common/fpu_control.h<br>&gt; ../../../..//include/<br>&gt; make[1]: Leaving directory<br>&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/libc/sysdeps/li<br>nux/common&#39;<br>&gt; make -C libc/sysdeps/linux/mips headers<br>
&gt; make[1]: Entering directory<br>&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/libc/sysdeps/li<br>nux/mips&#39;<br>&gt; ln -fs ../libc/sysdeps/linux/mips/sgidefs.h<br>&gt; ../../../..//include/ ln -fs<br>&gt; ../libc/sysdeps/linux/mips/fpu_control.h ../../../..//include/<br>
&gt; make[1]: Leaving directory<br>&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/libc/sysdeps/li<br>nux/mips&#39;<br>&gt; make -C &nbsp;ldso<br>&gt; make[1]: Entering directory<br>&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/ldso&#39;<br>
&gt; ln -fs ../../include/elf.h include/<br>&gt; ln -fs ../ldso/mips/boot1_arch.h include/ ln -fs<br>&gt; ../ldso/mips/ld_syscalls.h include/ ln -fs<br>&gt; ../ldso/mips/ld_sysdep.h include/ make -C ldso;<br>&gt; make[2]: Entering directory<br>
&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/ldso/ldso&#39;<br>&gt; mips-linux-gcc &nbsp;-Wall -Wstrict-prototypes -Wno-trigraphs<br>&gt; -fno-strict-aliasing &nbsp;-Os &nbsp;-mno-split-addresses &nbsp;-mips32<br>&gt; -mtune=mips32 -fPIC<br>
&gt; -DUCLIBC_RUNTIME_PREFIX=\&quot;/mnt/hdb/mips-toolchain/mips-linux/\<br>&quot; -fno-builtin -nostdinc -I../../ldso/include -I. -&gt; I../../include<br>&gt; -I/mnt/hdb/mips-toolchain/lib/gcc-lib/mips-linux/3.3.3/include<br>
&gt; &nbsp;-I../libdl -c ldso.c -o ldso.o In file included from<br>&gt; _dl_progname.h:2,<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from ldso.c:156:<br>&gt; mips/elfinterp.c: In function `_dl_parse_relocation_information&#39;:<br>&gt; mips/elfinterp.c:177: warning: unused variable `old_val&#39;<br>
&gt; ldso.c: In function `_dl_boot2&#39;:<br>&gt; ldso.c:362: error: `PAGE_SIZE&#39; undeclared (first use in this function)<br>&gt; ldso.c:362: error: (Each undeclared identifier is reported only once<br>&gt; ldso.c:362: error: for each function it appears in.)<br>
&gt; ldso.c:454:2: warning: #warning &quot;Debugging threads on mips<br>&gt; won&#39;t work till someone fixes this...&quot;<br>&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated In file<br>
&gt; included from ldso.c:1343:<br>&gt; readelflib1.c: In function `_dl_load_elf_shared_library&#39;:<br>&gt; readelflib1.c:452: error: `PAGE_SIZE&#39; undeclared (first use<br>&gt; in this function) In file included from ldso.c:1343:<br>
&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated<br>&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated<br>
&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated<br>&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated<br>
&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated<br>&gt; readelflib1.c: In function `_dl_dprintf&#39;:<br>&gt; readelflib1.c:787: error: `PAGE_SIZE&#39; undeclared (first use<br>
&gt; in this function) In file included from ldso.c:1343:<br>&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated In file<br>&gt; included from ldso.c:1343:<br>
&gt; readelflib1.c: In function `_dl_malloc&#39;:<br>&gt; readelflib1.c:886: error: `PAGE_SIZE&#39; undeclared (first use<br>&gt; in this function) In file included from ldso.c:1343:<br>&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>
&gt; input without lvalue in asm operand 7 is deprecated<br>&gt; ../../ldso/include/ld_syscall.h: In function `_dl_mmap&#39;:<br>&gt; ../../ldso/include/ld_syscall.h:56: warning: use of memory<br>&gt; input without lvalue in asm operand 7 is deprecated<br>
&gt; make[2]: *** [ldso.o] Error 1<br>&gt; make[2]: Leaving directory<br>&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/ldso/ldso&#39;<br>&gt; make[1]: *** [all] Error 2<br>&gt; make[1]: Leaving directory<br>&gt; `/mnt/hdb/mips-toolchain/sources/uClibc-0.9.26/ldso&#39;<br>
&gt; make: *** [_dir_ldso] Error 2<br>&gt;<br>&gt; can anyone please help me solve this problem?<br>&gt;<br>&gt; regards<br>&gt; abhijit<br>&gt;<br>&gt;<br><br></div></div></blockquote></div><br>