Skip to content

multiple errors in gcc/config/rs6000/rs6000.c #3471

@llvmbot

Description

@llvmbot
Bugzilla Link 3099
Resolution WONTFIX
Resolved on Jan 07, 2011 12:53
Version 2.4
OS Linux
Blocks #1288
Attachments build script and full log
Reporter LLVM Bugzilla Contributor
CC @asl,@nlewycky

Extended Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillallvm-toolsAll llvm tools that do not have corresponding tagwontfixIssue is real, but we can't or won't fix it. Not invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions