On Tue, 2014-03-04 12:22:12 +0100, Richard Biener <[email protected]> wrote: > > We're doing the LTO bytecode version check only for two section > types at the moment - specifically _not_ for the first section > we read. Which causes us to crash instead of reporting a > version mismatch ... > > Fixed by doing the version check in the most appropriate place. > > LTO bootstrapped on x86_64-unknown-linux-gnu, applied. > > Richard. > > 2014-03-04 Richard Biener <[email protected]> > > PR lto/60405 > * lto-streamer-in.c (lto_read_body): Remove LTO bytecode version > check. > (lto_input_toplevel_asms): Likewise. > * lto-section-in.c (lto_get_section_data): Instead do it here > for every section.
Breaks for the Build Robot with g++ (GCC) 4.9.0 20131121 like this:
g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
-DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/.
-I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include
-I/opt/cfarm/mpc/include -I../../../gcc/gcc/../libdecnumber
-I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../../gcc/gcc/../libbacktrace -o lto-section-in.o -MT lto-section-in.o
-MMD -MP -MF ./.deps/lto-section-in.TPo ../../../gcc/gcc/lto-section-in.c
../../../gcc/gcc/lto-section-in.c: In function ‘const char*
lto_get_section_data(lto_file_decl_data*, lto_section_type, const char*,
size_t*)’:
../../../gcc/gcc/lto-section-in.c:177:37: error: cast from type ‘const char*’
to type ‘lto_header*’ casts away qualifiers [-Werror=cast-qual]
lto_check_version (((lto_header *)data)->major_version,
^
../../../gcc/gcc/lto-section-in.c:178:23: error: cast from type ‘const char*’
to type ‘lto_header*’ casts away qualifiers [-Werror=cast-qual]
((lto_header *)data)->minor_version);
^
cc1plus: all warnings being treated as errors
make[2]: *** [lto-section-in.o] Error 1
See eg.
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=156703
-->
http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=view&id=1152984
MfG, JBG
--
Jan-Benedict Glaw [email protected] +49-172-7608481
Signature of: http://www.eyrie.org/~eagle/faqs/questions.html
the second :
signature.asc
Description: Digital signature
