-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update toolchains to C++17 #1825
Changes from 22 commits
5f65074
1f28c3f
62a4ed2
a6a43d9
5f4e70e
de100cb
4354e5c
12dcbf8
7752e97
ba3c23d
bfe93f2
f1362d3
5ed8362
2e5cc29
4c14af4
cb6a8c3
9ad72a1
e604e32
7e997cd
54c40cc
28b93e6
633610b
03394f4
a60c1ac
b39c123
ebb970c
53a6872
ae6129c
7a69ed7
703f8ab
e7081d0
664c745
33dfc6a
d781c6a
ad6ae3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,8 +138,13 @@ SECTIONS | |
{ | ||
_irom0_text_start = ABSOLUTE(.); | ||
|
||
*libsmartconfig.a:(.literal .text .literal.* .text.*) | ||
*libc.a:(.literal .text .literal.* .text.*) | ||
*libm.a:(.literal .text .literal.* .text.*) | ||
*libgcc.a:_umoddi3.o(.literal .text) | ||
*libgcc.a:_udivdi3.o(.literal .text) | ||
*libstdc++.a:(.literal .text .literal.* .text.*) | ||
|
||
*libsmartconfig.a:(.literal .text .literal.* .text.*) | ||
*libat.a:(.literal.* .text.*) | ||
*libcrypto.a:(.literal.* .text.*) | ||
*libespnow.a:(.literal.* .text.*) | ||
|
@@ -156,27 +161,30 @@ SECTIONS | |
|
||
*libmbedtls.a:(.literal.* .text.*) | ||
|
||
*libm.a:(.literal .text .literal.* .text.*) | ||
/* C++ vtables */ | ||
*(.rodata._ZTV*) | ||
|
||
*(.rodata._ZTV*) /* C++ vtables */ | ||
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom0.text.* .irom.text .irom.debug.*) | ||
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom0.text.* .irom.text .irom.text.* .irom.debug.*) | ||
|
||
/* Generated libraries */ | ||
*liblwip2.a:(.literal .text .literal.* .text.*) | ||
*/clib-*.a:*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.* .irom.debug.*) | ||
|
||
/* Constant strings in flash (PSTRs) */ | ||
*(.irom0.pstr.*) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't actually necessary since |
||
|
||
/* __FUNCTION__ locals */ | ||
*(.rodata._ZZ*__FUNCTION__) | ||
*(.rodata._ZZ*__PRETTY_FUNCTION__) | ||
*(.rodata._ZZ*__func__) | ||
*(.rodata.__func__*) | ||
|
||
/* debug_e() string pointers */ | ||
*(.rodata._ZZ*log_string) | ||
|
||
/* const references, mainly in templated code */ | ||
*(.rodata._ZN*) | ||
/* Inline flash strings, including those within templated code */ | ||
*(*__pstr__*) | ||
*(*__fstr__*) | ||
|
||
*(.rodata._ZZN*) | ||
/* Templated code */ | ||
*(.rodata._ZN8NanoTimeL9unitTicksE) | ||
|
||
mikee47 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
_irom0_text_end = ABSOLUTE(.); | ||
_flash_code_end = ABSOLUTE(.); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
diff --git a/lib/libc.a b/lib/libc.orig.a | ||
rename from lib/libc.a | ||
rename to lib/libc.orig.a | ||
diff --git a/lib/libgcc.a b/lib/libgcc.orig.a | ||
rename from lib/libgcc.a | ||
rename to lib/libgcc.orig.a |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/**** | ||
* Sming Framework Project - Open Source framework for high efficiency native ESP8266 development. | ||
* Created 2015 by Skurydin Alexey | ||
* http://github.com/SmingHub/Sming | ||
* All files of the Sming Core are provided under the LGPL v3 license. | ||
* | ||
* alloc.cpp - C++ heap allocators | ||
* | ||
****/ | ||
|
||
#include <stdlib.h> | ||
|
||
void* operator new(size_t size) | ||
{ | ||
return malloc(size); | ||
} | ||
|
||
void* operator new[](size_t size) | ||
{ | ||
return malloc(size); | ||
} | ||
|
||
void operator delete(void* ptr) | ||
{ | ||
free(ptr); | ||
} | ||
|
||
void operator delete[](void* ptr) | ||
{ | ||
free(ptr); | ||
} | ||
|
||
void operator delete(void* ptr, size_t sz) | ||
{ | ||
free(ptr); | ||
} | ||
|
||
void operator delete[](void* ptr, size_t sz) | ||
{ | ||
free(ptr); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
COMPONENT_SRCDIRS := | ||
COMPONENT_INCDIRS := | ||
COMPONENT_SRCFILES := heap.c alloc.cpp | ||
|
||
# => Custom heap | ||
COMPONENT_VARS := ENABLE_CUSTOM_HEAP | ||
|
@@ -9,13 +10,13 @@ COMPONENT_SUBMODULES := umm_malloc | |
COMPONENT_SRCFILES += custom_heap.c umm_malloc/src/umm_malloc.c | ||
COMPONENT_INCDIRS += umm_malloc/src umm_malloc/includes/c-helper-macros | ||
|
||
COMPONENT_DEPENDS := esp8266 | ||
|
||
COMPONENT_VARS += UMM_POISON_CHECK | ||
ifeq ($(UMM_POISON_CHECK),1) | ||
GLOBAL_CFLAGS += -DUMM_POISON_CHECK | ||
endif | ||
|
||
COMPONENT_CFLAGS += -Wno-array-bounds | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is that change needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you comment this out then try compiling with
|
||
|
||
# remove mem_manager.o module from libmain of SDK | ||
define HEAP_LIBMAIN_COMMANDS | ||
@echo Enabling custom heap implementation | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikee47 Can you try to use
build
as a stage name also here? It would be better to have the different builds running in parallel and not wait forbuild
to finish in order forbuild c++17
to start. I am not sure if travis will merge them under one stage and run them in parallel but it is worth trying.