Skip to contentSkip to conversation

Linux 2.6.32.xx build breaks with gcc 4.7

DISCUSSION Gabor Z. Papp 2 participants 2 messages Oct 16, 2012 11 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): x6lifb3o0t@gzp

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): x6vcecp44c@gzp

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): x6a9voowqv@gzp

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): x61uh0oun5@gzp

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): x6y5j7392k@gzp

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

lo lo,

I'm trying to compile 2.6.32.60 with gcc 4.7.2, and getting the following error:

CC arch/x86/kernel/ptrace.o
arch/x86/kernel/ptrace.c:1472:17: error: conflicting types for 'syscall_trace_enter' In file included from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/vm86.h:130:0,

                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/processor.h:10,
                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/thread_info.h:22,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/x86/kernel/ptrace.c:11:
/usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/ptrace.h:145:13: note: previous declaration of 'syscall_trace_enter' was here
arch/x86/kernel/ptrace.c:1517:17: error: conflicting types for 'syscall_trace_leave'
In file included from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/vm86.h:130:0,
                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/processor.h:10,
                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/thread_info.h:22,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/x86/kernel/ptrace.c:11:

/usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/ptrace.h:146:13: note: previous declaration of 'syscall_trace_leave' was here make[2]: *** [arch/x86/kernel/ptrace.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2

My environment looks like:

Linux 3.2.30, glibc 2.16, gcc 4.7.2

If I comment out the ancient line, kernel compiles fine.

Willy says:

| The affected entry is only used there :

| arch/x86/include/asm/ptrace.h:extern void syscall_trace_leave(struct pt_regs *);
| arch/x86/include/asm/thread_info.h:/* work to do in syscall_trace_leave() */
| arch/x86/kernel/entry_32.S:     ENABLE_INTERRUPTS(CLBR_ANY)     # could let syscall_trace_leave() call
| arch/x86/kernel/entry_32.S:     call syscall_trace_leave
| arch/x86/kernel/entry_64.S:     call syscall_trace_leave
| arch/x86/kernel/ptrace.c:asmregparm void syscall_trace_leave(struct pt_regs *regs)

| So if the two calls above don't need the include then maybe we can | safely remove it.

#12 lore raw
Quoted 53 lines · Gabor Z. Papp

lo lo,

I'm trying to compile 2.6.32.60 with gcc 4.7.2, and getting the following error:

CC arch/x86/kernel/ptrace.o
arch/x86/kernel/ptrace.c:1472:17: error: conflicting types for 'syscall_trace_enter' In file included from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/vm86.h:130:0,

                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/processor.h:10,
                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/thread_info.h:22,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/x86/kernel/ptrace.c:11:
/usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/ptrace.h:145:13: note: previous declaration of 'syscall_trace_enter' was here
arch/x86/kernel/ptrace.c:1517:17: error: conflicting types for 'syscall_trace_leave'
In file included from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/vm86.h:130:0,
                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/processor.h:10,
                 from /usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/thread_info.h:22,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/x86/kernel/ptrace.c:11:

/usr/src/linux-2.6.32.60-gzpLinux/arch/x86/include/asm/ptrace.h:146:13: note: previous declaration of 'syscall_trace_leave' was here make[2]: *** [arch/x86/kernel/ptrace.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2

My environment looks like:

Linux 3.2.30, glibc 2.16, gcc 4.7.2

If I comment out the ancient line, kernel compiles fine.

Willy says:

| The affected entry is only used there :

| arch/x86/include/asm/ptrace.h:extern void syscall_trace_leave(struct pt_regs *);
| arch/x86/include/asm/thread_info.h:/* work to do in syscall_trace_leave() */
| arch/x86/kernel/entry_32.S:     ENABLE_INTERRUPTS(CLBR_ANY)     # could let syscall_trace_leave() call
| arch/x86/kernel/entry_32.S:     call syscall_trace_leave
| arch/x86/kernel/entry_64.S:     call syscall_trace_leave
| arch/x86/kernel/ptrace.c:asmregparm void syscall_trace_leave(struct pt_regs *regs)
Quoted 2 lines

| So if the two calls above don't need the include then maybe we can | safely remove it.

If someone knows this area well enough to judge whether we can
- either remove the asmregparm (I don't think so judging by recent commits saying it was possible to remove it after other main changes)
- or remove the declaration because noone else needs it,

Then I'd happily apply the fix. From what I understood, Paul would probably need the same fix for 2.6.34.

Thanks,
Willy