Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] msp430-toolchain: update to 9.3.1.2
@ 2023-06-15 15:10 benjcal
  2023-06-15 15:11 ` [PR REVIEW] " benjcal
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: benjcal @ 2023-06-15 15:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

There is a new pull request by benjcal against master on the void-packages repository

https://github.com/benjcal/void-packages msp430-toolchain-update-to-9.3.1.2
https://github.com/void-linux/void-packages/pull/44456

msp430-toolchain: update to 9.3.1.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44456.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-msp430-toolchain-update-to-9.3.1.2-44456.patch --]
[-- Type: text/x-diff, Size: 9940 bytes --]

From bafcab8c7a340d96369a455e35b030e425f87031 Mon Sep 17 00:00:00 2001
From: Benjamin Calderon <benj.calderon@gmail.com>
Date: Thu, 15 Jun 2023 10:50:28 -0400
Subject: [PATCH] msp430-toolchain: update to 9.3.1.2

---
 .../patches/README-build.patch                | 105 ++++++++++++++++++
 srcpkgs/msp430-toolchain/patches/gcc7.patch   |  11 --
 srcpkgs/msp430-toolchain/template             |  78 ++++---------
 3 files changed, 129 insertions(+), 65 deletions(-)
 create mode 100644 srcpkgs/msp430-toolchain/patches/README-build.patch
 delete mode 100644 srcpkgs/msp430-toolchain/patches/gcc7.patch

diff --git a/srcpkgs/msp430-toolchain/patches/README-build.patch b/srcpkgs/msp430-toolchain/patches/README-build.patch
new file mode 100644
index 000000000000..4dea9e996274
--- /dev/null
+++ b/srcpkgs/msp430-toolchain/patches/README-build.patch
@@ -0,0 +1,105 @@
+--- a/msp430-gcc-9.3.1.11-source-full/README-build.sh
++++ b/msp430-gcc-9.3.1.11-source-full/README-build.sh
+@@ -28,14 +28,13 @@
+ set -e
+ set -x
+ 
+-configure_args_common='--target=msp430-elf --enable-languages=c,c++ --disable-nls --enable-initfini-array'
++configure_args_common='--target=msp430-elf --enable-languages=c --disable-nls --enable-initfini-array --prefix=/usr/msp430'
+ # Note: binutils doesn't build without warnings on macOS
+ # https://sourceware.org/ml/binutils/2013-12/msg00051.html
+ configure_args_binutils=$(echo --disable-{sim,gdb,werror})
+ configure_args_gcc=$(echo --enable-target-optspace --enable-newlib-nano-formatted-io)
+ configure_args_gdb_common=$(echo --disable-{binutils,gas,ld,gprof,etc} --without-{mpfr,lzma} --with-static-standard-libraries --disable-source-highlight)
+ configure_args_gdb_nopy="--with-python=no"
+-configure_args_gdb_py="--with-python=python2.7 --program-prefix=msp430-elf- --program-suffix=-py"
+ 
+ pushd gcc
+   # Download sources for gcc prerequisites (gmp, mpfr, mpc, and isl)
+@@ -53,76 +52,35 @@
+   done
+ popd
+ 
+-# Download prerequisites for building MINGW GDB with python2.7 support.
+-if [[ "$configure_args_common" == *"mingw"* ]]; then
+-  python_ws=$(readlink -f mingw-python-workspace)
+-  rm -rf $python_ws
+-  mkdir $python_ws
+-  pushd $python_ws
+-    if [[ "$configure_args_common" == *"i686-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.msi
+-    elif [[ "$configure_args_common" == *"x86_64-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.amd64.msi
+-    else
+-      echo "ERROR: Unhandled value to --host configure option for python support"
+-    fi
+-    if [ ! -e ../$(basename $python_win_msi_url) ]; then
+-      curl -O $python_win_msi_url
+-    else
+-      cp ../$(basename $python_win_msi_url) .
+-    fi
+-    7za x $(basename $python_win_msi_url)
+-    # Used by python-config.sh
+-    export PYTHON_WIN=$python_ws
+-    configure_args_gdb_py="--with-python=$(readlink -f ../python-config.sh) --program-prefix=msp430-elf- --program-suffix=-py"
+-  popd
+-fi
+-
+ # Create directories
+ rm -rf build install
+ mkdir -p build/{binutils,gcc,gdb} install
+ 
+ # Build binutils
+ pushd build/binutils
+-  ../../binutils/configure $configure_args_common $configure_args_binutils --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
++  ../../binutils/configure $configure_args_common $configure_args_binutils
++  make -j
++  make install DESTDIR=$PWD/../../install
+ popd
+ 
+ # Build gcc and newlib
+ pushd build/gcc
+   (
+-    export PATH=$PWD/../../install/usr/local/bin:$PATH
+-    ../../gcc/configure $configure_args_common $configure_args_gcc --with-pkgversion="${pkg_version-$USER}"
+-    make
+-    make html
+-    make install install-html DESTDIR=$PWD/../../install
++    export PATH=$PWD/../../install/usr/msp430/bin:$PATH
++    ../../gcc/configure $configure_args_common $configure_args_gcc
++    make -j
++    make install DESTDIR=$PWD/../../install
+   )
+ popd
+ 
+ # Build GDB without python support
+ pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy --with-pkgversion="${pkg_version-$USER}"
+-  make
++  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy
++  make -j
+   make install DESTDIR=$PWD/../../install
+ popd
+ 
+-## Build GDB with python support, and the HTML documentation.
+-pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_py --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
+-  # Remove *-py versions of run and add-index, which are unnaffected by the added Python support.
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-run-py*
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-gdb-add-index-py*
+-  if [[ "$configure_args_common" == *"mingw"* ]]; then
+-    rm -rf $PYTHON_WIN
+-  fi
+-popd
+-
+-echo "Build Complete [toolchain root directory: install/usr/local/bin]"
++echo "Build Complete [toolchain root directory: install/usr/msp430/bin]"
+ exit 0
+ 
+ # The dejagnu/ directory contains a copy of msp430-sim.exp, downloaded from:
diff --git a/srcpkgs/msp430-toolchain/patches/gcc7.patch b/srcpkgs/msp430-toolchain/patches/gcc7.patch
deleted file mode 100644
index f664b41db09e..000000000000
--- a/srcpkgs/msp430-toolchain/patches/gcc7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sources/tools/gcc/config/msp430/msp430.c
-+++ b/sources/tools/gcc/config/msp430/msp430.c
-@@ -2209,7 +2209,7 @@
- }
-   const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
- 
-   CSH ("slli", 1, 1, slli_1),
-   CSH ("slll", 1, 1, slll_1),
diff --git a/srcpkgs/msp430-toolchain/template b/srcpkgs/msp430-toolchain/template
index a495ca1cb0c5..85bc300317e0 100644
--- a/srcpkgs/msp430-toolchain/template
+++ b/srcpkgs/msp430-toolchain/template
@@ -1,81 +1,51 @@
 # Template file for 'msp430-toolchain'
 pkgname=msp430-toolchain
-version=3.05.00.00
-revision=2
+version=9.3.1.2
+revision=1
 archs="x86_64* i686*"
 create_wrksrc=yes
-hostmakedepends="unzip expect flex tar texinfo"
-makedepends="ncurses-devel"
+hostmakedepends="make gcc binutils bzip2 tar curl flex bison texinfo"
 short_desc="Toolchain for the TI MSP430 microprocessor"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="http://www.ti.com/tool/msp430-gcc-opensource"
-distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
- http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
-checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
- 1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
+distfiles="https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-9.3.1.11-source-full.tar.bz2
+ https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-support-files-1.212.zip"
+checksum="095197fcd4a81d0df1ea03d62c3c3030f6024ca96df65d828c043bddde634fdd
+ 3b1a39f10a344dfefb767e60ac35becef4c065013be86993195b138a5fb0b8d6"
 nocross=yes
 nostrip=yes
 
 _prefix=/usr/msp430
-_target=msp430-none-elf
 
 do_configure() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	mkdir obj-msp
-	cd obj-msp
-
-	CFLAGS="-fcommon" CXXFLAGS="-std=c++11" \
-		../sources/tools/configure \
-		--prefix=$_prefix \
-		--enable-languages=c \
-		--program-prefix="msp430-" \
-		--disable-nls \
-		--enable-gold \
-		--without-x \
-		--target=$_target
-	rm -rf tcl
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	chmod +x README-build.sh
 }
 
 do_build() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	cd obj-msp
-	sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
-		../sources/tools/libgloss/Makefile.in
-	sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
-		../sources/tools/gdb/Makefile.in
-
-	make ${makejobs} DESTDIR=${DESTDIR} all
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	./README-build.sh
 }
 
 do_install() {
-	cd obj-msp
-	sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
-		msp430-none-elf/libgloss/msp430/Makefile \
-		msp430-none-elf/430/libgloss/msp430/Makefile \
-		msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/libgloss/msp430/Makefile \
-		msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/32mul/libgloss/msp430/Makefile
+	vmkdir ${_prefix}
 
-	make DESTDIR=${DESTDIR} prefix=${_prefix} install
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr /
 
-	# copy msp430-gcc-support-files.zip
-	cp ${wrksrc}/msp430-gcc-support-files/*.h \
-		${DESTDIR}/${_prefix}/${_target}/include/
-	cp ${wrksrc}/msp430-gcc-support-files/*.ld \
-		${DESTDIR}/${_prefix}/${_target}/lib/430/
+	# man pages
+	vmkdir /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man1 /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man5 /usr/share/man
+	rm -rf ${DESTDIR}/${_prefix}/share/man
 
-	mkdir -p ${DESTDIR}/usr/bin
+	# link bin
+	vmkdir /usr/bin
 	cd ${DESTDIR}/${_prefix}/bin
 	for i in *
-	do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
+		do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
 	done
+
+	# copy support files
+	vcopy ${wrksrc}/msp430-gcc-support-files/include/* ${_prefix}/include
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR REVIEW] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
@ 2023-06-15 15:11 ` benjcal
  2023-06-15 15:12 ` benjcal
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-15 15:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 190 bytes --]

New review comment by benjcal on void-packages repository

https://github.com/void-linux/void-packages/pull/44456#discussion_r1231171731

Comment:
remove unnecessary stuff for windows build

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR REVIEW] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
  2023-06-15 15:11 ` [PR REVIEW] " benjcal
@ 2023-06-15 15:12 ` benjcal
  2023-06-15 15:19 ` benjcal
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-15 15:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

New review comment by benjcal on void-packages repository

https://github.com/void-linux/void-packages/pull/44456#discussion_r1231173580

Comment:
this version of the msp430-toolchain contains a build script that, instead of copying and pasting the steps in here, it's just easier to patch it above and simply run it

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR REVIEW] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
  2023-06-15 15:11 ` [PR REVIEW] " benjcal
  2023-06-15 15:12 ` benjcal
@ 2023-06-15 15:19 ` benjcal
  2023-06-15 15:21 ` benjcal
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-15 15:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

New review comment by benjcal on void-packages repository

https://github.com/void-linux/void-packages/pull/44456#discussion_r1231182436

Comment:
is this right? `make` by itself was very slow. Maybe I could pass `makejobs` instead?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR REVIEW] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (2 preceding siblings ...)
  2023-06-15 15:19 ` benjcal
@ 2023-06-15 15:21 ` benjcal
  2023-06-15 15:22 ` [PR PATCH] [Updated] " benjcal
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-15 15:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

New review comment by benjcal on void-packages repository

https://github.com/void-linux/void-packages/pull/44456#discussion_r1231184600

Comment:
how can I trigger indexing man pages when this packages installs?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (3 preceding siblings ...)
  2023-06-15 15:21 ` benjcal
@ 2023-06-15 15:22 ` benjcal
  2023-06-17 20:12 ` benjcal
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-15 15:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

There is an updated pull request by benjcal against master on the void-packages repository

https://github.com/benjcal/void-packages msp430-toolchain-update-to-9.3.1.2
https://github.com/void-linux/void-packages/pull/44456

msp430-toolchain: update to 9.3.1.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44456.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-msp430-toolchain-update-to-9.3.1.2-44456.patch --]
[-- Type: text/x-diff, Size: 9998 bytes --]

From 8466f40a53d064ba2edf307db8f162ce3a007870 Mon Sep 17 00:00:00 2001
From: Benjamin Calderon <benj.calderon@gmail.com>
Date: Thu, 15 Jun 2023 10:50:28 -0400
Subject: [PATCH] msp430-toolchain: update to 9.3.1.2

---
 .../patches/README-build.patch                | 105 ++++++++++++++++++
 srcpkgs/msp430-toolchain/patches/gcc7.patch   |  11 --
 srcpkgs/msp430-toolchain/template             |  80 +++++--------
 3 files changed, 130 insertions(+), 66 deletions(-)
 create mode 100644 srcpkgs/msp430-toolchain/patches/README-build.patch
 delete mode 100644 srcpkgs/msp430-toolchain/patches/gcc7.patch

diff --git a/srcpkgs/msp430-toolchain/patches/README-build.patch b/srcpkgs/msp430-toolchain/patches/README-build.patch
new file mode 100644
index 000000000000..4dea9e996274
--- /dev/null
+++ b/srcpkgs/msp430-toolchain/patches/README-build.patch
@@ -0,0 +1,105 @@
+--- a/msp430-gcc-9.3.1.11-source-full/README-build.sh
++++ b/msp430-gcc-9.3.1.11-source-full/README-build.sh
+@@ -28,14 +28,13 @@
+ set -e
+ set -x
+ 
+-configure_args_common='--target=msp430-elf --enable-languages=c,c++ --disable-nls --enable-initfini-array'
++configure_args_common='--target=msp430-elf --enable-languages=c --disable-nls --enable-initfini-array --prefix=/usr/msp430'
+ # Note: binutils doesn't build without warnings on macOS
+ # https://sourceware.org/ml/binutils/2013-12/msg00051.html
+ configure_args_binutils=$(echo --disable-{sim,gdb,werror})
+ configure_args_gcc=$(echo --enable-target-optspace --enable-newlib-nano-formatted-io)
+ configure_args_gdb_common=$(echo --disable-{binutils,gas,ld,gprof,etc} --without-{mpfr,lzma} --with-static-standard-libraries --disable-source-highlight)
+ configure_args_gdb_nopy="--with-python=no"
+-configure_args_gdb_py="--with-python=python2.7 --program-prefix=msp430-elf- --program-suffix=-py"
+ 
+ pushd gcc
+   # Download sources for gcc prerequisites (gmp, mpfr, mpc, and isl)
+@@ -53,76 +52,35 @@
+   done
+ popd
+ 
+-# Download prerequisites for building MINGW GDB with python2.7 support.
+-if [[ "$configure_args_common" == *"mingw"* ]]; then
+-  python_ws=$(readlink -f mingw-python-workspace)
+-  rm -rf $python_ws
+-  mkdir $python_ws
+-  pushd $python_ws
+-    if [[ "$configure_args_common" == *"i686-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.msi
+-    elif [[ "$configure_args_common" == *"x86_64-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.amd64.msi
+-    else
+-      echo "ERROR: Unhandled value to --host configure option for python support"
+-    fi
+-    if [ ! -e ../$(basename $python_win_msi_url) ]; then
+-      curl -O $python_win_msi_url
+-    else
+-      cp ../$(basename $python_win_msi_url) .
+-    fi
+-    7za x $(basename $python_win_msi_url)
+-    # Used by python-config.sh
+-    export PYTHON_WIN=$python_ws
+-    configure_args_gdb_py="--with-python=$(readlink -f ../python-config.sh) --program-prefix=msp430-elf- --program-suffix=-py"
+-  popd
+-fi
+-
+ # Create directories
+ rm -rf build install
+ mkdir -p build/{binutils,gcc,gdb} install
+ 
+ # Build binutils
+ pushd build/binutils
+-  ../../binutils/configure $configure_args_common $configure_args_binutils --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
++  ../../binutils/configure $configure_args_common $configure_args_binutils
++  make -j
++  make install DESTDIR=$PWD/../../install
+ popd
+ 
+ # Build gcc and newlib
+ pushd build/gcc
+   (
+-    export PATH=$PWD/../../install/usr/local/bin:$PATH
+-    ../../gcc/configure $configure_args_common $configure_args_gcc --with-pkgversion="${pkg_version-$USER}"
+-    make
+-    make html
+-    make install install-html DESTDIR=$PWD/../../install
++    export PATH=$PWD/../../install/usr/msp430/bin:$PATH
++    ../../gcc/configure $configure_args_common $configure_args_gcc
++    make -j
++    make install DESTDIR=$PWD/../../install
+   )
+ popd
+ 
+ # Build GDB without python support
+ pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy --with-pkgversion="${pkg_version-$USER}"
+-  make
++  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy
++  make -j
+   make install DESTDIR=$PWD/../../install
+ popd
+ 
+-## Build GDB with python support, and the HTML documentation.
+-pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_py --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
+-  # Remove *-py versions of run and add-index, which are unnaffected by the added Python support.
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-run-py*
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-gdb-add-index-py*
+-  if [[ "$configure_args_common" == *"mingw"* ]]; then
+-    rm -rf $PYTHON_WIN
+-  fi
+-popd
+-
+-echo "Build Complete [toolchain root directory: install/usr/local/bin]"
++echo "Build Complete [toolchain root directory: install/usr/msp430/bin]"
+ exit 0
+ 
+ # The dejagnu/ directory contains a copy of msp430-sim.exp, downloaded from:
diff --git a/srcpkgs/msp430-toolchain/patches/gcc7.patch b/srcpkgs/msp430-toolchain/patches/gcc7.patch
deleted file mode 100644
index f664b41db09e..000000000000
--- a/srcpkgs/msp430-toolchain/patches/gcc7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sources/tools/gcc/config/msp430/msp430.c
-+++ b/sources/tools/gcc/config/msp430/msp430.c
-@@ -2209,7 +2209,7 @@
- }
-   const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
- 
-   CSH ("slli", 1, 1, slli_1),
-   CSH ("slll", 1, 1, slll_1),
diff --git a/srcpkgs/msp430-toolchain/template b/srcpkgs/msp430-toolchain/template
index a495ca1cb0c5..36c040d08b4c 100644
--- a/srcpkgs/msp430-toolchain/template
+++ b/srcpkgs/msp430-toolchain/template
@@ -1,81 +1,51 @@
 # Template file for 'msp430-toolchain'
 pkgname=msp430-toolchain
-version=3.05.00.00
-revision=2
+version=9.3.1.2
+revision=1
 archs="x86_64* i686*"
 create_wrksrc=yes
-hostmakedepends="unzip expect flex tar texinfo"
-makedepends="ncurses-devel"
+hostmakedepends="make gcc binutils bzip2 tar curl flex bison texinfo"
 short_desc="Toolchain for the TI MSP430 microprocessor"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Benjamin Calderon <benj.calderon@gmail.com>"
 license="GPL-2.0-only"
 homepage="http://www.ti.com/tool/msp430-gcc-opensource"
-distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
- http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
-checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
- 1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
+distfiles="https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-9.3.1.11-source-full.tar.bz2
+ https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-support-files-1.212.zip"
+checksum="095197fcd4a81d0df1ea03d62c3c3030f6024ca96df65d828c043bddde634fdd
+ 3b1a39f10a344dfefb767e60ac35becef4c065013be86993195b138a5fb0b8d6"
 nocross=yes
 nostrip=yes
 
 _prefix=/usr/msp430
-_target=msp430-none-elf
 
 do_configure() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	mkdir obj-msp
-	cd obj-msp
-
-	CFLAGS="-fcommon" CXXFLAGS="-std=c++11" \
-		../sources/tools/configure \
-		--prefix=$_prefix \
-		--enable-languages=c \
-		--program-prefix="msp430-" \
-		--disable-nls \
-		--enable-gold \
-		--without-x \
-		--target=$_target
-	rm -rf tcl
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	chmod +x README-build.sh
 }
 
 do_build() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	cd obj-msp
-	sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
-		../sources/tools/libgloss/Makefile.in
-	sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
-		../sources/tools/gdb/Makefile.in
-
-	make ${makejobs} DESTDIR=${DESTDIR} all
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	./README-build.sh
 }
 
 do_install() {
-	cd obj-msp
-	sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
-		msp430-none-elf/libgloss/msp430/Makefile \
-		msp430-none-elf/430/libgloss/msp430/Makefile \
-		msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/libgloss/msp430/Makefile \
-		msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/32mul/libgloss/msp430/Makefile
+	vmkdir ${_prefix}
 
-	make DESTDIR=${DESTDIR} prefix=${_prefix} install
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr /
 
-	# copy msp430-gcc-support-files.zip
-	cp ${wrksrc}/msp430-gcc-support-files/*.h \
-		${DESTDIR}/${_prefix}/${_target}/include/
-	cp ${wrksrc}/msp430-gcc-support-files/*.ld \
-		${DESTDIR}/${_prefix}/${_target}/lib/430/
+	# man pages
+	vmkdir /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man1 /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man5 /usr/share/man
+	rm -rf ${DESTDIR}/${_prefix}/share/man
 
-	mkdir -p ${DESTDIR}/usr/bin
+	# link bin
+	vmkdir /usr/bin
 	cd ${DESTDIR}/${_prefix}/bin
 	for i in *
-	do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
+		do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
 	done
+
+	# copy support files
+	vcopy ${wrksrc}/msp430-gcc-support-files/include/* ${_prefix}/include
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (4 preceding siblings ...)
  2023-06-15 15:22 ` [PR PATCH] [Updated] " benjcal
@ 2023-06-17 20:12 ` benjcal
  2023-06-17 20:12 ` benjcal
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-17 20:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

There is an updated pull request by benjcal against master on the void-packages repository

https://github.com/benjcal/void-packages msp430-toolchain-update-to-9.3.1.2
https://github.com/void-linux/void-packages/pull/44456

msp430-toolchain: update to 9.3.1.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44456.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-msp430-toolchain-update-to-9.3.1.2-44456.patch --]
[-- Type: text/x-diff, Size: 9998 bytes --]

From 8466f40a53d064ba2edf307db8f162ce3a007870 Mon Sep 17 00:00:00 2001
From: Benjamin Calderon <benj.calderon@gmail.com>
Date: Thu, 15 Jun 2023 10:50:28 -0400
Subject: [PATCH] msp430-toolchain: update to 9.3.1.2

---
 .../patches/README-build.patch                | 105 ++++++++++++++++++
 srcpkgs/msp430-toolchain/patches/gcc7.patch   |  11 --
 srcpkgs/msp430-toolchain/template             |  80 +++++--------
 3 files changed, 130 insertions(+), 66 deletions(-)
 create mode 100644 srcpkgs/msp430-toolchain/patches/README-build.patch
 delete mode 100644 srcpkgs/msp430-toolchain/patches/gcc7.patch

diff --git a/srcpkgs/msp430-toolchain/patches/README-build.patch b/srcpkgs/msp430-toolchain/patches/README-build.patch
new file mode 100644
index 000000000000..4dea9e996274
--- /dev/null
+++ b/srcpkgs/msp430-toolchain/patches/README-build.patch
@@ -0,0 +1,105 @@
+--- a/msp430-gcc-9.3.1.11-source-full/README-build.sh
++++ b/msp430-gcc-9.3.1.11-source-full/README-build.sh
+@@ -28,14 +28,13 @@
+ set -e
+ set -x
+ 
+-configure_args_common='--target=msp430-elf --enable-languages=c,c++ --disable-nls --enable-initfini-array'
++configure_args_common='--target=msp430-elf --enable-languages=c --disable-nls --enable-initfini-array --prefix=/usr/msp430'
+ # Note: binutils doesn't build without warnings on macOS
+ # https://sourceware.org/ml/binutils/2013-12/msg00051.html
+ configure_args_binutils=$(echo --disable-{sim,gdb,werror})
+ configure_args_gcc=$(echo --enable-target-optspace --enable-newlib-nano-formatted-io)
+ configure_args_gdb_common=$(echo --disable-{binutils,gas,ld,gprof,etc} --without-{mpfr,lzma} --with-static-standard-libraries --disable-source-highlight)
+ configure_args_gdb_nopy="--with-python=no"
+-configure_args_gdb_py="--with-python=python2.7 --program-prefix=msp430-elf- --program-suffix=-py"
+ 
+ pushd gcc
+   # Download sources for gcc prerequisites (gmp, mpfr, mpc, and isl)
+@@ -53,76 +52,35 @@
+   done
+ popd
+ 
+-# Download prerequisites for building MINGW GDB with python2.7 support.
+-if [[ "$configure_args_common" == *"mingw"* ]]; then
+-  python_ws=$(readlink -f mingw-python-workspace)
+-  rm -rf $python_ws
+-  mkdir $python_ws
+-  pushd $python_ws
+-    if [[ "$configure_args_common" == *"i686-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.msi
+-    elif [[ "$configure_args_common" == *"x86_64-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.amd64.msi
+-    else
+-      echo "ERROR: Unhandled value to --host configure option for python support"
+-    fi
+-    if [ ! -e ../$(basename $python_win_msi_url) ]; then
+-      curl -O $python_win_msi_url
+-    else
+-      cp ../$(basename $python_win_msi_url) .
+-    fi
+-    7za x $(basename $python_win_msi_url)
+-    # Used by python-config.sh
+-    export PYTHON_WIN=$python_ws
+-    configure_args_gdb_py="--with-python=$(readlink -f ../python-config.sh) --program-prefix=msp430-elf- --program-suffix=-py"
+-  popd
+-fi
+-
+ # Create directories
+ rm -rf build install
+ mkdir -p build/{binutils,gcc,gdb} install
+ 
+ # Build binutils
+ pushd build/binutils
+-  ../../binutils/configure $configure_args_common $configure_args_binutils --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
++  ../../binutils/configure $configure_args_common $configure_args_binutils
++  make -j
++  make install DESTDIR=$PWD/../../install
+ popd
+ 
+ # Build gcc and newlib
+ pushd build/gcc
+   (
+-    export PATH=$PWD/../../install/usr/local/bin:$PATH
+-    ../../gcc/configure $configure_args_common $configure_args_gcc --with-pkgversion="${pkg_version-$USER}"
+-    make
+-    make html
+-    make install install-html DESTDIR=$PWD/../../install
++    export PATH=$PWD/../../install/usr/msp430/bin:$PATH
++    ../../gcc/configure $configure_args_common $configure_args_gcc
++    make -j
++    make install DESTDIR=$PWD/../../install
+   )
+ popd
+ 
+ # Build GDB without python support
+ pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy --with-pkgversion="${pkg_version-$USER}"
+-  make
++  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy
++  make -j
+   make install DESTDIR=$PWD/../../install
+ popd
+ 
+-## Build GDB with python support, and the HTML documentation.
+-pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_py --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
+-  # Remove *-py versions of run and add-index, which are unnaffected by the added Python support.
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-run-py*
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-gdb-add-index-py*
+-  if [[ "$configure_args_common" == *"mingw"* ]]; then
+-    rm -rf $PYTHON_WIN
+-  fi
+-popd
+-
+-echo "Build Complete [toolchain root directory: install/usr/local/bin]"
++echo "Build Complete [toolchain root directory: install/usr/msp430/bin]"
+ exit 0
+ 
+ # The dejagnu/ directory contains a copy of msp430-sim.exp, downloaded from:
diff --git a/srcpkgs/msp430-toolchain/patches/gcc7.patch b/srcpkgs/msp430-toolchain/patches/gcc7.patch
deleted file mode 100644
index f664b41db09e..000000000000
--- a/srcpkgs/msp430-toolchain/patches/gcc7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sources/tools/gcc/config/msp430/msp430.c
-+++ b/sources/tools/gcc/config/msp430/msp430.c
-@@ -2209,7 +2209,7 @@
- }
-   const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
- 
-   CSH ("slli", 1, 1, slli_1),
-   CSH ("slll", 1, 1, slll_1),
diff --git a/srcpkgs/msp430-toolchain/template b/srcpkgs/msp430-toolchain/template
index a495ca1cb0c5..36c040d08b4c 100644
--- a/srcpkgs/msp430-toolchain/template
+++ b/srcpkgs/msp430-toolchain/template
@@ -1,81 +1,51 @@
 # Template file for 'msp430-toolchain'
 pkgname=msp430-toolchain
-version=3.05.00.00
-revision=2
+version=9.3.1.2
+revision=1
 archs="x86_64* i686*"
 create_wrksrc=yes
-hostmakedepends="unzip expect flex tar texinfo"
-makedepends="ncurses-devel"
+hostmakedepends="make gcc binutils bzip2 tar curl flex bison texinfo"
 short_desc="Toolchain for the TI MSP430 microprocessor"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Benjamin Calderon <benj.calderon@gmail.com>"
 license="GPL-2.0-only"
 homepage="http://www.ti.com/tool/msp430-gcc-opensource"
-distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
- http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
-checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
- 1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
+distfiles="https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-9.3.1.11-source-full.tar.bz2
+ https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-support-files-1.212.zip"
+checksum="095197fcd4a81d0df1ea03d62c3c3030f6024ca96df65d828c043bddde634fdd
+ 3b1a39f10a344dfefb767e60ac35becef4c065013be86993195b138a5fb0b8d6"
 nocross=yes
 nostrip=yes
 
 _prefix=/usr/msp430
-_target=msp430-none-elf
 
 do_configure() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	mkdir obj-msp
-	cd obj-msp
-
-	CFLAGS="-fcommon" CXXFLAGS="-std=c++11" \
-		../sources/tools/configure \
-		--prefix=$_prefix \
-		--enable-languages=c \
-		--program-prefix="msp430-" \
-		--disable-nls \
-		--enable-gold \
-		--without-x \
-		--target=$_target
-	rm -rf tcl
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	chmod +x README-build.sh
 }
 
 do_build() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	cd obj-msp
-	sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
-		../sources/tools/libgloss/Makefile.in
-	sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
-		../sources/tools/gdb/Makefile.in
-
-	make ${makejobs} DESTDIR=${DESTDIR} all
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	./README-build.sh
 }
 
 do_install() {
-	cd obj-msp
-	sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
-		msp430-none-elf/libgloss/msp430/Makefile \
-		msp430-none-elf/430/libgloss/msp430/Makefile \
-		msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/libgloss/msp430/Makefile \
-		msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/32mul/libgloss/msp430/Makefile
+	vmkdir ${_prefix}
 
-	make DESTDIR=${DESTDIR} prefix=${_prefix} install
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr /
 
-	# copy msp430-gcc-support-files.zip
-	cp ${wrksrc}/msp430-gcc-support-files/*.h \
-		${DESTDIR}/${_prefix}/${_target}/include/
-	cp ${wrksrc}/msp430-gcc-support-files/*.ld \
-		${DESTDIR}/${_prefix}/${_target}/lib/430/
+	# man pages
+	vmkdir /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man1 /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man5 /usr/share/man
+	rm -rf ${DESTDIR}/${_prefix}/share/man
 
-	mkdir -p ${DESTDIR}/usr/bin
+	# link bin
+	vmkdir /usr/bin
 	cd ${DESTDIR}/${_prefix}/bin
 	for i in *
-	do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
+		do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
 	done
+
+	# copy support files
+	vcopy ${wrksrc}/msp430-gcc-support-files/include/* ${_prefix}/include
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (5 preceding siblings ...)
  2023-06-17 20:12 ` benjcal
@ 2023-06-17 20:12 ` benjcal
  2023-06-18 18:31 ` benjcal
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-17 20:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

There is an updated pull request by benjcal against master on the void-packages repository

https://github.com/benjcal/void-packages msp430-toolchain-update-to-9.3.1.2
https://github.com/void-linux/void-packages/pull/44456

msp430-toolchain: update to 9.3.1.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44456.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-msp430-toolchain-update-to-9.3.1.2-44456.patch --]
[-- Type: text/x-diff, Size: 9998 bytes --]

From 8466f40a53d064ba2edf307db8f162ce3a007870 Mon Sep 17 00:00:00 2001
From: Benjamin Calderon <benj.calderon@gmail.com>
Date: Thu, 15 Jun 2023 10:50:28 -0400
Subject: [PATCH] msp430-toolchain: update to 9.3.1.2

---
 .../patches/README-build.patch                | 105 ++++++++++++++++++
 srcpkgs/msp430-toolchain/patches/gcc7.patch   |  11 --
 srcpkgs/msp430-toolchain/template             |  80 +++++--------
 3 files changed, 130 insertions(+), 66 deletions(-)
 create mode 100644 srcpkgs/msp430-toolchain/patches/README-build.patch
 delete mode 100644 srcpkgs/msp430-toolchain/patches/gcc7.patch

diff --git a/srcpkgs/msp430-toolchain/patches/README-build.patch b/srcpkgs/msp430-toolchain/patches/README-build.patch
new file mode 100644
index 000000000000..4dea9e996274
--- /dev/null
+++ b/srcpkgs/msp430-toolchain/patches/README-build.patch
@@ -0,0 +1,105 @@
+--- a/msp430-gcc-9.3.1.11-source-full/README-build.sh
++++ b/msp430-gcc-9.3.1.11-source-full/README-build.sh
+@@ -28,14 +28,13 @@
+ set -e
+ set -x
+ 
+-configure_args_common='--target=msp430-elf --enable-languages=c,c++ --disable-nls --enable-initfini-array'
++configure_args_common='--target=msp430-elf --enable-languages=c --disable-nls --enable-initfini-array --prefix=/usr/msp430'
+ # Note: binutils doesn't build without warnings on macOS
+ # https://sourceware.org/ml/binutils/2013-12/msg00051.html
+ configure_args_binutils=$(echo --disable-{sim,gdb,werror})
+ configure_args_gcc=$(echo --enable-target-optspace --enable-newlib-nano-formatted-io)
+ configure_args_gdb_common=$(echo --disable-{binutils,gas,ld,gprof,etc} --without-{mpfr,lzma} --with-static-standard-libraries --disable-source-highlight)
+ configure_args_gdb_nopy="--with-python=no"
+-configure_args_gdb_py="--with-python=python2.7 --program-prefix=msp430-elf- --program-suffix=-py"
+ 
+ pushd gcc
+   # Download sources for gcc prerequisites (gmp, mpfr, mpc, and isl)
+@@ -53,76 +52,35 @@
+   done
+ popd
+ 
+-# Download prerequisites for building MINGW GDB with python2.7 support.
+-if [[ "$configure_args_common" == *"mingw"* ]]; then
+-  python_ws=$(readlink -f mingw-python-workspace)
+-  rm -rf $python_ws
+-  mkdir $python_ws
+-  pushd $python_ws
+-    if [[ "$configure_args_common" == *"i686-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.msi
+-    elif [[ "$configure_args_common" == *"x86_64-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.amd64.msi
+-    else
+-      echo "ERROR: Unhandled value to --host configure option for python support"
+-    fi
+-    if [ ! -e ../$(basename $python_win_msi_url) ]; then
+-      curl -O $python_win_msi_url
+-    else
+-      cp ../$(basename $python_win_msi_url) .
+-    fi
+-    7za x $(basename $python_win_msi_url)
+-    # Used by python-config.sh
+-    export PYTHON_WIN=$python_ws
+-    configure_args_gdb_py="--with-python=$(readlink -f ../python-config.sh) --program-prefix=msp430-elf- --program-suffix=-py"
+-  popd
+-fi
+-
+ # Create directories
+ rm -rf build install
+ mkdir -p build/{binutils,gcc,gdb} install
+ 
+ # Build binutils
+ pushd build/binutils
+-  ../../binutils/configure $configure_args_common $configure_args_binutils --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
++  ../../binutils/configure $configure_args_common $configure_args_binutils
++  make -j
++  make install DESTDIR=$PWD/../../install
+ popd
+ 
+ # Build gcc and newlib
+ pushd build/gcc
+   (
+-    export PATH=$PWD/../../install/usr/local/bin:$PATH
+-    ../../gcc/configure $configure_args_common $configure_args_gcc --with-pkgversion="${pkg_version-$USER}"
+-    make
+-    make html
+-    make install install-html DESTDIR=$PWD/../../install
++    export PATH=$PWD/../../install/usr/msp430/bin:$PATH
++    ../../gcc/configure $configure_args_common $configure_args_gcc
++    make -j
++    make install DESTDIR=$PWD/../../install
+   )
+ popd
+ 
+ # Build GDB without python support
+ pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy --with-pkgversion="${pkg_version-$USER}"
+-  make
++  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy
++  make -j
+   make install DESTDIR=$PWD/../../install
+ popd
+ 
+-## Build GDB with python support, and the HTML documentation.
+-pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_py --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
+-  # Remove *-py versions of run and add-index, which are unnaffected by the added Python support.
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-run-py*
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-gdb-add-index-py*
+-  if [[ "$configure_args_common" == *"mingw"* ]]; then
+-    rm -rf $PYTHON_WIN
+-  fi
+-popd
+-
+-echo "Build Complete [toolchain root directory: install/usr/local/bin]"
++echo "Build Complete [toolchain root directory: install/usr/msp430/bin]"
+ exit 0
+ 
+ # The dejagnu/ directory contains a copy of msp430-sim.exp, downloaded from:
diff --git a/srcpkgs/msp430-toolchain/patches/gcc7.patch b/srcpkgs/msp430-toolchain/patches/gcc7.patch
deleted file mode 100644
index f664b41db09e..000000000000
--- a/srcpkgs/msp430-toolchain/patches/gcc7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sources/tools/gcc/config/msp430/msp430.c
-+++ b/sources/tools/gcc/config/msp430/msp430.c
-@@ -2209,7 +2209,7 @@
- }
-   const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
- 
-   CSH ("slli", 1, 1, slli_1),
-   CSH ("slll", 1, 1, slll_1),
diff --git a/srcpkgs/msp430-toolchain/template b/srcpkgs/msp430-toolchain/template
index a495ca1cb0c5..36c040d08b4c 100644
--- a/srcpkgs/msp430-toolchain/template
+++ b/srcpkgs/msp430-toolchain/template
@@ -1,81 +1,51 @@
 # Template file for 'msp430-toolchain'
 pkgname=msp430-toolchain
-version=3.05.00.00
-revision=2
+version=9.3.1.2
+revision=1
 archs="x86_64* i686*"
 create_wrksrc=yes
-hostmakedepends="unzip expect flex tar texinfo"
-makedepends="ncurses-devel"
+hostmakedepends="make gcc binutils bzip2 tar curl flex bison texinfo"
 short_desc="Toolchain for the TI MSP430 microprocessor"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Benjamin Calderon <benj.calderon@gmail.com>"
 license="GPL-2.0-only"
 homepage="http://www.ti.com/tool/msp430-gcc-opensource"
-distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
- http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
-checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
- 1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
+distfiles="https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-9.3.1.11-source-full.tar.bz2
+ https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-support-files-1.212.zip"
+checksum="095197fcd4a81d0df1ea03d62c3c3030f6024ca96df65d828c043bddde634fdd
+ 3b1a39f10a344dfefb767e60ac35becef4c065013be86993195b138a5fb0b8d6"
 nocross=yes
 nostrip=yes
 
 _prefix=/usr/msp430
-_target=msp430-none-elf
 
 do_configure() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	mkdir obj-msp
-	cd obj-msp
-
-	CFLAGS="-fcommon" CXXFLAGS="-std=c++11" \
-		../sources/tools/configure \
-		--prefix=$_prefix \
-		--enable-languages=c \
-		--program-prefix="msp430-" \
-		--disable-nls \
-		--enable-gold \
-		--without-x \
-		--target=$_target
-	rm -rf tcl
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	chmod +x README-build.sh
 }
 
 do_build() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	cd obj-msp
-	sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
-		../sources/tools/libgloss/Makefile.in
-	sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
-		../sources/tools/gdb/Makefile.in
-
-	make ${makejobs} DESTDIR=${DESTDIR} all
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	./README-build.sh
 }
 
 do_install() {
-	cd obj-msp
-	sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
-		msp430-none-elf/libgloss/msp430/Makefile \
-		msp430-none-elf/430/libgloss/msp430/Makefile \
-		msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/libgloss/msp430/Makefile \
-		msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/32mul/libgloss/msp430/Makefile
+	vmkdir ${_prefix}
 
-	make DESTDIR=${DESTDIR} prefix=${_prefix} install
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr /
 
-	# copy msp430-gcc-support-files.zip
-	cp ${wrksrc}/msp430-gcc-support-files/*.h \
-		${DESTDIR}/${_prefix}/${_target}/include/
-	cp ${wrksrc}/msp430-gcc-support-files/*.ld \
-		${DESTDIR}/${_prefix}/${_target}/lib/430/
+	# man pages
+	vmkdir /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man1 /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man5 /usr/share/man
+	rm -rf ${DESTDIR}/${_prefix}/share/man
 
-	mkdir -p ${DESTDIR}/usr/bin
+	# link bin
+	vmkdir /usr/bin
 	cd ${DESTDIR}/${_prefix}/bin
 	for i in *
-	do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
+		do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
 	done
+
+	# copy support files
+	vcopy ${wrksrc}/msp430-gcc-support-files/include/* ${_prefix}/include
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (6 preceding siblings ...)
  2023-06-17 20:12 ` benjcal
@ 2023-06-18 18:31 ` benjcal
  2023-06-18 20:41 ` benjcal
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-18 18:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

There is an updated pull request by benjcal against master on the void-packages repository

https://github.com/benjcal/void-packages msp430-toolchain-update-to-9.3.1.2
https://github.com/void-linux/void-packages/pull/44456

msp430-toolchain: update to 9.3.1.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44456.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-msp430-toolchain-update-to-9.3.1.2-44456.patch --]
[-- Type: text/x-diff, Size: 9998 bytes --]

From 8466f40a53d064ba2edf307db8f162ce3a007870 Mon Sep 17 00:00:00 2001
From: Benjamin Calderon <benj.calderon@gmail.com>
Date: Thu, 15 Jun 2023 10:50:28 -0400
Subject: [PATCH] msp430-toolchain: update to 9.3.1.2

---
 .../patches/README-build.patch                | 105 ++++++++++++++++++
 srcpkgs/msp430-toolchain/patches/gcc7.patch   |  11 --
 srcpkgs/msp430-toolchain/template             |  80 +++++--------
 3 files changed, 130 insertions(+), 66 deletions(-)
 create mode 100644 srcpkgs/msp430-toolchain/patches/README-build.patch
 delete mode 100644 srcpkgs/msp430-toolchain/patches/gcc7.patch

diff --git a/srcpkgs/msp430-toolchain/patches/README-build.patch b/srcpkgs/msp430-toolchain/patches/README-build.patch
new file mode 100644
index 000000000000..4dea9e996274
--- /dev/null
+++ b/srcpkgs/msp430-toolchain/patches/README-build.patch
@@ -0,0 +1,105 @@
+--- a/msp430-gcc-9.3.1.11-source-full/README-build.sh
++++ b/msp430-gcc-9.3.1.11-source-full/README-build.sh
+@@ -28,14 +28,13 @@
+ set -e
+ set -x
+ 
+-configure_args_common='--target=msp430-elf --enable-languages=c,c++ --disable-nls --enable-initfini-array'
++configure_args_common='--target=msp430-elf --enable-languages=c --disable-nls --enable-initfini-array --prefix=/usr/msp430'
+ # Note: binutils doesn't build without warnings on macOS
+ # https://sourceware.org/ml/binutils/2013-12/msg00051.html
+ configure_args_binutils=$(echo --disable-{sim,gdb,werror})
+ configure_args_gcc=$(echo --enable-target-optspace --enable-newlib-nano-formatted-io)
+ configure_args_gdb_common=$(echo --disable-{binutils,gas,ld,gprof,etc} --without-{mpfr,lzma} --with-static-standard-libraries --disable-source-highlight)
+ configure_args_gdb_nopy="--with-python=no"
+-configure_args_gdb_py="--with-python=python2.7 --program-prefix=msp430-elf- --program-suffix=-py"
+ 
+ pushd gcc
+   # Download sources for gcc prerequisites (gmp, mpfr, mpc, and isl)
+@@ -53,76 +52,35 @@
+   done
+ popd
+ 
+-# Download prerequisites for building MINGW GDB with python2.7 support.
+-if [[ "$configure_args_common" == *"mingw"* ]]; then
+-  python_ws=$(readlink -f mingw-python-workspace)
+-  rm -rf $python_ws
+-  mkdir $python_ws
+-  pushd $python_ws
+-    if [[ "$configure_args_common" == *"i686-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.msi
+-    elif [[ "$configure_args_common" == *"x86_64-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.amd64.msi
+-    else
+-      echo "ERROR: Unhandled value to --host configure option for python support"
+-    fi
+-    if [ ! -e ../$(basename $python_win_msi_url) ]; then
+-      curl -O $python_win_msi_url
+-    else
+-      cp ../$(basename $python_win_msi_url) .
+-    fi
+-    7za x $(basename $python_win_msi_url)
+-    # Used by python-config.sh
+-    export PYTHON_WIN=$python_ws
+-    configure_args_gdb_py="--with-python=$(readlink -f ../python-config.sh) --program-prefix=msp430-elf- --program-suffix=-py"
+-  popd
+-fi
+-
+ # Create directories
+ rm -rf build install
+ mkdir -p build/{binutils,gcc,gdb} install
+ 
+ # Build binutils
+ pushd build/binutils
+-  ../../binutils/configure $configure_args_common $configure_args_binutils --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
++  ../../binutils/configure $configure_args_common $configure_args_binutils
++  make -j
++  make install DESTDIR=$PWD/../../install
+ popd
+ 
+ # Build gcc and newlib
+ pushd build/gcc
+   (
+-    export PATH=$PWD/../../install/usr/local/bin:$PATH
+-    ../../gcc/configure $configure_args_common $configure_args_gcc --with-pkgversion="${pkg_version-$USER}"
+-    make
+-    make html
+-    make install install-html DESTDIR=$PWD/../../install
++    export PATH=$PWD/../../install/usr/msp430/bin:$PATH
++    ../../gcc/configure $configure_args_common $configure_args_gcc
++    make -j
++    make install DESTDIR=$PWD/../../install
+   )
+ popd
+ 
+ # Build GDB without python support
+ pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy --with-pkgversion="${pkg_version-$USER}"
+-  make
++  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy
++  make -j
+   make install DESTDIR=$PWD/../../install
+ popd
+ 
+-## Build GDB with python support, and the HTML documentation.
+-pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_py --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
+-  # Remove *-py versions of run and add-index, which are unnaffected by the added Python support.
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-run-py*
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-gdb-add-index-py*
+-  if [[ "$configure_args_common" == *"mingw"* ]]; then
+-    rm -rf $PYTHON_WIN
+-  fi
+-popd
+-
+-echo "Build Complete [toolchain root directory: install/usr/local/bin]"
++echo "Build Complete [toolchain root directory: install/usr/msp430/bin]"
+ exit 0
+ 
+ # The dejagnu/ directory contains a copy of msp430-sim.exp, downloaded from:
diff --git a/srcpkgs/msp430-toolchain/patches/gcc7.patch b/srcpkgs/msp430-toolchain/patches/gcc7.patch
deleted file mode 100644
index f664b41db09e..000000000000
--- a/srcpkgs/msp430-toolchain/patches/gcc7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sources/tools/gcc/config/msp430/msp430.c
-+++ b/sources/tools/gcc/config/msp430/msp430.c
-@@ -2209,7 +2209,7 @@
- }
-   const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
- 
-   CSH ("slli", 1, 1, slli_1),
-   CSH ("slll", 1, 1, slll_1),
diff --git a/srcpkgs/msp430-toolchain/template b/srcpkgs/msp430-toolchain/template
index a495ca1cb0c5..36c040d08b4c 100644
--- a/srcpkgs/msp430-toolchain/template
+++ b/srcpkgs/msp430-toolchain/template
@@ -1,81 +1,51 @@
 # Template file for 'msp430-toolchain'
 pkgname=msp430-toolchain
-version=3.05.00.00
-revision=2
+version=9.3.1.2
+revision=1
 archs="x86_64* i686*"
 create_wrksrc=yes
-hostmakedepends="unzip expect flex tar texinfo"
-makedepends="ncurses-devel"
+hostmakedepends="make gcc binutils bzip2 tar curl flex bison texinfo"
 short_desc="Toolchain for the TI MSP430 microprocessor"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Benjamin Calderon <benj.calderon@gmail.com>"
 license="GPL-2.0-only"
 homepage="http://www.ti.com/tool/msp430-gcc-opensource"
-distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
- http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
-checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
- 1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
+distfiles="https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-9.3.1.11-source-full.tar.bz2
+ https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-support-files-1.212.zip"
+checksum="095197fcd4a81d0df1ea03d62c3c3030f6024ca96df65d828c043bddde634fdd
+ 3b1a39f10a344dfefb767e60ac35becef4c065013be86993195b138a5fb0b8d6"
 nocross=yes
 nostrip=yes
 
 _prefix=/usr/msp430
-_target=msp430-none-elf
 
 do_configure() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	mkdir obj-msp
-	cd obj-msp
-
-	CFLAGS="-fcommon" CXXFLAGS="-std=c++11" \
-		../sources/tools/configure \
-		--prefix=$_prefix \
-		--enable-languages=c \
-		--program-prefix="msp430-" \
-		--disable-nls \
-		--enable-gold \
-		--without-x \
-		--target=$_target
-	rm -rf tcl
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	chmod +x README-build.sh
 }
 
 do_build() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	cd obj-msp
-	sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
-		../sources/tools/libgloss/Makefile.in
-	sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
-		../sources/tools/gdb/Makefile.in
-
-	make ${makejobs} DESTDIR=${DESTDIR} all
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	./README-build.sh
 }
 
 do_install() {
-	cd obj-msp
-	sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
-		msp430-none-elf/libgloss/msp430/Makefile \
-		msp430-none-elf/430/libgloss/msp430/Makefile \
-		msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/libgloss/msp430/Makefile \
-		msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/32mul/libgloss/msp430/Makefile
+	vmkdir ${_prefix}
 
-	make DESTDIR=${DESTDIR} prefix=${_prefix} install
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr /
 
-	# copy msp430-gcc-support-files.zip
-	cp ${wrksrc}/msp430-gcc-support-files/*.h \
-		${DESTDIR}/${_prefix}/${_target}/include/
-	cp ${wrksrc}/msp430-gcc-support-files/*.ld \
-		${DESTDIR}/${_prefix}/${_target}/lib/430/
+	# man pages
+	vmkdir /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man1 /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man5 /usr/share/man
+	rm -rf ${DESTDIR}/${_prefix}/share/man
 
-	mkdir -p ${DESTDIR}/usr/bin
+	# link bin
+	vmkdir /usr/bin
 	cd ${DESTDIR}/${_prefix}/bin
 	for i in *
-	do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
+		do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
 	done
+
+	# copy support files
+	vcopy ${wrksrc}/msp430-gcc-support-files/include/* ${_prefix}/include
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (7 preceding siblings ...)
  2023-06-18 18:31 ` benjcal
@ 2023-06-18 20:41 ` benjcal
  2023-06-19  2:20 ` benjcal
  2023-07-26 13:59 ` [PR PATCH] [Closed]: " benjcal
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-18 20:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

There is an updated pull request by benjcal against master on the void-packages repository

https://github.com/benjcal/void-packages msp430-toolchain-update-to-9.3.1.2
https://github.com/void-linux/void-packages/pull/44456

msp430-toolchain: update to 9.3.1.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/44456.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-msp430-toolchain-update-to-9.3.1.2-44456.patch --]
[-- Type: text/x-diff, Size: 9989 bytes --]

From e70e28f5195d477152a5374fa5b90b38e3b2041c Mon Sep 17 00:00:00 2001
From: Benjamin Calderon <benj.calderon@gmail.com>
Date: Thu, 15 Jun 2023 10:50:28 -0400
Subject: [PATCH] msp430-toolchain: update to 9.3.1.2

---
 .../patches/README-build.patch                | 105 ++++++++++++++++++
 srcpkgs/msp430-toolchain/patches/gcc7.patch   |  11 --
 srcpkgs/msp430-toolchain/template             |  80 +++++--------
 3 files changed, 130 insertions(+), 66 deletions(-)
 create mode 100644 srcpkgs/msp430-toolchain/patches/README-build.patch
 delete mode 100644 srcpkgs/msp430-toolchain/patches/gcc7.patch

diff --git a/srcpkgs/msp430-toolchain/patches/README-build.patch b/srcpkgs/msp430-toolchain/patches/README-build.patch
new file mode 100644
index 000000000000..ca36ed0b818f
--- /dev/null
+++ b/srcpkgs/msp430-toolchain/patches/README-build.patch
@@ -0,0 +1,105 @@
+--- a/msp430-gcc-9.3.1.11-source-full/README-build.sh
++++ b/msp430-gcc-9.3.1.11-source-full/README-build.sh
+@@ -28,14 +28,13 @@
+ set -e
+ set -x
+ 
+-configure_args_common='--target=msp430-elf --enable-languages=c,c++ --disable-nls --enable-initfini-array'
++configure_args_common='--target=msp430-elf --enable-languages=c --disable-nls --enable-initfini-array --prefix=/usr/msp430'
+ # Note: binutils doesn't build without warnings on macOS
+ # https://sourceware.org/ml/binutils/2013-12/msg00051.html
+ configure_args_binutils=$(echo --disable-{sim,gdb,werror})
+ configure_args_gcc=$(echo --enable-target-optspace --enable-newlib-nano-formatted-io)
+ configure_args_gdb_common=$(echo --disable-{binutils,gas,ld,gprof,etc} --without-{mpfr,lzma} --with-static-standard-libraries --disable-source-highlight)
+ configure_args_gdb_nopy="--with-python=no"
+-configure_args_gdb_py="--with-python=python2.7 --program-prefix=msp430-elf- --program-suffix=-py"
+ 
+ pushd gcc
+   # Download sources for gcc prerequisites (gmp, mpfr, mpc, and isl)
+@@ -53,76 +52,35 @@
+   done
+ popd
+ 
+-# Download prerequisites for building MINGW GDB with python2.7 support.
+-if [[ "$configure_args_common" == *"mingw"* ]]; then
+-  python_ws=$(readlink -f mingw-python-workspace)
+-  rm -rf $python_ws
+-  mkdir $python_ws
+-  pushd $python_ws
+-    if [[ "$configure_args_common" == *"i686-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.msi
+-    elif [[ "$configure_args_common" == *"x86_64-w64-mingw32"* ]]; then
+-      python_win_msi_url=https://www.python.org/ftp/python/2.7.17/python-2.7.17.amd64.msi
+-    else
+-      echo "ERROR: Unhandled value to --host configure option for python support"
+-    fi
+-    if [ ! -e ../$(basename $python_win_msi_url) ]; then
+-      curl -O $python_win_msi_url
+-    else
+-      cp ../$(basename $python_win_msi_url) .
+-    fi
+-    7za x $(basename $python_win_msi_url)
+-    # Used by python-config.sh
+-    export PYTHON_WIN=$python_ws
+-    configure_args_gdb_py="--with-python=$(readlink -f ../python-config.sh) --program-prefix=msp430-elf- --program-suffix=-py"
+-  popd
+-fi
+-
+ # Create directories
+ rm -rf build install
+ mkdir -p build/{binutils,gcc,gdb} install
+ 
+ # Build binutils
+ pushd build/binutils
+-  ../../binutils/configure $configure_args_common $configure_args_binutils --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
++  ../../binutils/configure $configure_args_common $configure_args_binutils
++  make
++  make install DESTDIR=$PWD/../../install
+ popd
+ 
+ # Build gcc and newlib
+ pushd build/gcc
+   (
+-    export PATH=$PWD/../../install/usr/local/bin:$PATH
+-    ../../gcc/configure $configure_args_common $configure_args_gcc --with-pkgversion="${pkg_version-$USER}"
+-    make
+-    make html
+-    make install install-html DESTDIR=$PWD/../../install
++    export PATH=$PWD/../../install/usr/msp430/bin:$PATH
++    ../../gcc/configure $configure_args_common $configure_args_gcc
++    make
++    make install DESTDIR=$PWD/../../install
+   )
+ popd
+ 
+ # Build GDB without python support
+ pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy --with-pkgversion="${pkg_version-$USER}"
+-  make
++  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_nopy
++  make
+   make install DESTDIR=$PWD/../../install
+ popd
+ 
+-## Build GDB with python support, and the HTML documentation.
+-pushd build/gdb
+-  ../../gdb/configure $configure_args_common $configure_args_gdb_common $configure_args_gdb_py --with-pkgversion="${pkg_version-$USER}"
+-  make
+-  make html
+-  make install install-html DESTDIR=$PWD/../../install
+-  # Remove *-py versions of run and add-index, which are unnaffected by the added Python support.
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-run-py*
+-  rm $PWD/../../install/usr/local/bin/msp430-elf-gdb-add-index-py*
+-  if [[ "$configure_args_common" == *"mingw"* ]]; then
+-    rm -rf $PYTHON_WIN
+-  fi
+-popd
+-
+-echo "Build Complete [toolchain root directory: install/usr/local/bin]"
++echo "Build Complete [toolchain root directory: install/usr/msp430/bin]"
+ exit 0
+ 
+ # The dejagnu/ directory contains a copy of msp430-sim.exp, downloaded from:
diff --git a/srcpkgs/msp430-toolchain/patches/gcc7.patch b/srcpkgs/msp430-toolchain/patches/gcc7.patch
deleted file mode 100644
index f664b41db09e..000000000000
--- a/srcpkgs/msp430-toolchain/patches/gcc7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sources/tools/gcc/config/msp430/msp430.c
-+++ b/sources/tools/gcc/config/msp430/msp430.c
-@@ -2209,7 +2209,7 @@
- }
-   const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
- 
-   CSH ("slli", 1, 1, slli_1),
-   CSH ("slll", 1, 1, slll_1),
diff --git a/srcpkgs/msp430-toolchain/template b/srcpkgs/msp430-toolchain/template
index a495ca1cb0c5..36c040d08b4c 100644
--- a/srcpkgs/msp430-toolchain/template
+++ b/srcpkgs/msp430-toolchain/template
@@ -1,81 +1,51 @@
 # Template file for 'msp430-toolchain'
 pkgname=msp430-toolchain
-version=3.05.00.00
-revision=2
+version=9.3.1.2
+revision=1
 archs="x86_64* i686*"
 create_wrksrc=yes
-hostmakedepends="unzip expect flex tar texinfo"
-makedepends="ncurses-devel"
+hostmakedepends="make gcc binutils bzip2 tar curl flex bison texinfo"
 short_desc="Toolchain for the TI MSP430 microprocessor"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Benjamin Calderon <benj.calderon@gmail.com>"
 license="GPL-2.0-only"
 homepage="http://www.ti.com/tool/msp430-gcc-opensource"
-distfiles="http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-source.tar.bz2
- http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${version//./_}/exports/msp430-gcc-support-files.zip"
-checksum="d2110ec64e8a055ff89b7eef8217b3c233c30e370e2cb43e1ad835dad5907d1c
- 1e2a0903e6b02d5e8aac2a7297ec0685e95a980b13b937b5c7f24f4cf6015407"
+distfiles="https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-9.3.1.11-source-full.tar.bz2
+ https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-support-files-1.212.zip"
+checksum="095197fcd4a81d0df1ea03d62c3c3030f6024ca96df65d828c043bddde634fdd
+ 3b1a39f10a344dfefb767e60ac35becef4c065013be86993195b138a5fb0b8d6"
 nocross=yes
 nostrip=yes
 
 _prefix=/usr/msp430
-_target=msp430-none-elf
 
 do_configure() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	mkdir obj-msp
-	cd obj-msp
-
-	CFLAGS="-fcommon" CXXFLAGS="-std=c++11" \
-		../sources/tools/configure \
-		--prefix=$_prefix \
-		--enable-languages=c \
-		--program-prefix="msp430-" \
-		--disable-nls \
-		--enable-gold \
-		--without-x \
-		--target=$_target
-	rm -rf tcl
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	chmod +x README-build.sh
 }
 
 do_build() {
-	unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
-
-	cd obj-msp
-	sed -i 's:^prefix =.*:prefix = '${DESTDIR}'/@prefix@:' \
-		../sources/tools/libgloss/Makefile.in
-	sed -i 's:^LIBEXPAT .*:LIBEXPAT = @LIBEXPAT@ @BDYNAMIC@:' \
-		../sources/tools/gdb/Makefile.in
-
-	make ${makejobs} DESTDIR=${DESTDIR} all
+	cd ${wrksrc}/msp430-gcc-9.3.1.11-source-full
+	./README-build.sh
 }
 
 do_install() {
-	cd obj-msp
-	sed -i '190,194s:$(tooldir):'${DESTDIR}'/$(tooldir):' \
-		msp430-none-elf/libgloss/msp430/Makefile \
-		msp430-none-elf/430/libgloss/msp430/Makefile \
-		msp430-none-elf/430/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/430/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/32mul/libgloss/msp430/Makefile \
-		msp430-none-elf/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/libgloss/msp430/Makefile \
-		msp430-none-elf/large/nomul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/f5mul/libgloss/msp430/Makefile \
-		msp430-none-elf/large/32mul/libgloss/msp430/Makefile
+	vmkdir ${_prefix}
 
-	make DESTDIR=${DESTDIR} prefix=${_prefix} install
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr /
 
-	# copy msp430-gcc-support-files.zip
-	cp ${wrksrc}/msp430-gcc-support-files/*.h \
-		${DESTDIR}/${_prefix}/${_target}/include/
-	cp ${wrksrc}/msp430-gcc-support-files/*.ld \
-		${DESTDIR}/${_prefix}/${_target}/lib/430/
+	# man pages
+	vmkdir /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man1 /usr/share/man
+	vcopy ${wrksrc}/msp430-gcc-9.3.1.11-source-full/install/usr/msp430/share/man/man5 /usr/share/man
+	rm -rf ${DESTDIR}/${_prefix}/share/man
 
-	mkdir -p ${DESTDIR}/usr/bin
+	# link bin
+	vmkdir /usr/bin
 	cd ${DESTDIR}/${_prefix}/bin
 	for i in *
-	do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
+		do ln -s ${_prefix}/bin/$i ${DESTDIR}/usr/bin/$i
 	done
+
+	# copy support files
+	vcopy ${wrksrc}/msp430-gcc-support-files/include/* ${_prefix}/include
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (8 preceding siblings ...)
  2023-06-18 20:41 ` benjcal
@ 2023-06-19  2:20 ` benjcal
  2023-07-26 13:59 ` [PR PATCH] [Closed]: " benjcal
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-06-19  2:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

New comment by benjcal on void-packages repository

https://github.com/void-linux/void-packages/pull/44456#issuecomment-1596388291

Comment:
@classabbyamp does this looks good or do I still need to make a new PR? I don't see any merge conflicts

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Closed]: msp430-toolchain: update to 9.3.1.2
  2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
                   ` (9 preceding siblings ...)
  2023-06-19  2:20 ` benjcal
@ 2023-07-26 13:59 ` benjcal
  10 siblings, 0 replies; 12+ messages in thread
From: benjcal @ 2023-07-26 13:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

There's a closed pull request on the void-packages repository

msp430-toolchain: update to 9.3.1.2
https://github.com/void-linux/void-packages/pull/44456

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-26 13:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 15:10 [PR PATCH] msp430-toolchain: update to 9.3.1.2 benjcal
2023-06-15 15:11 ` [PR REVIEW] " benjcal
2023-06-15 15:12 ` benjcal
2023-06-15 15:19 ` benjcal
2023-06-15 15:21 ` benjcal
2023-06-15 15:22 ` [PR PATCH] [Updated] " benjcal
2023-06-17 20:12 ` benjcal
2023-06-17 20:12 ` benjcal
2023-06-18 18:31 ` benjcal
2023-06-18 20:41 ` benjcal
2023-06-19  2:20 ` benjcal
2023-07-26 13:59 ` [PR PATCH] [Closed]: " benjcal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).