[regression] the linaro 4.5-2011-04-0 release fails to build on powerpc

Bug #768921 reported by Matthias Klose
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Medium
Andrew Stubbs
gcc-4.5 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: gcc-4.5

gcc -c -g -fno-stack-protector -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd -I../libdecnumber -DCLOOG_PPL_BACKEND -I/usr/include/libelf ../../src/gcc/c-convert.c -o c-convert.o
../../src/gcc/c-convert.c: In function 'convert':
../../src/gcc/c-convert.c:84:7: warning: format not a string literal and no format arguments
gcc -c -g -fno-stack-protector -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd -I../libdecnumber -DCLOOG_PPL_BACKEND -I/usr/include/libelf ../../src/gcc/c-aux-info.c -o c-aux-info.o
gcc -c -g -fno-stack-protector -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd -I../libdecnumber -DCLOOG_PPL_BACKEND -I/usr/include/libelf ../../src/gcc/c-common.c -o c-common.o
In file included from ../../src/gcc/c-common.c:4647:0:
../../src/gcc/builtins.def: In function 'c_define_builtins':
../../src/gcc/builtins.def:178:1: error: 'OPTION_GLIBC' undeclared (first use in this function)
../../src/gcc/builtins.def:178:1: note: each undeclared identifier is reported only once for each function it appears in
../../src/gcc/c-common.c: In function 'c_parse_error':
../../src/gcc/c-common.c:8257:5: warning: format not a string literal and no format arguments
../../src/gcc/c-common.c:8261:7: warning: format not a string literal and no format arguments
make[5]: *** [c-common.o] Error 1
make[5]: *** Waiting for unfinished jobs....

Tags: patch

Related branches

Matthias Klose (doko)
Changed in gcc-4.5 (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Michael Hope (michaelh1) wrote :

Confirmed using a cross compiler with the Ubuntu rules:

cc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I../../../src/gcc-linaro-4.5-2011.04-0/gcc -I../../../src/gcc-linaro-4.5-2011.04-0/gcc/. -I../../../src/gcc-linaro-4.5-2011.04-0/gcc/../include -I../../../src/gcc-linaro-4.5-2011.04-0/gcc/../libcpp/include -I../../../src/gcc-linaro-4.5-2011.04-0/gcc/../libdecnumber -I../../../src/gcc-linaro-4.5-2011.04-0/gcc/../libdecnumber/dpd -I../libdecnumber -DCLOOG_PPL_BACKEND -I/usr/include/libelf ../../../src/gcc-linaro-4.5-2011.04-0/gcc/c-common.c -o c-common.o
In file included from ../../../src/gcc-linaro-4.5-2011.04-0/gcc/c-common.c:4646:0:
../../../src/gcc-linaro-4.5-2011.04-0/gcc/builtins.def: In function ‘c_define_builtins’:
../../../src/gcc-linaro-4.5-2011.04-0/gcc/builtins.def:178:350: error: ‘OPTION_GLIBC’ undeclared (first use in this function)
../../../src/gcc-linaro-4.5-2011.04-0/gcc/builtins.def:178:350: note: each undeclared identifier is reported only once for each function it appears in
../../../src/gcc-linaro-4.5-2011.04-0/gcc/c-common.c: In function ‘c_parse_error’:
../../../src/gcc-linaro-4.5-2011.04-0/gcc/c-common.c:8256:5: warning: format not a string literal and no format arguments
../../../src/gcc-linaro-4.5-2011.04-0/gcc/c-common.c:8260:7: warning: format not a string literal and no format arguments

Revision history for this message
Michael Hope (michaelh1) wrote :
Michael Hope (michaelh1)
Changed in gcc-linaro:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Michael Hope (michaelh1) wrote :

A powerpc cross compiler builds with the above patch. I don't know if that is the best solution.

Changed in gcc-linaro:
assignee: nobody → Andrew Stubbs (ams-codesourcery)
milestone: none → 4.5-2011.05-0
Michael Hope (michaelh1)
Changed in gcc-linaro:
milestone: 4.5-2011.05-0 → 4.5-2011.06-0
Michael Hope (michaelh1)
Changed in gcc-linaro:
milestone: 4.5-2011.06-0 → 4.5-2011.07
Revision history for this message
Khem Raj (khem-raj) wrote :

I ran into this issue today. Its caused by android config patches especially r99494. Problem is that ppc config does not use config/linux.h instead it only used rs6000/linux.h or rs6000/linux64.h so it misses the new defines. Fix would be either copy those definitions from config/linux.h into config/rs6000/sysv4.h or include config/linux.h in powerpc-*-linux configs in config.gcc

I have cooked up this patch which fixes the issue.

tags: added: patch
Revision history for this message
Michael Hope (michaelh1) wrote :

Note that gcc trunk uses:

#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#if DEFAULT_LIBC == LIBC_UCLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
#else
#error "Unsupported DEFAULT_LIBC"
#endif

Revision history for this message
Khem Raj (khem-raj) wrote :

Does this then fix the issue ? or do you mean something else by specifying this snippet?
in the patch this will come from linux.h therefore this was redundant thats why it is removed

Michael Hope (michaelh1)
Changed in gcc-linaro:
milestone: 4.5-2011.07 → none
Revision history for this message
Matthias Klose (doko) wrote :

here is the updated patch from comment #4; a biarch build on powerpc-linux-gnu did succeed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.5 - 4.5.3-6ubuntu1

---------------
gcc-4.5 (4.5.3-6ubuntu1) oneiric; urgency=low

  * Re-enable the build using Linaro on powerpc. LP: #768921.

gcc-4.5 (4.5.3-6) unstable; urgency=low

  * Update to SVN 20110818 (r177845) from the gcc-4_5-branch.
    - Fix PR target/50001, PR fortran/42051, PR fortran/43896,
      PR fortran/49962.

  [ Aurelien Jarno ]
  * Add s390x support

  [ Marcin Juszkiewicz ]
  * Fixes for multilib cross builds. LP: #816852.

  [ Matthias Klose ]
  * Update the Linaro support to the 4.5-2011.08 release.
    - Fix build on powerpc. LP: #768921.
  * Fix [ARM] PR target/50090: aliases in libgcc.a with default visibility,
    taken from the trunk. LP: #823711.
 -- Matthias Klose <email address hidden> Thu, 18 Aug 2011 09:24:26 +0200

Changed in gcc-4.5 (Ubuntu):
status: Confirmed → Fix Released
Michael Hope (michaelh1)
Changed in gcc-linaro:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.