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

Upgrade to GCC 10.1 toolchain #6294

Merged
merged 85 commits into from
Jul 7, 2020
Merged

Commits on Jul 13, 2019

  1. Configuration menu
    Copy the full SHA
    59023e9 View commit details
    Browse the repository at this point in the history
  2. Rebuilt using pure GNU binutils and GCC

    Remove dependencies on earlier forked GNU utilities (gcc-xtensa,
    binutils-gdb-xtensa) and just use GCC sources, unmodified (except for
    patches in the esp-quick-toolchain directories).
    earlephilhower committed Jul 13, 2019
    Configuration menu
    Copy the full SHA
    8642204 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    354cfcd View commit details
    Browse the repository at this point in the history
  4. Fix GDBstub linkage options

    GDB works with pure GNU GCC and pure GNU binutils now.  Still warnings
    galore, but tested with the example sketch in the docs.
    earlephilhower committed Jul 13, 2019
    Configuration menu
    Copy the full SHA
    99a0c6f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    83f308e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    33fee67 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    726f0e9 View commit details
    Browse the repository at this point in the history
  8. Fix deprecated implicit copy ctors in IP code

    Fix some warnings present in GCC8/9 in the IPAddress code
    
    In AddressListIterator there was a copy constructor which simply copied
    the structure bit-for-bit.  That's the default operation, so remove it
    to avoid the warning there.
    
    IPAddress, add a default copy constructor since the other copy
    constructors are simply parsing from one format into a native ip_addr_t.
    
    @d-a-v, can you give these a look over and see if they're good (since
    IP stuff is really your domain).
    earlephilhower committed Jul 13, 2019
    Configuration menu
    Copy the full SHA
    3afe9e3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ef74b7c View commit details
    Browse the repository at this point in the history
  10. Fix WiFiClientSecure implicit default copy ctor

    These both use shared-ptrs to handle refcnts to allocated data, so using
    the default copy constructor is fine (and has been in use for a long
    time).
    earlephilhower committed Jul 13, 2019
    Configuration menu
    Copy the full SHA
    a15ab56 View commit details
    Browse the repository at this point in the history
  11. Dummy size for heap to avoid GCC 8/9 warnings

    Make GCC think _heap_start is large enough to avoid the basic (and
    incorrect) bounds-checking warnings it produces.  The size chosen is
    arbitrary and does not affect the actual size of the heap in any way.
    earlephilhower committed Jul 13, 2019
    Configuration menu
    Copy the full SHA
    3065a3f View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2019

  1. Make heap an undefined extend array

    Instead of a bogus size, use an indefinite size for the heap to avoid
    GCC warnings
    earlephilhower committed Jul 14, 2019
    Configuration menu
    Copy the full SHA
    a68d8ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0a5fe6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb3df45 View commit details
    Browse the repository at this point in the history
  4. Fix ticker function cast warnings in GCC 9

    The callback function is defined to take a (void*) as parameter, but our
    templates let users use anything that fits inside sizeof(void*) to be
    passed in.  Add pragmas to stop GCC warnings about this, since we
    already check the size of the type will fit in the allocated space.
    earlephilhower committed Jul 14, 2019
    Configuration menu
    Copy the full SHA
    71f48ac View commit details
    Browse the repository at this point in the history
  5. Remove GCC support fcn that's in ROM

    Manually delete the divdi3.so from the libgcc.a library by running the
    updated EQT's 9.1-post script.
    earlephilhower committed Jul 14, 2019
    Configuration menu
    Copy the full SHA
    f4cc2d1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1168360 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2019

  1. Make exceptions work again, get std::regex up

    Exceptions are broken on all builds (GCC4.8-9.1) due to the removal of
    the PROGMEM non-32b read exception handler (added in the unstable
    pre3.0.0).
    
    Build the exception code with -mforce-l32 and patch
    accordingly to avoid LoadStore errors.
    
    Apply patches to select portions of the regex lib which use _stype_
    (which is now in flash).
    earlephilhower committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    1cb9282 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e5ee285 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    86812e6 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2019

  1. Configuration menu
    Copy the full SHA
    9f6c8f5 View commit details
    Browse the repository at this point in the history
  2. Workaround g++ template section problem for exception strings

    G++ seems to throw out the section attributes for templates.  This means
    that the __EXCSTR(a synonym for "PSTR()") is ignored and exception.what
    strings are stored in RODATA, eating up RAM.
    
    Workaround by using the linker to place the strings keying off their name
    ("*__exception_what__*").
    earlephilhower committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    c5fcedd View commit details
    Browse the repository at this point in the history
  3. Rebuild moving exception.what to unique names

    Exception.whats are now all in __exception_what__ and can be moved by
    the linker to flash.  Works aroung G++ issue with segments being lost in
    templates.
    earlephilhower committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    b279f33 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3c695a5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8240618 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2019

  1. Configuration menu
    Copy the full SHA
    357e2eb View commit details
    Browse the repository at this point in the history
  2. Update to latest libs, save iram

    Move two GCC FP support routines out of iram since they are in ROM
    already, saving some add'l IRAM.  Same list as gcc 4.8.
    earlephilhower committed Jul 21, 2019
    Configuration menu
    Copy the full SHA
    0151092 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2019

  1. Configuration menu
    Copy the full SHA
    bb3bde9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6944b6f View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2019

  1. Configuration menu
    Copy the full SHA
    cf04569 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2019

  1. Configuration menu
    Copy the full SHA
    b7cdc03 View commit details
    Browse the repository at this point in the history
  2. Fix "reinterpret_case is not a constexpr" error

    In GCC 9 (and 8 from what I read on SO), a cast of a const int to a
    function pointer (via explicit or implicit reinterpret_cast) is not a
    constexpr.
    ````
    /home/earle/Arduino/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_performance.cpp:45:36: error: a reinterpret_cast is not a constant expression
       45 | int constexpr (*_rom_putc1)(int) = (int (*)(int))(void*)0x40001dcc;
          |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ````
    
    Remove the constexpr, potentially increasing heap usage by 4 bytes in
    debug mode.
    earlephilhower committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    7f2ad70 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2019

  1. Configuration menu
    Copy the full SHA
    58e909e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c3d12b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    230891d View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2019

  1. Upgrade to GCC 9.2, released in August 2019

    Add builds for all 5 cross-compiles to pass CI
    earlephilhower committed Sep 30, 2019
    Configuration menu
    Copy the full SHA
    22ecb65 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2019

  1. Configuration menu
    Copy the full SHA
    d17bac3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    910fe3a View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2019

  1. Configuration menu
    Copy the full SHA
    e4c2c69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89c3add View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    293ba4d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8115e1f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d6f0f1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e684db1 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2019

  1. Configuration menu
    Copy the full SHA
    075d9c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fe8b4da View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2019

  1. Configuration menu
    Copy the full SHA
    541c92e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9a315c View commit details
    Browse the repository at this point in the history
  3. Move add'l softFP from IRAM to flash

    Per @mikee47, we miss sone add'l soft-FP routined in the linker which
    makes them end up in IRAM.  Move them explicitly into flash, like a
    couple others we have already done this for.
    earlephilhower committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    b33206d View commit details
    Browse the repository at this point in the history
  4. Move to std=c++17/c17 in platform, remove abs/round

    Move to C++17 and C17 standards on the compiler options.
    
    Remove "register" from core since it is deprecated.
    
    Remove the #define abs() and #define round() which a) overwrote the
    C stdlib definitions, poorly, and b) broke the GCC core code which used
    "abs" as an internal function name.
    
    Now abs() returns an integer, and not whatever was being absoluted.
    fabs() etc. can be used if users need fload/double suport.
    
    round() returns a double now, which is basically what it was returning
    in the original case since adding/subtracting by a FP.
    earlephilhower committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    4e292d7 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2019

  1. Use std::abs/round to replace the macro definitions

    Per discussion w/@devyte, preserve the abs() and round() functionality
    via the using statement.
    earlephilhower committed Dec 9, 2019
    Configuration menu
    Copy the full SHA
    0f2e6ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    98aa5f0 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2019

  1. Configuration menu
    Copy the full SHA
    f5f7673 View commit details
    Browse the repository at this point in the history
  2. Add 2nd arg (exception handler) to ets_isr_t

    Disassembly of the ROM shows there are 2 params to the ets_isr_t
    callback.  The first is the arg passed in, the second is a pointer to an
    exception frame where you can get info about when the IRQ happened.
    earlephilhower committed Dec 11, 2019
    Configuration menu
    Copy the full SHA
    54013d7 View commit details
    Browse the repository at this point in the history
  3. Move the gdbstub example to a subdir

    The Arduino IDE and the build CI don't build it without a subdir, so
    make one for gdbstub's example so it's visible and tested.
    earlephilhower committed Dec 11, 2019
    Configuration menu
    Copy the full SHA
    d79cd6c View commit details
    Browse the repository at this point in the history
  4. Fix ets_irq_arratch redefinition and core IRQ handlers

    Remove a duplicated, different declaration for ets_irq_attach from
    ets_sys.h.  It never really even matched the other declaration in the
    same header.
    
    Update the core to IRQ handlers to fix the prototype and include the
    2nd, unused frame parameter.
    earlephilhower committed Dec 11, 2019
    Configuration menu
    Copy the full SHA
    39dd0b9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6686826 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    87a9a50 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2019

  1. Configuration menu
    Copy the full SHA
    7090f68 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2020

  1. Configuration menu
    Copy the full SHA
    a00e6b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91d21b6 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2020

  1. Configuration menu
    Copy the full SHA
    5d2f09d View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2020

  1. Configuration menu
    Copy the full SHA
    9074bb9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89cacef View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2020

  1. Upgrade to GCC 9.3

    earlephilhower committed Mar 21, 2020
    Configuration menu
    Copy the full SHA
    4ffe519 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    afff569 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2020

  1. Configuration menu
    Copy the full SHA
    7926828 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d661ac6 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2020

  1. Move to GCC 10.1

    earlephilhower committed May 15, 2020
    Configuration menu
    Copy the full SHA
    70ec21a View commit details
    Browse the repository at this point in the history
  2. Merge master and fix eboot build

    GCC10 now uses `-fno-common` so the eboot global variables were being
    placed in IRAM.  Adjust the makefile and rebuild to fix.
    earlephilhower committed May 15, 2020
    Configuration menu
    Copy the full SHA
    24f5500 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    43f9f0e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8ca6e78 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2020

  1. Pull in latest PSTR changes and fix GCC10.1 build

    Somehow the prior GCC build's -mforce32 patch wasn't applying correctly,
    but I was still able to get a binary.  Fixed.  Also pulled in latest
    PSTR changes in progmem.h
    earlephilhower committed May 20, 2020
    Configuration menu
    Copy the full SHA
    d2b4e4c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce07fd5 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2020

  1. Merge branch 'master' of https://github.com/esp8266/Arduino into gcc9.1

    Rebuild eboot.elf with new sources.
    earlephilhower committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    7c29e67 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2020

  1. Configuration menu
    Copy the full SHA
    7a20b53 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2020

  1. Configuration menu
    Copy the full SHA
    20b620d View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2020

  1. Configuration menu
    Copy the full SHA
    c4dea28 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. Optional stack smash protection -fstack-protector

    Add a menu to enable GCC's built-in stack smash protection.  When a
    subroutine goes past its end of stack, generate a crashdump on function
    exit like:
    
    ````
    GCC detected stack overrun
    Stack corrupted, stack smash detected.
    
    >>>stack>>>
    
    ctx: cont
    sp: 3fffff20 end: 3fffffc0 offset: 0000
    3fffff20:  40202955 00000001 0000001c 4020287e
    3fffff30:  feefeffe 000000fd 00000000 00000000
    ...
    <<<stack<<<
    ````
    
    Disabled by default because there is a small per-function code overhead
    (and CPU time if the function is called very frequently and is very
    small).
    
    BearSSL and LWIP are not built using stack smash detection, yet.
    earlephilhower committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    803bcf8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f8a196 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c99453 View commit details
    Browse the repository at this point in the history
  4. Dump faulting function PC in stack overflow

    Report a fake exception to have the exception decoder print the actual
    faulting function.  This won't tell you where in the function the issue
    happened, but it will tell you the function name first and foremost.
    earlephilhower committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    5559729 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2020

  1. Configuration menu
    Copy the full SHA
    db8ef89 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d17dc0f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    837a4e0 View commit details
    Browse the repository at this point in the history