Changeset a36c4aa in mainline


Ignore:
Timestamp:
2025-08-12T18:03:48Z (2 months ago)
Author:
Martin Decky <martin@…>
Branches:
master
Children:
113fb4f
Parents:
2e9f284
Message:

Switch to binutils 2.45 and GCC 15.2

This requires a few minor modifications and one temporary workaround,
but should be otherwise painless.

The switch to binutils 2.45 is especially useful due to its fixes when
compiled by a C23 compiler.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/kinit.c

    r2e9f284 ra36c4aa  
    8686
    8787#ifdef CONFIG_KCONSOLE
    88 static char alive[ALIVE_CHARS] = "-\\|/";
     88static char alive[ALIVE_CHARS] __attribute__((nonstring)) = "-\\|/";
    8989#endif
    9090
  • tools/toolchain.sh

    r2e9f284 ra36c4aa  
    3131BINUTILS_GDB_GIT="https://github.com/HelenOS/binutils-gdb.git"
    3232
    33 BINUTILS_BRANCH="binutils-2_43-helenos"
    34 BINUTILS_VERSION="2.43"
     33BINUTILS_BRANCH="binutils-2_45-helenos"
     34BINUTILS_VERSION="2.45"
    3535
    3636GCC_GIT="https://github.com/HelenOS/gcc.git"
    37 GCC_BRANCH="14_2_0-helenos"
    38 GCC_VERSION="14.2"
     37GCC_BRANCH="15_2_0-helenos"
     38GCC_VERSION="15.2"
    3939
    4040BASEDIR="$PWD"
  • uspace/drv/bus/usb/vhc/conndev.c

    r2e9f284 ra36c4aa  
    4343#include "vhcd.h"
    4444
     45#define PLUGGED_DEVICE_NAME_MAXLEN 256
     46
    4547static fibril_local uintptr_t plugged_device_handle = 0;
    46 #define PLUGGED_DEVICE_NAME_MAXLEN 256
    47 static fibril_local char plugged_device_name[PLUGGED_DEVICE_NAME_MAXLEN + 1] = "<unknown>";
     48
     49/*
     50 * The explicit "initial-exec" TLS model attribute is a temporary workaround
     51 * for a bug in GCC (observed in 14.2 and 15.2) that manifests in combination
     52 * with the binutils 2.45 linker on MIPS.
     53 *
     54 * Without the attribute, the linker reports the following error:
     55 *
     56 *  can't find matching LO16 reloc against `plugged_device_name' for
     57 *  R_MIPS_TLS_TPREL_HI16 at 0x238 in section
     58 *  `.text.default_connection_handler'
     59 *
     60 * The immediate cause is a missing R_MIPS_TLS_TPREL_LO16 relocation that
     61 * matches the R_MIPS_TLS_TPREL_HI16 relocation. The root cause is probably
     62 * an aggressive optimization in the compiler that removes the relocation
     63 * despite being needed.
     64 */
     65static fibril_local char plugged_device_name[PLUGGED_DEVICE_NAME_MAXLEN + 1]
     66    __attribute__((tls_model("initial-exec"))) = "<unknown>";
    4867
    4968/** Receive device name.
  • uspace/drv/bus/usb/xhci/hc.c

    r2e9f284 ra36c4aa  
    166166                                        speeds[psiv].major = major;
    167167                                        speeds[psiv].minor = minor;
    168                                         str_ncpy(speeds[psiv].name, 4, name.str, 4);
     168                                        memcpy(speeds[psiv].name, name.str, 4);
    169169                                        speeds[psiv].usb_speed = USB_SPEED_MAX;
    170170
  • uspace/drv/bus/usb/xhci/hw_struct/regs.h

    r2e9f284 ra36c4aa  
    551551
    552552typedef union {
    553         char str [4];
     553        char str[4] __attribute__((nonstring));
    554554        uint32_t packed;
    555555} xhci_sp_name_t;
  • uspace/drv/bus/usb/xhci/rh.h

    r2e9f284 ra36c4aa  
    5151 */
    5252typedef struct xhci_port_speed {
    53         char name [4];
     53        char name[4] __attribute__((nonstring));
    5454        uint8_t major, minor;
    5555        uint64_t rx_bps, tx_bps;
  • uspace/lib/cpp/include/__bits/adt/bitset.hpp

    r2e9f284 ra36c4aa  
    4242    class bitset
    4343    {
     44        private:
     45            /**
     46             * While this might be a bit more wasteful
     47             * than using unsigned or unsigned long,
     48             * it will make parts of out code easier
     49             * to read.
     50             */
     51            using data_type = unsigned long long;
     52
    4453        public:
    4554            class reference
     
    365374
    366375        private:
    367             /**
    368              * While this might be a bit more wasteful
    369              * than using unsigned or unsigned long,
    370              * it will make parts of out code easier
    371              * to read.
    372              */
    373             using data_type = unsigned long long;
    374 
    375376            static constexpr size_t bits_in_data_type_ = sizeof(data_type) * 8;
    376377            static constexpr size_t data_size_ = N / bits_in_data_type_ + 1;
Note: See TracChangeset for help on using the changeset viewer.