From f9879fc699f28443c59b59ffb2ee301e2b6af5e0 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Wed, 14 Dec 2022 19:04:38 -0500 Subject: [PATCH 1/6] v1.6.2 release --- CHANGELOG.md | 17 +++++++++++++++++ .../VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- nerves_toolchain_i586_nerves_linux_gnu/VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- .../VERSION | 2 +- 13 files changed, 29 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23f37f8b..1d602a4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Toolchain Releases +## v1.6.2 + +This release adds a riscv64 glibc toolchain since that has more support than +muslc in the RISC-V community at the moment. + +* Changes + * Removes Python scripting support in gdb (fixes toolchain compilation and + probably not used) + * Remove the static toolchain option since it was being ignored on MacOS. On + Linux, it disabled LTO. LTO is included on all platforms now (the default). + * Fixes runtime dependency on libzstd another way by forcibly turning it off + with a Crosstool-NG option rather than adding a configure flag. This is + possible now. Previously the option was hidden due to the static toolchain + option. + * Let gcc determine the correct option for SJLJ (setjmp/longjmp). The note + where it doesn't work doesn't apply to Nerves platforms. + ## v1.6.1 This release adds musl libc toolchains for aarch64 and armv7. diff --git a/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION b/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_aarch64_nerves_linux_musl/VERSION b/nerves_toolchain_aarch64_nerves_linux_musl/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_aarch64_nerves_linux_musl/VERSION +++ b/nerves_toolchain_aarch64_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION b/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION +++ b/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION b/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION +++ b/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION b/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION b/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION +++ b/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_i586_nerves_linux_gnu/VERSION b/nerves_toolchain_i586_nerves_linux_gnu/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_i586_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_i586_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_mipsel_nerves_linux_musl/VERSION b/nerves_toolchain_mipsel_nerves_linux_musl/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_mipsel_nerves_linux_musl/VERSION +++ b/nerves_toolchain_mipsel_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION b/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_riscv64_nerves_linux_musl/VERSION b/nerves_toolchain_riscv64_nerves_linux_musl/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_riscv64_nerves_linux_musl/VERSION +++ b/nerves_toolchain_riscv64_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION b/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 diff --git a/nerves_toolchain_x86_64_nerves_linux_musl/VERSION b/nerves_toolchain_x86_64_nerves_linux_musl/VERSION index 8d067cef..fdd3be6d 100644 --- a/nerves_toolchain_x86_64_nerves_linux_musl/VERSION +++ b/nerves_toolchain_x86_64_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2-dev +1.6.2 From c6e4886e0ace9e0f78ad246c1d4210d96acf88de Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Wed, 12 Oct 2022 18:17:27 -0400 Subject: [PATCH 2/6] Update all toolchains to gcc-12 --- nerves_toolchain_aarch64_nerves_linux_gnu/defconfig | 1 - nerves_toolchain_aarch64_nerves_linux_musl/defconfig | 1 - nerves_toolchain_armv5_nerves_linux_musleabi/defconfig | 1 - nerves_toolchain_armv6_nerves_linux_gnueabihf/defconfig | 1 - nerves_toolchain_armv7_nerves_linux_gnueabihf/defconfig | 1 - nerves_toolchain_armv7_nerves_linux_musleabihf/defconfig | 1 - nerves_toolchain_i586_nerves_linux_gnu/defconfig | 1 - nerves_toolchain_mipsel_nerves_linux_musl/defconfig | 1 - nerves_toolchain_riscv64_nerves_linux_musl/defconfig | 1 - nerves_toolchain_x86_64_nerves_linux_gnu/defconfig | 1 - nerves_toolchain_x86_64_nerves_linux_musl/defconfig | 1 - 11 files changed, 11 deletions(-) diff --git a/nerves_toolchain_aarch64_nerves_linux_gnu/defconfig b/nerves_toolchain_aarch64_nerves_linux_gnu/defconfig index 4da82ace..bc4d8e04 100644 --- a/nerves_toolchain_aarch64_nerves_linux_gnu/defconfig +++ b/nerves_toolchain_aarch64_nerves_linux_gnu/defconfig @@ -4,6 +4,5 @@ CT_ARCH_64=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_GLIBC=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_aarch64_nerves_linux_musl/defconfig b/nerves_toolchain_aarch64_nerves_linux_musl/defconfig index a41e4784..3c8d0298 100644 --- a/nerves_toolchain_aarch64_nerves_linux_musl/defconfig +++ b/nerves_toolchain_aarch64_nerves_linux_musl/defconfig @@ -5,4 +5,3 @@ CT_ARCH_64=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_MUSL=y -CT_GCC_V_11=y diff --git a/nerves_toolchain_armv5_nerves_linux_musleabi/defconfig b/nerves_toolchain_armv5_nerves_linux_musleabi/defconfig index 36976614..5aa6964a 100644 --- a/nerves_toolchain_armv5_nerves_linux_musleabi/defconfig +++ b/nerves_toolchain_armv5_nerves_linux_musleabi/defconfig @@ -7,6 +7,5 @@ CT_ARCH_ARCH="armv5te" CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_MUSL=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_armv6_nerves_linux_gnueabihf/defconfig b/nerves_toolchain_armv6_nerves_linux_gnueabihf/defconfig index ca079b2f..88854be5 100644 --- a/nerves_toolchain_armv6_nerves_linux_gnueabihf/defconfig +++ b/nerves_toolchain_armv6_nerves_linux_gnueabihf/defconfig @@ -8,6 +8,5 @@ CT_ARCH_FLOAT_HW=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_GLIBC=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/defconfig b/nerves_toolchain_armv7_nerves_linux_gnueabihf/defconfig index e376f4ab..36a35c7b 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/defconfig +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/defconfig @@ -6,6 +6,5 @@ CT_ARCH_FPU="vfpv3-d16" CT_ARCH_FLOAT_HW=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_armv7_nerves_linux_musleabihf/defconfig b/nerves_toolchain_armv7_nerves_linux_musleabihf/defconfig index 0b917520..a2e3ff8e 100644 --- a/nerves_toolchain_armv7_nerves_linux_musleabihf/defconfig +++ b/nerves_toolchain_armv7_nerves_linux_musleabihf/defconfig @@ -8,6 +8,5 @@ CT_ARCH_FLOAT_HW=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_MUSL=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_i586_nerves_linux_gnu/defconfig b/nerves_toolchain_i586_nerves_linux_gnu/defconfig index 698b798a..4c9b395d 100644 --- a/nerves_toolchain_i586_nerves_linux_gnu/defconfig +++ b/nerves_toolchain_i586_nerves_linux_gnu/defconfig @@ -4,6 +4,5 @@ CT_ARCH_ARCH="i586" CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_GLIBC=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_mipsel_nerves_linux_musl/defconfig b/nerves_toolchain_mipsel_nerves_linux_musl/defconfig index d8bc20ce..ea3ab4bf 100644 --- a/nerves_toolchain_mipsel_nerves_linux_musl/defconfig +++ b/nerves_toolchain_mipsel_nerves_linux_musl/defconfig @@ -7,6 +7,5 @@ CT_ARCH_FLOAT_SW=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_MUSL=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_riscv64_nerves_linux_musl/defconfig b/nerves_toolchain_riscv64_nerves_linux_musl/defconfig index 0bbe8a20..c49ffdb3 100644 --- a/nerves_toolchain_riscv64_nerves_linux_musl/defconfig +++ b/nerves_toolchain_riscv64_nerves_linux_musl/defconfig @@ -7,6 +7,5 @@ CT_ARCH_ARCH="rv64gc" CT_KERNEL_LINUX=y CT_LINUX_V_5_10=y CT_LIBC_MUSL=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_x86_64_nerves_linux_gnu/defconfig b/nerves_toolchain_x86_64_nerves_linux_gnu/defconfig index 2f13ab08..7ad00bba 100644 --- a/nerves_toolchain_x86_64_nerves_linux_gnu/defconfig +++ b/nerves_toolchain_x86_64_nerves_linux_gnu/defconfig @@ -3,6 +3,5 @@ CT_ARCH_X86=y CT_ARCH_64=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file diff --git a/nerves_toolchain_x86_64_nerves_linux_musl/defconfig b/nerves_toolchain_x86_64_nerves_linux_musl/defconfig index 70d3a7b2..5fb6c2b4 100644 --- a/nerves_toolchain_x86_64_nerves_linux_musl/defconfig +++ b/nerves_toolchain_x86_64_nerves_linux_musl/defconfig @@ -5,6 +5,5 @@ CT_ARCH_64=y CT_KERNEL_LINUX=y CT_LINUX_V_4_19=y CT_LIBC_MUSL=y -CT_GCC_V_11=y CT_DEBUG_GDB=y # CT_GDB_CROSS_PYTHON is not set \ No newline at end of file From 5d8ce3fca782ea2b5f7f18682f19898834f85a96 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Wed, 12 Oct 2022 19:27:56 -0400 Subject: [PATCH 3/6] v1.7.0 release --- CHANGELOG.md | 7 +++++++ nerves_toolchain_aarch64_nerves_linux_gnu/VERSION | 2 +- nerves_toolchain_aarch64_nerves_linux_musl/VERSION | 2 +- nerves_toolchain_armv5_nerves_linux_musleabi/VERSION | 2 +- nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION | 2 +- nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION | 2 +- nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION | 2 +- nerves_toolchain_i586_nerves_linux_gnu/VERSION | 2 +- nerves_toolchain_mipsel_nerves_linux_musl/VERSION | 2 +- nerves_toolchain_riscv64_nerves_linux_gnu/VERSION | 2 +- nerves_toolchain_riscv64_nerves_linux_musl/VERSION | 2 +- nerves_toolchain_x86_64_nerves_linux_gnu/VERSION | 2 +- nerves_toolchain_x86_64_nerves_linux_musl/VERSION | 2 +- 13 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d602a4a..ca610df7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Toolchain Releases +## v1.7.0 + +This release bumps GCC from 11.3 to 12.2. + +* Tool versions + * GCC 12.2 (https://gcc.gnu.org/gcc-12/changes.html#12.2) + ## v1.6.2 This release adds a riscv64 glibc toolchain since that has more support than diff --git a/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION b/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_aarch64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_aarch64_nerves_linux_musl/VERSION b/nerves_toolchain_aarch64_nerves_linux_musl/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_aarch64_nerves_linux_musl/VERSION +++ b/nerves_toolchain_aarch64_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION b/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION +++ b/nerves_toolchain_armv5_nerves_linux_musleabi/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION b/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION +++ b/nerves_toolchain_armv6_nerves_linux_gnueabihf/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION b/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION +++ b/nerves_toolchain_armv7_nerves_linux_gnueabihf/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION b/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION +++ b/nerves_toolchain_armv7_nerves_linux_musleabihf/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_i586_nerves_linux_gnu/VERSION b/nerves_toolchain_i586_nerves_linux_gnu/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_i586_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_i586_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_mipsel_nerves_linux_musl/VERSION b/nerves_toolchain_mipsel_nerves_linux_musl/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_mipsel_nerves_linux_musl/VERSION +++ b/nerves_toolchain_mipsel_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION b/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_riscv64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_riscv64_nerves_linux_musl/VERSION b/nerves_toolchain_riscv64_nerves_linux_musl/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_riscv64_nerves_linux_musl/VERSION +++ b/nerves_toolchain_riscv64_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION b/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION +++ b/nerves_toolchain_x86_64_nerves_linux_gnu/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 diff --git a/nerves_toolchain_x86_64_nerves_linux_musl/VERSION b/nerves_toolchain_x86_64_nerves_linux_musl/VERSION index fdd3be6d..bd8bf882 100644 --- a/nerves_toolchain_x86_64_nerves_linux_musl/VERSION +++ b/nerves_toolchain_x86_64_nerves_linux_musl/VERSION @@ -1 +1 @@ -1.6.2 +1.7.0 From 7d4e4b2de882dbdfb0d5210bb974a7be422fabfa Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 3 Apr 2021 19:34:24 -1000 Subject: [PATCH 4/6] WIP Mac building --- .circleci/config.yml | 240 ++++++++++++++---- build_release.sh | 6 + nerves_toolchain_ctng/build.sh | 36 ++- .../scripts/unmerge_defconfig.exs | 4 + 4 files changed, 225 insertions(+), 61 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 51e8e19b..99396ac5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,19 @@ +version: 2.1 + defaults: &defaults working_directory: /home/nerves/build environment: ENV: CI docker: - - image: nervesproject/toolchains + - image: nervesproject/toolchains-nonexistant resource_class: large +orbs: + my-macos: circleci/macos@1.1.0 + #mac-permissions: circleci/macos + # This will likely have to change since it means we're using a docker container instead of running on macOS + # https://circleci.com/docs/2.0/executor-types/ + install_hex_rebar: &install_hex_rebar run: name: Install hex and rebar @@ -57,6 +65,36 @@ build: &build paths: - /home/nerves/deploy/toolchain +build_mac: &build_mac + #xcode: 11.7.0 + steps: + - checkout + # Free up extra space on macOS + # https://support.circleci.com/hc/en-us/articles/360037142773-Freeing-up-Disk-Space-on-macOS + - run: + name: df + command: df -h + - run: + name: Free up extra space + command: sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/ + - run: + name: df + command: df -h + - run: + name: Install cowsay + command: brew install cowsay + - run: + name: cowsay hi + command: cowsay Hi! + - run: + name: brew deps + command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang + - <<: *install_hex_rebar + - <<: *install_nerves_bootstrap + - run: + name: Build release + command: ./build_release.sh + test: &test working_directory: /home/nerves/build steps: @@ -82,6 +120,13 @@ test: &test name: Compile hello world app command: /root/toolchain/bin/*-g++ /home/nerves/build/support/smoketest/main.cpp +#------------------------------- +# Re-usable YAML anchors (to be merged with `<<`) +#------------------------------- +docker_default: &docker_default + docker: + - image: nervesproject/toolchains + build_workflow: &build_workflow context: org-global filters: @@ -102,10 +147,15 @@ deploy_workflow: &deploy_workflow tags: only: /v.*/ -linux: &linux - BUILD_OS: linux +mac_xcode: &mac_xcode + xcode: 11.7.0 -version: 2.0 +mac_env: &mac_env + BUILD_OS: darwin + HOMEBREW_NO_AUTO_UPDATE: 1 + +linux_env: &linux_env + BUILD_OS: linux jobs: #------------------------------- @@ -116,10 +166,10 @@ jobs: # build # linux build_linux_nerves_toolchain_aarch64_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -133,9 +183,20 @@ jobs: <<: *defaults environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *build + build_mac_nerves_toolchain_aarch64_nerves_mac_gnu: + macos: + <<: *mac_xcode + # TODO: these should be in mac_defaults + #working_directory: /home/nerves/build + environment: + # Don't need darwin_arm + TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm + ENV: CI + <<: *mac_env + <<: *build_mac #------------------------------- # armv7_nerves_linux_gnueabihf @@ -143,10 +204,10 @@ jobs: # build # linux build_linux_nerves_toolchain_armv7_nerves_linux_gnueabihf: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -158,19 +219,19 @@ jobs: <<: *defaults environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_musleabihf - <<: *linux + <<: *linux_env <<: *build #------------------------------- - # armv5_nerves_linux_musleabi + # armv5_nerves_linux_musleabi 1 (jobs) (build) #------------------------------- # build # linux build_linux_nerves_toolchain_armv5_nerves_linux_musleabi: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv5_nerves_linux_musleabi - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -179,10 +240,10 @@ jobs: # build # linux build_linux_nerves_toolchain_armv6_nerves_linux_gnueabihf: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_armv6_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -191,10 +252,10 @@ jobs: # build # linux build_linux_nerves_toolchain_i586_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_i586_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -203,10 +264,10 @@ jobs: # build # linux build_linux_nerves_toolchain_mipsel_nerves_linux_musl: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_mipsel_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -215,10 +276,10 @@ jobs: # build # linux build_linux_nerves_toolchain_x86_64_nerves_linux_gnu: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -227,10 +288,10 @@ jobs: # build # linux build_linux_nerves_toolchain_x86_64_nerves_linux_musl: - <<: *defaults + <<: [ *defaults, *docker_default ] environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *build #------------------------------- @@ -242,9 +303,24 @@ jobs: <<: *defaults environment: TOOLCHAIN: nerves_toolchain_riscv64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *build + + test_mac_trusty_aarch64_nerves_linux_gnu-darwin_x86_64: + working_directory: /root + docker: + - image: nervesproject/toolchain-test-ubuntu:trusty + environment: + # TODO: Should this be mac_gnu? + # nerves_toolchain_armv7_nerves_linux_gnueabihf-darwin_x86_64-1.4.2 + # nerves_toolchain_aarch64_nerves_linux_gnu + TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu-darwin_arm + # TODO: add this as well + # nerves_toolchain_aarch64_nerves_linux_gnu-darwin_x86_64 + <<: *mac_env + <<: *test + #------------------------------- # riscv64_nerves_linux_gnu #------------------------------- @@ -254,7 +330,7 @@ jobs: <<: *defaults environment: TOOLCHAIN: nerves_toolchain_riscv64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *build @@ -270,7 +346,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -285,7 +361,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -298,7 +374,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -311,7 +387,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_musleabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -324,7 +400,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_armv5_nerves_linux_musleabi - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -337,7 +413,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_armv6_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -350,7 +426,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_i586_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -363,7 +439,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_mipsel_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -376,7 +452,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -389,7 +465,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -402,7 +478,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_riscv64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -415,7 +491,7 @@ jobs: - image: ubuntu:trusty environment: TOOLCHAIN: nerves_toolchain_riscv64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -430,7 +506,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -445,7 +521,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -458,7 +534,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -471,7 +547,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_armv7_nerves_linux_musleabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -484,7 +560,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_armv5_nerves_linux_musleabi - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -497,7 +573,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_armv6_nerves_linux_gnueabihf - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -510,7 +586,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_i586_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -523,7 +599,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_mipsel_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -536,7 +612,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -549,7 +625,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_x86_64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -562,7 +638,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_riscv64_nerves_linux_musl - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -575,7 +651,7 @@ jobs: - image: ubuntu:xenial environment: TOOLCHAIN: nerves_toolchain_riscv64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test @@ -593,7 +669,7 @@ jobs: - image: ubuntu:bionic environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -608,7 +684,7 @@ jobs: - image: ubuntu:focal environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test #------------------------------- @@ -623,16 +699,41 @@ jobs: - image: ubuntu:jammy environment: TOOLCHAIN: nerves_toolchain_aarch64_nerves_linux_gnu - <<: *linux + <<: *linux_env <<: *test + # build_macos_toolchain: + # #working_directory: /home/nerves/build + # environment: + # <<: *mac_env + # <<: *mac_xcode + # steps: + # - checkout + # - run: + # name: Install cowsay + # command: brew install cowsay + # - run: + # name: cowsay hi + # command: cowsay Hi! + # - run: + # name: brew deps + # command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang + # - <<: *install_hex_rebar + # - <<: *install_nerves_bootstrap + # - run: + # name: Build release + # command: ./build_release.sh + + deploy: + # Hmmmmmmm, do I need to replace this whole section? <<: *defaults steps: - checkout - run: name: Create Artifacts Dir command: mkdir -p /home/nerves/deploy/artifacts + # These steps seem a bit odd. Could they be paramaterized? - run: name: nerves_toolchain_aarch64_nerves_linux_gnu command: echo "nerves_toolchain_aarch64_nerves_linux_gnu" > .toolchain @@ -732,6 +833,7 @@ jobs: - run: name: Copy Artifacts command: cp /home/nerves/deploy/toolchain/*.tar.xz /home/nerves/deploy/artifacts + # Will need to run these steps on macos as well - run: name: Install dependencies command: | @@ -751,6 +853,9 @@ workflows: #------------------------------- # Build Toolchains #------------------------------- + - build_mac_nerves_toolchain_aarch64_nerves_mac_gnu: + <<: *build_workflow + # aarch64_nerves_linux_gnu #------------------------------- - build_linux_nerves_toolchain_aarch64_nerves_linux_gnu: @@ -982,6 +1087,31 @@ workflows: requires: - build_linux_nerves_toolchain_riscv64_nerves_linux_gnu + # macOS Stuff + #------------------------------- + # https://circleci.com/docs/2.0/testing-macos/ + # https://circleci.com/docs/2.0/hello-world-macos/ + # Example mac application: https://github.com/CircleCI-Public/circleci-demo-macos + # Using homebrew on CircleCI: https://circleci.com/docs/2.0/testing-ios/#using-homebrew + # Maybe disable homebrew auto-update https://circleci.com/docs/2.0/testing-ios/#optimizing-homebrew + # Will probably require a macOS orb: https://circleci.com/developer/orbs/orb/circleci/macos + # + # From Frank + # brew update + # brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses + # brew install libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils + # mix archive.install hex nerves_bootstrap + # git clone https://github.com/nerves-project/toolchains.git + # cd toolchains + # ./build_release.sh + # + # copy *.tar.xz to GitHub releases + - test_mac_trusty_aarch64_nerves_linux_gnu-darwin_x86_64: + # TODO: Is test_workflow correct? + <<: *test_workflow + requires: + - build_mac_nerves_toolchain_aarch64_nerves_mac_gnu + #------------------------------- # Deploy Toolchains #------------------------------- @@ -1035,3 +1165,9 @@ workflows: # riscv linux glibc - test_linux_trusty_riscv64_nerves_linux_gnu - test_linux_xenial_riscv64_nerves_linux_gnu + + # macOS + #- build_macos_toolchain + - test_mac_trusty_aarch64_nerves_linux_gnu-darwin_x86_64 + # aarch64 is incorrect! + - build_mac_nerves_toolchain_aarch64_nerves_mac_gnu diff --git a/build_release.sh b/build_release.sh index 1f776702..9dba092c 100755 --- a/build_release.sh +++ b/build_release.sh @@ -30,6 +30,12 @@ for CONFIG in $CONFIGS; do cd $CONFIG mix deps.get mix nerves.artifact --path ../ + echo "Done building $CONFIG" + # TMP + echo "df -h:" + df -h + echo "ls -lh *" + ls -lh * cd ../ done diff --git a/nerves_toolchain_ctng/build.sh b/nerves_toolchain_ctng/build.sh index af2f33d2..72d12cda 100755 --- a/nerves_toolchain_ctng/build.sh +++ b/nerves_toolchain_ctng/build.sh @@ -208,6 +208,14 @@ gcc_tuple_underscores() build_gcc() { + if [[ $BUILD_OS = "freebsd" ]]; then + SED=/usr/local/bin/gsed + elif [[ $BUILD_OS = "darwin" ]]; then + SED=$HOMEBREW_PREFIX/bin/gsed + else + SED="sed" + fi + # Build and install ct-ng to the work directory cd "$WORK_DIR" ln -sf "$DL_DIR" dl @@ -237,10 +245,9 @@ build_gcc() ./bootstrap fi if [[ $BUILD_OS = "freebsd" ]]; then - SED=/usr/local/bin/gsed - SED=/usr/local/bin/gsed MAKE=/usr/local/bin/gmake PATCH=/usr/local/bin/gpatch ./configure --prefix="$LOCAL_INSTALL_DIR" - gmake - gmake install + SED=/usr/local/bin/gsed MAKE=/usr/local/bin/gmake PATCH=/usr/local/bin/gpatch ./configure --prefix="$LOCAL_INSTALL_DIR" + gmake + gmake install elif [[ $BUILD_OS = "darwin" ]]; then # Homebrew's gcc is gcc-12 BINUTILS=$(brew --prefix binutils) @@ -250,7 +257,6 @@ build_gcc() gmake gmake install else - SED=sed ./configure --prefix="$LOCAL_INSTALL_DIR" make make install @@ -295,6 +301,8 @@ build_gcc() # Configure logging when on CI (see crosstool-ng's build script) if [[ "$CI" = "true" ]]; then echo "Modifying logging for CI" + echo "In work dir: $WORK_DIR" + $SED -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ -e 's/^.*\(CT_LOG_INFO\).*$/# \1 is not set/' \ @@ -308,6 +316,8 @@ build_gcc() "$WORK_DIR/build/.config" fi + echo "BEFORE DOTS" + # Start building and print dots to keep CI from killing the build due # to console inactivity. $PREFIX "$CTNG" $CTNG_BUILD & @@ -316,10 +326,13 @@ build_gcc() while ps -p $build_pid >/dev/null; do sleep 12 printf "." + echo "DOT $(date)" done } & local keepalive_pid=$! + echo "Waiting for $build_pid build to finish" + # Wait for the build to finish wait $build_pid 2>/dev/null @@ -338,14 +351,17 @@ build_gcc() rm -f "$GCC_INSTALL_DIR/$TARGET_TUPLE/build.log.bz2" # Clean up crosstool-ng's work directory if we put it in a global location - if [[ "$CI" = "true" ]]; then - echo "Not cleaning up work directory since CI build" - else + echo "Cleaning up work directory since CI build" + # if [[ "$CI" = "true" ]]; then + # echo "Not cleaning up work directory since CI build" + # else if [[ -e "$CT_WORK_DIR" ]]; then chmod -R u+w "$CT_WORK_DIR" rm -fr "$CT_WORK_DIR" fi - fi + # fi + df -h + du -hs * } toolchain_base_name() @@ -359,7 +375,9 @@ save_build_info() # Save useful information if we ever need to reproduce the toolchain TARGET_TUPLE=$(gcc_tuple) echo "$NERVES_TOOLCHAIN_VERSION" > "$GCC_INSTALL_DIR/$TARGET_TUPLE/nerves-toolchain.tag" + echo "running: cp $CTNG_CONFIG $GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.defconfig" cp "$CTNG_CONFIG" "$GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.defconfig" + echo "running: cp $WORK_DIR/build/.config $GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.config" cp "$WORK_DIR/build/.config" "$GCC_INSTALL_DIR/$TARGET_TUPLE/ct-ng.config" } diff --git a/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs b/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs index 9e4c0b6d..f7bfe04a 100755 --- a/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs +++ b/nerves_toolchain_ctng/scripts/unmerge_defconfig.exs @@ -43,10 +43,14 @@ defmodule Unmerger do def main([original_defconfig, fragment_defconfig, resulting_defconfig]) do IO.puts("Unmerging #{resulting_defconfig} into #{original_defconfig} using #{fragment_defconfig}\n") orig = load(original_defconfig) + IO.inspect(orig, label: "orig") frag = load(fragment_defconfig) + IO.inspect(frag, label: "frag") result = load(resulting_defconfig) + IO.inspect(result, label: "result") desired = remove_fragments(result, frag) + IO.inspect(desired, label: "desired") if !is_similar_enough(orig, desired) do IO.puts("\n\nDifferences detected between the original defconfig and the resulting one!!!") From f83989bec2101260495503693778ae5b4c643cca Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Fri, 10 Dec 2021 21:53:10 -0500 Subject: [PATCH 5/6] Upgrade existing brew packages to avoid errors --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 99396ac5..273ab132 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,7 +88,10 @@ build_mac: &build_mac command: cowsay Hi! - run: name: brew deps - command: brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool autoconf gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang + command: | + brew update + brew upgrade + brew install gawk binutils xz wget automake gnu-tar help2man bash make ncurses libtool gnu-sed mpfr gmp gcc bison lzip python3 grep coreutils elixir erlang - <<: *install_hex_rebar - <<: *install_nerves_bootstrap - run: From 5596794c61f1e2251673d70f599b86abbc4b231e Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Sun, 18 Dec 2022 07:35:00 -0500 Subject: [PATCH 6/6] Bump xcode to fix warning --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 273ab132..e380e33f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,7 +151,7 @@ deploy_workflow: &deploy_workflow only: /v.*/ mac_xcode: &mac_xcode - xcode: 11.7.0 + xcode: 12.4.0 mac_env: &mac_env BUILD_OS: darwin