[LLVMbugs] [Bug 3099] New: multiple errors in gcc/config/rs6000/rs6000.c

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Nov 19 03:57:29 PST 2008


http://llvm.org/bugs/show_bug.cgi?id=3099

           Summary: multiple errors in gcc/config/rs6000/rs6000.c
           Product: tools
           Version: 2.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: go0 at go.ru
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2227)
 --> (http://llvm.org/bugs/attachment.cgi?id=2227)
build script and full log

I'm trying to cross-compile llvm-gcc for powerpc target on amd64/linux

The compilation stopped when compiling gcc/config/rs6000/rs6000.c

================== log fragment start ==========================
c++ -c -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
-pedantic -Wno-long-long -Wno-variadic-macros -Wmissing-format-attribute
-DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"ppc-linux-gnu\" -DNDEBUG -I. -I.
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/.
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../include
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../libcpp/include

-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../libdecnumber
-I../libdecnumber -I/usr/include -DENABLE_LLVM -DNDEBUG -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS   -I. -I.
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/.
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../include
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../libcpp/include

-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../libdecnumber
-I../libdecnumber -I/usr/include
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/llvm-debug.cpp
-o llvm-debug.o
gcc -c   -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H -I. -I.
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/.
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../include
-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../libcpp/include

-I/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/../libdecnumber
-I../libdecnumber -I/usr/include -DENABLE_LLVM -DNDEBUG -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS   \
               
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c
-o rs6000.o
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:
In function 'rs6000_override_options':
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:1565:
error: 'MASK_MACHO_DYNAMIC_NO_PIC' undeclared (first use in this function)
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:1565:
error: (Each undeclared identifier is reported only once
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:1565:
error: for each function it appears in.)
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:
In function 'rs6000_emit_prologue':
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:16873:
warning: implicit declaration of function 'VECTOR_SAVE_INLINE'
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:16874:
error: 'lr_already_set_up_for_pic' undeclared (first use in this function)
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:
In function 'rs6000_output_mi_thunk':
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:18333:
warning: implicit declaration of function 'add_compiler_branch_island'
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:18333:
warning: assignment makes pointer from integer without a cast
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:20026:8:
warning: extra tokens at end of #endif directive
In file included from
/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/llvm-gcc4.2-2.4.source/gcc/config/rs6000/rs6000.c:22322:
./gt-rs6000.h: At top level:
./gt-rs6000.h:138: error: 'branch_island_list' undeclared here (not in a
function)
make[2]: *** [rs6000.o] Error 1
make[2]: Leaving directory
`/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory
`/tmp/portage/cross-ppc-linux-gnu/gcc-4.2.4-r2/work/build'
================== log fragment  end  ==========================

IMHO
1) MASK_MACHO_DYNAMIC_NO_PIC is not defined anywhere, though used twice. I
looked for it in the complete patch/build tree and in /usr/include

2) "#endif llvm" is present only in this file and breaks C rules and apple/llvm
coding style

3) Other errors are present

i enclose ebuild script and full log file

my aim is not to find lots of errors in llvm source code but to compile
PowerPC-capable llvm-gcc decompiler on my computer


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list