Skip to content
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

WIP - Move toolchain to GCC 7.2 #6267

Closed
wants to merge 19 commits into from

Conversation

earlephilhower
Copy link
Collaborator

Use at your own risk, but it compiles and run what I've thrown at it so far. Needs to be examined much deeper to make sure things are still linked in the right spot, not duplicated, etc.

`this` has a nonnull attribute, so it's a GCC warning to check if it's
non-null (since it's effective always true).  Remove the check in
UDPContext.

Revert the lambda changes in LEAmdns which aren't legal in c++11.
@earlephilhower
Copy link
Collaborator Author

@d-a-v, I seem to be stuck between IPv6 and LWIP1.4. igmp_joingroup takes either a ip_addr_t or a ip4_addr_t depending on the build, while IP4_ADDR_ANY4 is a u32.

So it seems like the common code snippet igmp_joingroup(IP4_ADDR_ANY4, ip_2_ip4(&multicast_addr)) can't be reconciled.

If I cast to (ip_addr_t*) it works in IPv4 for LWIP1.4 and 2, but fails in IPv6 (since there ip_addr_t can hold an IPv6 address). If I cast to ip4_addr_t* then I can't build outside of IPv6.

Any ideas? Is there any helper type with the same name that uses ip_addr_t when in v4 mode but ip4_addr_t in v6 mode?

earlephilhower and others added 5 commits July 7, 2019 10:53
* Add timestamp to filenames to fix json issues

When GITs of the same tag are rebuilt, the binaries are different, but
the filenames would be the same so the Arduino tools would think they
already had the file downloaded.  But when they checked the signature of
the (old) downloaded file, it wouldn't match that (of the new one) in the
JSON.

Append a timestamp to the filenames, in seconds since the epoch, so that
different builds of the same GIT will have different names.

* Add mklittlefs binary to toolchain release, update JSON
@d-a-v
Copy link
Collaborator

d-a-v commented Jul 8, 2019

@earlephilhower here is the IPv6 fix (which is in fact an lwIP-1.4 IPv4 fix)

diff --git a/cores/esp8266/IPAddress.h b/cores/esp8266/IPAddress.h
index f4ed5a06..f78b0227 100644
--- a/cores/esp8266/IPAddress.h
+++ b/cores/esp8266/IPAddress.h
@@ -36,7 +36,7 @@
 #define IP_SET_TYPE_VAL(x,y) do { (void)0; } while (0)
 #define IP_ANY_TYPE (&ip_addr_any)
 #define IP4_ADDR_ANY IPADDR_ANY
-#define IP4_ADDR_ANY4 IPADDR_ANY
+#define IP4_ADDR_ANY4 IP_ADDR_ANY
 #define IPADDR4_INIT(x) { x }
 #define CONST /* nothing: lwIP-v1 does not use const */
 #define ip4_addr_netcmp ip_addr_netcmp
diff --git a/libraries/ESP8266SdFat b/libraries/ESP8266SdFat
--- a/libraries/ESP8266SdFat
+++ b/libraries/ESP8266SdFat
@@ -1 +1 @@
-Subproject commit 6326c71ff1f6294756b6e348edaf723bfe7be3e7
+Subproject commit 6326c71ff1f6294756b6e348edaf723bfe7be3e7-dirty
diff --git a/libraries/ESP8266mDNS/src/ESP8266mDNS_Legacy.cpp b/libraries/ESP8266mDNS/src/ESP8266mDNS_Legacy.cpp
index af39bff6..80f55ad8 100644
--- a/libraries/ESP8266mDNS/src/ESP8266mDNS_Legacy.cpp
+++ b/libraries/ESP8266mDNS/src/ESP8266mDNS_Legacy.cpp
@@ -198,7 +198,7 @@ bool MDNSResponder::_listen() {
 
     IPAddress mdns(MDNS_MULTICAST_ADDR);
 
-    if (igmp_joingroup((ip_addr_t *)IP4_ADDR_ANY4, mdns)!= ERR_OK) {
+    if (igmp_joingroup(IP4_ADDR_ANY4, mdns)!= ERR_OK) {
       return false;
     }
 
diff --git a/libraries/ESP8266mDNS/src/LEAmDNS_Helpers.cpp b/libraries/ESP8266mDNS/src/LEAmDNS_Helpers.cpp
index af3e13a2..d99a57f2 100644
--- a/libraries/ESP8266mDNS/src/LEAmDNS_Helpers.cpp
+++ b/libraries/ESP8266mDNS/src/LEAmDNS_Helpers.cpp
@@ -199,7 +199,7 @@ bool MDNSResponder::_allocUDPContext(void) {
     //TODO: set multicast address (lwip_joingroup() is IPv4 only at the time of writing)
     multicast_addr.addr = DNS_MQUERY_IPV6_GROUP_INIT;
 #endif
-    if (ERR_OK == igmp_joingroup((ip_addr_t*)IP4_ADDR_ANY4, ip_2_ip4(&multicast_addr))) {
+    if (ERR_OK == igmp_joingroup(IP4_ADDR_ANY4, ip_2_ip4(&multicast_addr))) {
         m_pUDPContext = new UdpContext;
         m_pUDPContext->ref();

@earlephilhower
Copy link
Collaborator Author

We're all set, only binary replacement is needed to move to GCC 7.2 at some point in the future.

@earlephilhower
Copy link
Collaborator Author

Abandoning in favor of going full-ahead to GCC 9.1. The toolchain can be rebuilt via make in the future is we find some issues w/9.1 for the 3.x release.

@earlephilhower earlephilhower deleted the gcc7.2-0 branch November 18, 2020 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants