[llvm-commits] [llvm-gcc-4.2] r51257 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c ipa-inline.c passes.c

Dale Johannesen dalej at apple.com
Thu May 22 11:30:40 PDT 2008


On May 22, 2008, at 12:56 AM, Duncan Sands wrote:
> (A)
> build/genrecog ../../gcc-4.2.llvm/gcc/config/i386/i386.md \^M
>          insn-conditions.md > tmp-recog.c^M
> ../../gcc-4.2.llvm/gcc/config/i386/i386.md:19280: warning: operand 1  
> missing mode?^M

Fixed.

> (B)
> gcc -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict- 
> prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno- 
> variadic-macros -Wno-overlength-strings -Wold-style-definition - 
> Wmissing-format-attribute -fno-common   -DHAVE_CONFIG_H -I. -I. - 
> I../../gcc-4.2.llvm/gcc -I../../gcc-4.2.llvm/gcc/. -I../../ 
> gcc-4.2.llvm/gcc/../include -I../../gcc-4.2.llvm/gcc/../libcpp/ 
> include  -I../../gcc-4.2.llvm/gcc/../libdecnumber -I../libdecnumber - 
> I.../include -I.../llvm/include -DENABLE_LLVM -I.../../llvm/include   
> -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS   \^M
>                ../../gcc-4.2.llvm/gcc/config/i386/i386.c -o i386.o^M
> ../../gcc-4.2.llvm/gcc/config/i386/i386.c: In function  
> 'ix86_expand_convert_uns_DI2DF_sse':^M
> ../../gcc-4.2.llvm/gcc/config/i386/i386.c:10321: warning: large  
> integer implicitly truncated to unsigned type^M
> ../../gcc-4.2.llvm/gcc/config/i386/i386.c: In function  
> 'ix86_expand_convert_sign_DI2DF_sse':^M
> ../../gcc-4.2.llvm/gcc/config/i386/i386.c:10428: warning: large  
> integer implicitly truncated to unsigned type^M

The code is written assuming HOST_WIDE_INT is 64 bits, and it seems to  
be 32 on Linux x86.  I don't understand gcc's floating point  
representation well enough to fix that properly; however, I'm pretty  
sure that code is never executed when llvm-gcc is used.  So we can  
just comment out that code when building for LLVM.  I'll test that out.
Alternatively you can build with HOST_WIDE_INT==64 bits on x86 Linux  
(which can be done by adding need_64bit_hwint in config.gcc).

> (C)
> gcc   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes  
> -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros - 
> Wno-overlength-strings -Wold-style-definition -Wmissing-format- 
> attribute -fno-common   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.2.llvm/ 
> gcc -I../../gcc-4.2.llvm/gcc/. -I../../gcc-4.2.llvm/gcc/../include - 
> I../../gcc-4.2.llvm/gcc/../libcpp/include  -I../../gcc-4.2.llvm/ 
> gcc/../libdecnumber -I../libdecnumber -I.../include -I.../llvm/ 
> include -DENABLE_LLVM -I.../../llvm/include  -D_DEBUG  -D_GNU_SOURCE  
> -D__STDC_LIMIT_MACROS    \^M
>        -DTARGET_MACHINE=\"i686-pc-linux-gnu\" \^M
>        -c ../../gcc-4.2.llvm/gcc/collect2.c -o collect2.o^M
> ../../gcc-4.2.llvm/gcc/objc/objc-act.c: In function 'objc_init':^M
> ../../gcc-4.2.llvm/gcc/objc/objc-act.c:715: warning: empty body in  
> an if-statement^M

I don't see an obvious way to fix the source.  That code is warning  
about the use of ObjC2 features, which currently don't work anywhere  
but darwin; so it would be reasonable to enable that warning for Linux  
targets IMO (in fact, I'm not sure why this wasn't made the  
default).   You can do this by defining OBJC_WARN_OBJC2_FEATURES along  
the lines of the one in config/darwin.h in some appropriate header.

> (D)
> build/genchecksum cc1obj-dummy > cc1obj-checksum.c^M
> echo | .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../ 
> i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include - 
> isystem .../i686-pc-linux-gnu/sys-include -E -dM - | \^M
>          sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \^M
>                 -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \^M
>          sort -u > tmp-macro_list^M
> cc1: warning: unrecognized gcc debugging option: M^M

Darwin simply compiles cc1obj-checksum.c using gcc; we don't use  
whatever script is doing the above.
And we don't build the libraries in (E) through (I), so you're on your  
own there.

> (E)
> .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- 
> linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ 
> i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../ 
> gcc-4.2.llvm/libgfortran -I. -iquote../../../gcc-4.2.llvm/ 
> libgfortran/io -I../../../gcc-4.2.llvm/libgfortran/../gcc -I../../../ 
> gcc-4.2.llvm/libgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE - 
> std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style- 
> definition -Wextra -Wwrite-strings -O2 -g -O2 -c ../../../ 
> gcc-4.2.llvm/libgfortran/runtime/string.c -o string.o^M
> ../../../gcc-4.2.llvm/libgfortran/runtime/string.c: In function  
> 'compare0':^M
> ../../../gcc-4.2.llvm/libgfortran/runtime/string.c:47: warning:  
> comparison between signed and unsigned^M
>
> (F)
> .../gcc/xgcc -shared-libgcc -B.../gcc -nostdinc++ -L..i686-pc-linux- 
> gnu/libstdc++-v3/src -L..i686-pc-linux-gnu/libstdc++-v3/src/.libs - 
> B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ - 
> isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/ 
> sys-include -I.../libstdc++-v3/../gcc -I..i686-pc-linux-gnu/libstdc+ 
> +-v3/include/i686-pc-linux-gnu -I..i686-pc-linux-gnu/libstdc++-v3/ 
> include -I.../libstdc++-v3/libsupc++ -fno-implicit-templates -Wall - 
> Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once - 
> ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE - 
> c ../../../../gcc-4.2.llvm/libstdc++-v3/libsupc++/eh_call.cc -o  
> eh_call.o^M
> .../libstdc++-v3/../gcc/unwind-pe.h:74: warning: 'unsigned int  
> size_of_encoded_value(unsigned char)' defined but not used^M
>
> (G)
> .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- 
> linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ 
> i686-pc-linux-gnu/sys-include -fgnu-runtime -c -I. -I.../libobjc -O2  
> -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC - 
> DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions -I.../libobjc/objc  
> -I.../libobjc/../gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../ 
> libobjc/../include .../libobjc/Object.m -o Object.o^M
> .../libobjc/Object.m: In function '-[Object compare:]':^M
> .../libobjc/Object.m:124: warning: comparison of distinct pointer  
> types lacks a cast^M
>
> (H)
> .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- 
> linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ 
> i686-pc-linux-gnu/sys-include -c -I. -I.../libobjc -O2 -g -O2 -W - 
> Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS - 
> fno-strict-aliasing -fexceptions -I.../libobjc/objc -I.../libobjc/../ 
> gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../libobjc/../ 
> include .../libobjc/thr.c -o thr.o^M
> .../libobjc/thr.c: In function '__objc_thread_detach_function':^M
> .../libobjc/thr.c:117: warning: 'noreturn' function does return^M
>
> (I)
> .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- 
> linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ 
> i686-pc-linux-gnu/sys-include -c -I. -I.../libobjc -O2 -g -O2 -W - 
> Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS - 
> fno-strict-aliasing -fexceptions -I.../libobjc/objc -I.../libobjc/../ 
> gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../libobjc/../ 
> include .../libobjc/sendmsg.c -o sendmsg.o^M
> .../libobjc/sendmsg.c:44:1: warning: "rtx" redefined^M
> In file included from .../libobjc/sendmsg.c:33:^M
> .../libobjc/../gcc/coretypes.h:75:1: warning: this is the location  
> of the previous definition^M




More information about the llvm-commits mailing list