Honza,
I try to build this configuration:
../gcc-trunk/configure --prefix=/home/ed/gnu/arm-linux-gnueabihf-linux64
--target=arm-linux-gnueabihf --enable-languages=c,c++,fortran,ada
--with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard
but make fails:
libtool: compile:
/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/./gcc/xgcc -shared-libgcc
-B/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/./gcc -nostdinc++
-L/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/src
-L/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/src/.libs
-L/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-B/home/ed/gnu/arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/bin/
-B/home/ed/gnu/arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/lib/ -isystem
/home/ed/gnu/arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/include -isystem
/home/ed/gnu/arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/sys-include
-I/home/ed/gnu/gcc-trunk/libstdc++-v3/../libgcc
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/arm-linux-gnueabihf
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include
-I/home/ed/gnu/gcc-trunk/libstdc++-v3/libsupc++ -D_GLIBCXX_SHARED
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=strstream.lo -g -O2 -D_GNU_SOURCE
-I/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/backward
-Wno-deprecated -c
../../../../../gcc-trunk/libstdc++-v3/src/c++98/strstream.cc -fPIC -DPIC
-D_GLIBCXX_SHARED -o strstream.o
In file included from
../../../../../gcc-trunk/libstdc++-v3/src/c++98/strstream.cc:44:0:
/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/backward/strstream:126:9:
error: std::istrstream::_ZTVSt10istrstream.localalias.0 causes a section type
conflict with std::istrstream::_ZTVSt10istrstream
class istrstream : public basic_istream<char>
^
/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/backward/strstream:126:9:
note: ‘std::istrstream::_ZTVSt10istrstream’ was declared here
/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/backward/strstream:143:9:
error: std::ostrstream::_ZTVSt10ostrstream.localalias.1 causes a section type
conflict with std::ostrstream::_ZTVSt10ostrstream
class ostrstream : public basic_ostream<char>
^
/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/backward/strstream:143:9:
note: ‘std::ostrstream::_ZTVSt10ostrstream’ was declared here
/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/backward/strstream:160:9:
error: std::strstream::_ZTVSt9strstream.localalias.2 causes a section type
conflict with std::strstream::_ZTVSt9strstream
class strstream : public basic_iostream<char>
^
/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/include/backward/strstream:160:9:
note: ‘std::strstream::_ZTVSt9strstream’ was declared here
make[5]: *** [strstream.lo] Fehler 1
make[5]: Verlasse Verzeichnis
'/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/src/c++98'
make[4]: *** [all-recursive] Fehler 1
make[4]: Verlasse Verzeichnis
'/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3/src'
make[3]: *** [all-recursive] Fehler 1
make[3]: Verlasse Verzeichnis
'/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3'
make[2]: *** [all] Fehler 2
make[2]: Verlasse Verzeichnis
'/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Fehler 2
make[1]: Verlasse Verzeichnis
'/home/ed/gnu/gcc-build-arm-linux-gnueabihf-linux64'
make: *** [all] Fehler 2
When I debug and set a breakpoint in varasm.c line 314 it looks as if
the flag SECTION_RELRO is different. This flag is set in
categorize_decl_for_section where it depends on
TREE_CODE(decl), and if it is a VAR_DECL also on
TREE_READONLY (decl)
TREE_SIDE_EFFECTS (decl)
DECL_INITIAL (decl)
TREE_CONSTANT (DECL_INITIAL (decl))
DECL_THREAD_LOCAL_P (decl)
maybe also on CONST_CAST_TREE (decl) in case of asan
and various target hooks.
now, since the error message names a ".localalias."
I see your checkin from monday at the same area:
r210919 | hubicka | 2014-05-26 02:50:24 +0200 (Mo, 26. Mai 2014) | 2 Zeilen
* symtab.c (symtab_nonoverwritable_alias): Copy READONLY flag for
variables.
and I wonder if there are more flags missing:
Index: symtab.c
===================================================================
--- symtab.c (Revision 211028)
+++ symtab.c (Arbeitskopie)
@@ -1165,6 +1165,8 @@ symtab_nonoverwritable_alias (symtab_node *node)
else
{
TREE_READONLY (new_decl) = TREE_READONLY (node->decl);
+ TREE_SIDE_EFFECTS (new_decl) = TREE_SIDE_EFFECTS (node->decl);
+ DECL_INITIAL (new_decl) = DECL_INITIAL (node->decl);
new_node = varpool_create_variable_alias (new_decl, node->decl);
}
symtab_resolve_alias (new_node, node);
This makes the build succeed for me, but I am not really sure, if that is
the right direction to fix this, and if maybe even more flags may be missing,
for instance: DECL_THREAD_LOCAL_P or CONST_CAST_TREE?
What do you think?
Bernd.