SPARC64 2.6.23-rc8 binfmt_aout32 error
When I'm building 2.6.23-rc8 on SPARC64 (using a 64-bit CLFS SVN tool chain consisting of GCC 4.2.1, Binutils 2.18 and Glibc 2.6.1) I get the following error:
Quoted 13 lines
CC
arch/sparc64/kernel/binfmt_aout32.o
cc1: warnings being treated as errorsarch/sparc64/kernel/binfmt_aout32.c: In function 'create_aout32_tables':arch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different size
Quoted 8 lines
arch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different size
make[1]: *** [arch/sparc64/kernel/binfmt_aout32.o] Error 1
make: *** [arch/sparc64/kernel] Error 2
I don't know what the solution is (I don't know much about kernel internals yet) but I hope this is enough to solve this particular error. Otherwise I could also send my kernel config.
Sunil
From: Sunil Amitkumar Janki <[email protected]>
Date: Mon, 01 Oct 2007 01:44:42 +0200
Quoted 22 lines
Quoted 13 lines
CC
arch/sparc64/kernel/binfmt_aout32.o
cc1: warnings being treated as errorsarch/sparc64/kernel/binfmt_aout32.c: In function 'create_aout32_tables':arch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different sizeQuoted 8 lines
arch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different sizearch/sparc64/kernel/binfmt_aout32.c:189: warning: cast from pointer to integer of different size
make[1]: *** [arch/sparc64/kernel/binfmt_aout32.o] Error 1
make: *** [arch/sparc64/kernel] Error 2
Quoted 3 lines
I don't know what the solution is (I don't know much about kernel internals yet) but I hope this is enough to solve this particular error. Otherwise I could also send my kernel config.
Turn off BINFMT_AOUT32 is a quick way to get a successful build, I wonder if considered that :-)
I've never seen this build failure before, but will try to reproduce with some gcc-4.2 compiler setups I have here.
From: Sunil Amitkumar Janki <[email protected]>
Date: Mon, 01 Oct 2007 01:44:42 +0200
Quoted 9 lines
When I'm building 2.6.23-rc8 on SPARC64 (using a 64-bit CLFS SVN tool chain consisting of GCC 4.2.1, Binutils 2.18 and Glibc 2.6.1) I get the following error:
Quoted 5 lines
CC
arch/sparc64/kernel/binfmt_aout32.o
cc1: warnings being treated as errorsarch/sparc64/kernel/binfmt_aout32.c: In function 'create_aout32_tables':arch/sparc64/kernel/binfmt_aout32.c:180: warning: cast from pointer to integer of different size
This patch below will likely fix the build failure.
But note that gcc-4.2.x is very widely known to miscompile the sparc64 kernel, particularly on SMP, so even if you get a build the kernel you end up will be mostly unusable.
I would really recommend you stay with gcc-4.1.x unless you are going to work on fixing those gcc-4.2.x miscompilations, and I'm already on the hook for that :-)
arch/sparc64/kernel/binfmt_aout32.c +2 -2
@@ -177,7 +177,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bprget_user (c,p++); }while (c); } -put_user (NULL ,argv); +put_user (0 ,argv); current->mm->arg_end = current->mm->env_start = (unsigned long ) p;while (envc-->0 ) {char c;
@@ -186,7 +186,7 @@ static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bprget_user (c,p++); }while (c); } -put_user (NULL ,envp); +put_user (0 ,envp); current->mm->env_end = (unsigned long ) p;return sp; }
Quoted 6 lines · David Miller
Turn off
BINFMT_AOUT32is a quick way to get a successful build, I wonder if considered that :-)I've never seen this build failure before, but will try to reproduce with some gcc-4.2 compiler setups I have here.
I haven't got much more than a tool chain yet so then I would have to build a GCC 4.1.2 compiler. Now with your information I should and probably will do so.
I already tried to disable all other executable formats but that didn't help much either. Thanks for the patch, I will try building with it and report my findings.
Sunil