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 c/27528] New: compiling linux kernels 2.6.16.14/15 2.6.17-rc3 on powerpc (7450) get error on long exixting code


"main_rmg" Invoking command

gcc -v -save-temps -m32 -Wp,-MD,init/.main.o.d  -nostdinc -isystem
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include -D__KERNEL__ -Iinclude 
-include include/linux/autoconf.h -Iarch/powerpc -Iarch/powerpc/include -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2
-fomit-frame-pointer -msoft-float -pipe -Iarch/powerpc -ffixed-r2 -mmultiple
-mno-altivec -funit-at-a-time -mstring -mcpu=powerpc -Wa,-maltivec
-Wdeclaration-after-statement -Wno-pointer-sign    -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(main)"  -D"KBUILD_MODNAME=KBUILD_STR(main)" -c -o
init/main.o init/main.c


"main_rmg.out"

gcc: warning: -pipe ignored because -save-temps specified
Using built-in specs.
Target: powerpc-unknown-linux-gnu
Configured with: ../gcc-4.2.0/configure --prefix=/usr
--enable-version-specific-runtime-libs --with-java-home=/usr
--infodir=/usr/share/gcc-42 --datadir=/usr/share/gcc-42
--mandir=/usr/share/gcc-42 --program-suffix=-42 --enable-shared --enable-gomp
--enable-mudflap --enable-libgfortran --enable-threads=posix
--enable-__cxa_atexit --enable-libgcc-math --disable-checking
--disable-multilib --disable-nls --disable-werror --with-gnu-ld
--with-mpfr-dir=/src/src/mpfr-2.2.0 --with-mpfr=/usr/lib
--with-gmp-dir=/src/src/gmp-4.2 --with-gmp=/usr/lib --enable-languages=c,c++
--with-cpu=7450 --enable-clocale=gnu
Thread model: posix
gcc version 4.2.0 20060509 (experimental)
 /usr/libexec/gcc/powerpc-unknown-linux-gnu/4.2.0/cc1 -E -quiet -nostdinc -v
-Iinclude -Iarch/powerpc -Iarch/powerpc/include -Iarch/powerpc -D__unix__
-D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux
-Asystem=unix -Asystem=posix -D__KERNEL__ -DKBUILD_STR(s)=#s
-DKBUILD_BASENAME=KBUILD_STR(main) -DKBUILD_MODNAME=KBUILD_STR(main) -isystem
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include -include
include/linux/autoconf.h -MD init/.main.o.d init/main.c -m32 -msoft-float
-mmultiple -mno-altivec -mstring -mcpu=powerpc -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-aliasing -fno-common -fomit-frame-pointer
-ffixed-r2 -funit-at-a-time -O2 -fpch-preprocess -o main.i
ignoring duplicate directory "arch/powerpc"
#include "..." search starts here:
#include <...> search starts here:
 include
 arch/powerpc
 arch/powerpc/include
 /usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include
End of search list.
 /usr/libexec/gcc/powerpc-unknown-linux-gnu/4.2.0/cc1 -fpreprocessed main.i
-quiet -dumpbase main.c -m32 -msoft-float -mmultiple -mno-altivec -mstring
-mcpu=powerpc -auxbase-strip init/main.o -O2 -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -Wdeclaration-after-statement -Wno-pointer-sign -version
-fno-strict-aliasing -fno-common -fomit-frame-pointer -ffixed-r2
-funit-at-a-time -o main.s
GNU C version 4.2.0 20060509 (experimental) (powerpc-unknown-linux-gnu)
        compiled by GNU C version 4.2.0 20060509 (experimental).
GGC heuristics: --param ggc-min-expand=81 --param ggc-min-heapsize=96676
Compiler executable checksum: 1ddc21b7b24d4a7d358320168400dad6
init/main.c: In function 'unknown_bootoption':
init/main.c:235: warning: asm operand 2 probably doesn't match constraints
init/main.c:235: error: impossible constraint in 'asm'


"from_main_i" I believthe rest of main.i adds little but could send it if
requested.

static int __attribute__ ((__section__ (".init.text"))) unknown_bootoption(char
*param, char *val)
{

 if (val) {

  if (val == param+strlen(param)+1)
   val[-1] = '=';
  else if (val == param+strlen(param)+2) {
   val[-2] = '=';
   memmove(val-1, val, strlen(val)+1);
   val--;
  } else
   do { __asm__ __volatile__( "1:       twi 31,0,0\n" ".section
__bug_table,\"a\"\n" "\t"".long" " ""   1b,%0,%1,%2\n" ".previous" : : "i"
(235), "i" ("init/main.c"), "i" ((__func__))); } while (0);
 }


 if (obsolete_checksetup(param))
  return 0;



"main_c.offending" producing "from_main_i"

/*
 * Unknown boot options get handed to init, unless they look like
 * failed parameters
 */
static int __init unknown_bootoption(char *param, char *val)
{
        /* Change NUL term back to "=", to make "param" the whole string. */
        if (val) {
                /* param=val or param="val"? */
                if (val == param+strlen(param)+1)
                        val[-1] = '=';
                else if (val == param+strlen(param)+2) {
                        val[-2] = '=';
                        memmove(val-1, val, strlen(val)+1);
                        val--;
                } else
                        BUG();
        }



"powerpc_BUG_def"  defining BUG()

#define BUG() do {                                                       \
        __asm__ __volatile__(                                            \
                "1:     twi 31,0,0\n"                                    \
                ".section __bug_table,\"a\"\n"                           \
                "\t"PPC_LONG"   1b,%0,%1,%2\n"                           \
                ".previous"                                              \
                : : "i" (__LINE__), "i" (__FILE__), "i" (__FUNCTION__)); \
} while (0)


-- 
           Summary: compiling linux kernels 2.6.16.14/15 2.6.17-rc3 on
                    powerpc (7450) get error on long exixting code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: malitzke at metronets dot com
 GCC build triplet: powerpc-linux
  GCC host triplet: powerpc-linux
GCC target triplet: powerpc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27528


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