[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] [PATCH] errors when building with GCC 6
From: |
panic |
Subject: |
[Simulavr-devel] [PATCH] errors when building with GCC 6 |
Date: |
Mon, 19 Jun 2017 12:51:00 +0000 |
Hi all,
the new Debian stable/stretch ships with GCC 6.3.0. When I build
simulavr with this version, I get some errors that I've fixed with the
attached patches.
0001-remove-debugging-defines.patch:
Deletes the GTEST_CXXFLAGS = -Dprivate=public -Dprotected=public from
Makefile.am. Otherwise GCC complains about redeclaration with different
access specifiers of sstream:
> g++ -DHAVE_CONFIG_H -I. -I../../src -fdiagnostics-color -Dprivate=public
> -Dprotected=public -Igtest-1.6.0/include/gtest -Igtest-1.6.0/include
> -Igtest-1.6.0 -I../../src -g -g -O2 -MT gtest_main.o -MD -MP -MF $depbase.Tpo
> -c -o gtest_main.o gtest_main.cpp &&\
> mv -f $depbase.Tpo $depbase.Po
> In file included from gtest-1.6.0/include/gtest/internal/gtest-port.h:197:0,
> from gtest-1.6.0/include/gtest/internal/gtest-internal.h:40,
> from gtest-1.6.0/include/gtest/gtest.h:57,
> from session_001/unittest001.cpp:4:
> /usr/include/c++/6/sstream:300:7: error: ‘struct
> std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’
> redeclared with different access
> struct __xfer_bufptrs
> ^~~~~~
0002-delete-duplicate-architecture-definition.patch:
> avr-gcc -c -Wa,-gstabs -x assembler-with-cpp -o singlepincomm.o
> singlepincomm.s
> singlepincomm.s: Assembler messages:
> singlepincomm.s:26: Fatal error: redefinition of mcu type `avr2' to `attiny25'
In two .s files there's a '.arch ATTiny25' pseudo op at the very
beginning. GCC complains that this is a redefinition because the -mmcu=
command line argument defaults to avr2 if missing:
https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html
Removing the .arch pseudo op and adding -mmcu=attiny to Makefile.am
fixes the problem.
Don't forget to rerun ./bootstrap and ./configure ...
Cheers,
panic
0001-remove-debugging-defines.patch
Description: Text Data
0002-delete-duplicate-architecture-definition.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Simulavr-devel] [PATCH] errors when building with GCC 6,
panic <=