This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/65264] New: compare debug failure when using stdin


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65264

            Bug ID: 65264
           Summary: compare debug failure when using stdin
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org

Building a Linux kernel on ppc64 with GCC_COMPARE_DEBUG=1 fails:
...
  LD      init/built-in.o
arch/powerpc/platforms/built-in.o(.toc+0x5e8): error: undefined reference to
'opal_tracepoint_refcount'
arch/powerpc/platforms/built-in.o(.toc+0x648): error: undefined reference to
'hcall_tracepoint_refcount'
arch/powerpc/platforms/built-in.o(__jump_table+0x10): error: undefined
reference to 'opal_tracepoint_key'
arch/powerpc/platforms/built-in.o(__jump_table+0x28): error: undefined
reference to 'opal_tracepoint_key'
arch/powerpc/platforms/built-in.o(__jump_table+0x40): error: undefined
reference to 'opal_tracepoint_key'
arch/powerpc/platforms/built-in.o(__jump_table+0x58): error: undefined
reference to 'opal_tracepoint_key'
arch/powerpc/platforms/built-in.o(__jump_table+0x8b0): error: undefined
reference to 'hcall_tracepoint_key'
arch/powerpc/platforms/built-in.o(__jump_table+0x8c8): error: undefined
reference to 'hcall_tracepoint_key'
arch/powerpc/platforms/built-in.o(__jump_table+0x8e0): error: undefined
reference to 'hcall_tracepoint_key'
Makefile:914: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

This happens because the kernel Makefile contains:
 779 # check for 'asm goto'                                                     
 780 ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)    
 781         KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO                                
 782 endif 

markus@x4 linux % cat scripts/gcc-goto.sh
#!/bin/sh
# Test for gcc 'asm goto' support
# Copyright (C) 2010, Jason Baron <jbaron@redhat.com>

cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
int main(void)
{
#if defined(__arm__) || defined(__aarch64__)
        /*
         * Not related to asm goto, but used by jump label
         * and broken on some ARM GCC versions (see GCC Bug 48637).
         */
        static struct { int dummy; int state; } tp;
        asm (".long %c0" :: "i" (&tp.state));
#endif

entry:
        asm goto ("" :::: entry);
        return 0;
}
END

This test always fails with GCC_COMPARE_DEBUG=1.

markus@x4 linux % echo "int main () {}" | gcc -x c - -c -o /dev/null
markus@x4 linux % echo "int main () {}" | GCC_COMPARE_DEBUG=1 gcc -x c - -c -o
/dev/null
gcc: error: -: -fcompare-debug failure (length)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]