Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (93858fc144467cb7400f2c3eaf9b2391c243f961)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (93858fc144467cb7400f2c3eaf9b2391c243f961)
  • Date: Tue, 11 Jun 2024 19:34:31 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

ChangeLog | 3
devel/shfmt/BUILD | 9 ++
devel/shfmt/DEPENDS | 5 +
devel/shfmt/DETAILS | 14 +++
devel/shfmt/HISTORY | 2
devel/shfmt/INSTALL | 4
gnu/gcc/HISTORY | 4
gnu/gcc/patches/0014-Avoid-memory-poisoning-on-musl.patch | 61
++++++++++++++
8 files changed, 102 insertions(+)

New commits:
commit 93858fc144467cb7400f2c3eaf9b2391c243f961
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

shfmt: new spell, shfmt formats shell programs

commit 7676724ddc94ca62e310ce3a5ee2b507578d8477
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

gcc: Fix build of GCC 14.1.0 against musl

diff --git a/ChangeLog b/ChangeLog
index d831590..ed58f43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2024-06-11 Ismael Luceno <ismael AT sourcemage.org>
+ * devel/shfmt: new spell, shfmt formats shell programs
+
2024-06-05 Treeve Jelbert <treeve AT sourcemage.org>
* http/litehtml: added, lightweight html parser

diff --git a/devel/shfmt/BUILD b/devel/shfmt/BUILD
new file mode 100755
index 0000000..f20dbfc
--- /dev/null
+++ b/devel/shfmt/BUILD
@@ -0,0 +1,9 @@
+export GOROOT="$INSTALL_ROOT"/opt/go \
+ GOPROXY='proxy.golang.org,direct' \
+ GOCACHE="$SOURCE_DIRECTORY"/.gocache &&
+go build -v \
+ -ldflags "-X main.version=$VERSION-${PATCHLEVEL:-0}" \
+ ./cmd/shfmt &&
+if is_depends_enabled "$SPELL" scdoc; then
+ scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1
+fi
diff --git a/devel/shfmt/DEPENDS b/devel/shfmt/DEPENDS
new file mode 100755
index 0000000..1682d00
--- /dev/null
+++ b/devel/shfmt/DEPENDS
@@ -0,0 +1,5 @@
+depends go &&
+optional_depends scdoc \
+ "" \
+ "" \
+ "to build manpage"
diff --git a/devel/shfmt/DETAILS b/devel/shfmt/DETAILS
new file mode 100755
index 0000000..c1e5578
--- /dev/null
+++ b/devel/shfmt/DETAILS
@@ -0,0 +1,14 @@
+ SPELL=shfmt
+ VERSION=3.8.0
+ SOURCE="sh-$VERSION.tar.gz"
+
SOURCE_URL[0]=https://github.com/mvdan/sh/archive/refs/tags/v$VERSION.tar.gz
+
SOURCE_HASH=sha512:fbeba1883f9458c480663c31d51beaffb780205f5251cae956f6582d494109e21e062e444f7436db220fb647e833ec48498fa1f75daa7fa7ec88ba1f564d4213
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/sh-$VERSION"
+ WEB_SITE="https://mvdan.cc/sh";
+ LICENSE[0]="BSD-3-Clause"
+ ENTERED=20240611
+ KEYWORDS=""
+ SHORT="shfmt formats shell programs"
+cat << EOF
+A formatter for shell programs. Supports POSIX Shell, Bash, and mksh.
+EOF
diff --git a/devel/shfmt/HISTORY b/devel/shfmt/HISTORY
new file mode 100644
index 0000000..c08b192
--- /dev/null
+++ b/devel/shfmt/HISTORY
@@ -0,0 +1,2 @@
+2024-06-11 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, DEPENDS, DETAILS, INSTALL: spell created
diff --git a/devel/shfmt/INSTALL b/devel/shfmt/INSTALL
new file mode 100755
index 0000000..222ce8f
--- /dev/null
+++ b/devel/shfmt/INSTALL
@@ -0,0 +1,4 @@
+install -vDm555 -t "$INSTALL_ROOT"/usr/bin shfmt
+if [ -f shfmt.1 ]; then
+ install -vDm444 -t "$INSTALL_ROOT"/usr/share/man/man1 shfmt.1
+fi
diff --git a/gnu/gcc/HISTORY b/gnu/gcc/HISTORY
index a2ff279..593d209 100644
--- a/gnu/gcc/HISTORY
+++ b/gnu/gcc/HISTORY
@@ -1,3 +1,7 @@
+2024-06-11 Ismael Luceno <ismael AT sourcemage.org>
+ * patches/0014-Avoid-memory-poisoning-on-musl.patch:
+ fixed build against musl
+
2024-05-07 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 14.1.0, quoting++
* patches/0001-Add-targetm.libm_function_max_error.patch: removed
diff --git a/gnu/gcc/patches/0014-Avoid-memory-poisoning-on-musl.patch
b/gnu/gcc/patches/0014-Avoid-memory-poisoning-on-musl.patch
new file mode 100644
index 0000000..18f4c46
--- /dev/null
+++ b/gnu/gcc/patches/0014-Avoid-memory-poisoning-on-musl.patch
@@ -0,0 +1,61 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Andrew Pinski <pinskia AT gcc.gnu.org>
+Date: Tue, 11 Jun 2024 19:17:04 +0000
+Subject: [PATCH 14/14] Avoid <memory> poisoning on musl
+
+On musl <pthread.h> uses calloc() (via <sched.h>). <sstream> includes
+it indirectly and exposes use of poisoned calloc() when module code is
+built:
+
+ /usr/src/gcc-14.1.0.bld/./prev-gcc/xg++
-B/usr/src/gcc-14.1.0.bld/./prev-gcc/ -B/usr/x86_64-pc-linux-musl/bin/
-nostdinc++
-B/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/src/.libs
-B/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/libsupc++/.libs
-isystem
/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/include/x86_64-pc-linux-musl
-isystem
/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/include
-isystem /usr/src/gcc-14.1.0/libstdc++-v3/libsupc++
-L/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/src/.libs
-L/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/libsupc++/.libs
-fcf-protection -fPIC -c -DIN_GCC_FRONTEND -march=native -mtune=native -m64
-fPIC -Os -fno-checking -gtoggle -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -DHAVE_CONFIG_H -fPIC -I. -Ijit
-I/usr/src/gcc-14.1.0/gcc -I/usr/src/gcc-14.1.0/gcc/jit
-I/usr/src/gcc-14.1.0/gcc/../include
-I/usr/src/gcc-14.1.0/gcc/../libcpp/include
-I/usr/src/gcc-14.1.0/gcc/../libcody -I//include -I//include -I/usr/include
-I/usr/src/gcc-14.1.0/gcc/../libdecnumber
-I/usr/src/gcc-14.1.0/gcc/../libdecnumber/bid -I../libdecnumber
-I/usr/src/gcc-14.1.0/gcc/../libbacktrace
-I/usr/src/gcc-14.1.0.bld/./isl/include -I/usr/src/gcc-14.1.0/isl/include -o
jit/jit-recording.o -MT jit/jit-recording.o -MMD -MP -MF
jit/.deps/jit-recording.TPo /usr/src/gcc-14.1.0/gcc/jit/jit-recording.cc
+ In file included from /usr/include/pthread.h:30,
+ from
/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/include/x86_64-pc-linux-musl/bits/gthr-default.h:35,
+ from
/usr/src/gcc-14.1.0.bld/prev-x86_64-pc-linux-musl/libstdc++-v3/include/x86_64-pc-linux-musl/bits/gthr.h:157,
+ from
/usr/src/gcc-14.1.0/libstdc++-v3/include/ext/atomicity.h:35,
+ from
/usr/src/gcc-14.1.0/libstdc++-v3/include/bits/ios_base.h:39,
+ from
/usr/src/gcc-14.1.0/libstdc++-v3/include/std/ios:44,
+ from
/usr/src/gcc-14.1.0/libstdc++-v3/include/std/istream:40,
+ from
/usr/src/gcc-14.1.0/libstdc++-v3/include/std/sstream:40,
+ from /usr/src/gcc-14.1.0/gcc/jit/jit-recording.cc:32:
+ /usr/include/sched.h:84:7: error: attempt to use poisoned "calloc"
+ 84 | void *calloc(size_t, size_t);
+ | ^
+ In file included from /usr/src/gcc-14.1.0/gcc/jit/jit-recording.cc:22:
+ /usr/src/gcc-14.1.0/gcc/system.h:938:21: note: poisoned here
+ 938 | #pragma GCC poison calloc strdup strndup
+ | ^~~~~~
+ /usr/include/sched.h:124:36: error: attempt to use poisoned "calloc"
+ 124 | #define CPU_ALLOC(n) ((cpu_set_t
*)calloc(1,CPU_ALLOC_SIZE(n)))
+ | ^
+ /usr/src/gcc-14.1.0/gcc/system.h:938:21: note: poisoned here
+ 938 | #pragma GCC poison calloc strdup strndup
+ | ^~~~~~
+
+Origin: Upstream
+Upstream-Status: Submitted
+ [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115442]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ gcc/jit/jit-recording.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
+index 68a2e860c1f..70830e34965 100644
+--- a/gcc/jit/jit-recording.cc
++++ b/gcc/jit/jit-recording.cc
+@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+ #include "config.h"
++#define INCLUDE_SSTREAM
+ #include "system.h"
+ #include "coretypes.h"
+ #include "tm.h"
+@@ -29,7 +30,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+-#include <sstream>
+
+ namespace gcc {
+ namespace jit {


  • [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (93858fc144467cb7400f2c3eaf9b2391c243f961), Ismael Luceno, 06/11/2024

Archive powered by MHonArc 2.6.24.

Top of Page