diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index d01729cf..4b34f020 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -669,9 +669,8 @@ MASTER_SITE_GIMP+= \
.if !defined(IGNORE_MASTER_SITE_GNU)
MASTER_SITE_GNU+= \
- https://ftp.gnu.org/%SUBDIR%/ \
- https://ftpmirror.gnu.org/%SUBDIR%/ \
https://mirrors.kernel.org/gnu/%SUBDIR%/ \
+ https://ftpmirror.gnu.org/%SUBDIR%/ \
https://mirror.netcologne.de/gnu/%SUBDIR%/ \
https://www.nic.funet.fi/pub/gnu/gnu/%SUBDIR%/ \
http://mirror.navercorp.com/gnu/%SUBDIR%/ \
diff --git a/arch/gcpio/Makefile b/arch/gcpio/Makefile
index ed0294b6..dc03149b 100644
--- a/arch/gcpio/Makefile
+++ b/arch/gcpio/Makefile
@@ -2,7 +2,7 @@
# $Id: Makefile 2176 2009-08-17 10:16:24Z ziggi $
#
PORTNAME= cpio
-PORTVERSION= 2.12
+PORTVERSION= 2.15
CATEGORIES= archivers sysutils
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/arch/gcpio/distinfo b/arch/gcpio/distinfo
index 944a361f..e8e2c2ed 100644
--- a/arch/gcpio/distinfo
+++ b/arch/gcpio/distinfo
@@ -1,2 +1,3 @@
-SHA256 (gnu/cpio-2.12.tar.bz2) = 70998c5816ace8407c8b101c9ba1ffd3ebbecba1f5031046893307580ec1296e
-SIZE (gnu/cpio-2.12.tar.bz2) = 1258605
+TIMESTAMP = 1755755283
+SHA256 (gnu/cpio-2.15.tar.bz2) = 937610b97c329a1ec9268553fb780037bcfff0dcffe9725ebc4fd9c1aa9075db
+SIZE (gnu/cpio-2.15.tar.bz2) = 1651320
diff --git a/arch/gcpio/files/patch-doc_cpio.1 b/arch/gcpio/files/patch-doc_cpio.1
new file mode 100644
index 00000000..0d13e636
--- /dev/null
+++ b/arch/gcpio/files/patch-doc_cpio.1
@@ -0,0 +1,41 @@
+--- doc/cpio.1.orig 2018-06-21 07:12:05 UTC
++++ doc/cpio.1
+@@ -15,9 +15,9 @@
+ .\" along with GNU cpio. If not, see .
+ .TH CPIO 1 "June 21, 2018" "CPIO" "GNU CPIO"
+ .SH NAME
+-cpio \- copy files to and from archives
++gcpio \- copy files to and from archives
+ .SH SYNOPSIS
+-.B cpio
++.B gcpio
+ {\fB\-o\fR|\fB\-\-create\fR} [\fB\-0acvABLV\fR] [\fB\-C\fR \fIBYTES\fR]
+ [\fB\-H\fR \fIFORMAT\fR] [\fB\-M\fR \fIMESSAGE\fR]
+ [\fB\-O\fR [[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR]
+@@ -31,7 +31,7 @@ cpio \- copy files to and from archives
+ [\fB\-\-force\-local\fR] [\fB\-\-rsh\-command=\fICOMMAND\fR]
+ \fB<\fR \fIname-list\fR [\fB>\fR \fIarchive\fR]
+
+-.B cpio
++.B gcpio
+ {\fB\-i\fR|\fB\-\-extract\fR} [\fB\-bcdfmnrtsuvBSV\fR] [\fB\-C\fR \fIBYTES\fR]
+ [\fB\-E\fR \fIFILE\fR] [\fB\-H\fR \fIFORMAT\fR]
+ [\fB\-M\fR \fIMESSAGE\fR] [\fB\-R\fR [\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]]
+@@ -52,7 +52,7 @@ cpio \- copy files to and from archives
+ [\fB\-\-rsh\-command=\fICOMMAND\fR]
+ [\fIpattern\fR...] [\fB<\fR \fIarchive\fR]
+
+-.B cpio
++.B gcpio
+ {\fB\-p\fR|\fB\-\-pass\-through\fR} [\fB\-0adlmuvLV\fR]
+ [\fB\-R\fR [\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]]
+ [\fB\-\-null\fR] [\fB\-\-reset\-access\-time\fR]
+@@ -63,7 +63,7 @@ cpio \- copy files to and from archives
+ [\fB\-\-no\-preserve\-owner\fR] [\fB\-\-sparse\fR]
+ \fIdestination-directory\fR \fB<\fR \fIname-list\fR
+
+-.B cpio
++.B gcpio
+ {\fB\-?\fR|\fB\-\-help\fR|\fB\-\-usage\fR|\fB\-\-version\fR}
+ .SH NOTE
+ This manpage is a short description of GNU \fBcpio\fR. For a detailed
diff --git a/arch/gcpio/files/patch-tests_symlink-bad-length.at b/arch/gcpio/files/patch-tests_symlink-bad-length.at
new file mode 100644
index 00000000..c81e2caa
--- /dev/null
+++ b/arch/gcpio/files/patch-tests_symlink-bad-length.at
@@ -0,0 +1,11 @@
+--- tests/symlink-bad-length.at.orig 2019-11-13 23:07:23 UTC
++++ tests/symlink-bad-length.at
+@@ -44,7 +44,7 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ # but that could hurt backward compatibility.
+
+ AT_CHECK([
+-base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
++b64decode -r ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
+ TZ=UTC cpio -ntv < ARCHIVE 2>stderr
+ cat stderr | grep -v \
+ -e 'stored filename length is out of range' \
diff --git a/arch/gcpio/pkg-plist b/arch/gcpio/pkg-plist
index 08412695..01357c63 100644
--- a/arch/gcpio/pkg-plist
+++ b/arch/gcpio/pkg-plist
@@ -1,5 +1,7 @@
bin/gcpio
-libexec/gcpio/grmt
+man/man1/gcpio.1.gz
+share/info/cpio.info
+share/locale/bg/LC_MESSAGES/cpio.mo
share/locale/da/LC_MESSAGES/cpio.mo
share/locale/de/LC_MESSAGES/cpio.mo
share/locale/es/LC_MESSAGES/cpio.mo
@@ -12,10 +14,12 @@ share/locale/hu/LC_MESSAGES/cpio.mo
share/locale/id/LC_MESSAGES/cpio.mo
share/locale/it/LC_MESSAGES/cpio.mo
share/locale/ja/LC_MESSAGES/cpio.mo
+share/locale/ka/LC_MESSAGES/cpio.mo
share/locale/ko/LC_MESSAGES/cpio.mo
share/locale/nl/LC_MESSAGES/cpio.mo
share/locale/pl/LC_MESSAGES/cpio.mo
share/locale/pt_BR/LC_MESSAGES/cpio.mo
+share/locale/pt/LC_MESSAGES/cpio.mo
share/locale/ro/LC_MESSAGES/cpio.mo
share/locale/ru/LC_MESSAGES/cpio.mo
share/locale/sr/LC_MESSAGES/cpio.mo
@@ -25,9 +29,9 @@ share/locale/uk/LC_MESSAGES/cpio.mo
share/locale/vi/LC_MESSAGES/cpio.mo
share/locale/zh_CN/LC_MESSAGES/cpio.mo
share/locale/zh_TW/LC_MESSAGES/cpio.mo
-man/man1/gcpio.1.gz
-@comment man/man8/grmt.8.gz
@dir libexec/gcpio
+@dir share/locale/bg/LC_MESSAGES
+@dir share/locale/bg
@dir share/locale/da/LC_MESSAGES
@dir share/locale/da
@dir share/locale/de/LC_MESSAGES
@@ -52,12 +56,16 @@ man/man1/gcpio.1.gz
@dir share/locale/it
@dir share/locale/ja/LC_MESSAGES
@dir share/locale/ja
+@dir share/locale/ka/LC_MESSAGES
+@dir share/locale/ka
@dir share/locale/ko/LC_MESSAGES
@dir share/locale/ko
@dir share/locale/nl/LC_MESSAGES
@dir share/locale/nl
@dir share/locale/pl/LC_MESSAGES
@dir share/locale/pl
+@dir share/locale/pt/LC_MESSAGES
+@dir share/locale/pt
@dir share/locale/pt_BR/LC_MESSAGES
@dir share/locale/pt_BR
@dir share/locale/ro/LC_MESSAGES
@@ -78,3 +86,4 @@ man/man1/gcpio.1.gz
@dir share/locale/zh_CN
@dir share/locale/zh_TW/LC_MESSAGES
@dir share/locale/zh_TW
+@dir share/locale
diff --git a/arch/pixz/Makefile b/arch/pixz/Makefile
index 4e33b7e5..e78a9d21 100644
--- a/arch/pixz/Makefile
+++ b/arch/pixz/Makefile
@@ -2,39 +2,23 @@
# $Id$
#
PORTNAME= pixz
-PORTVERSION= 1.0.2
CATEGORIES= archivers
-MASTER_SITES= SF/pixz
-EXTRACT_SUFX= .tgz
+DISTVERSION= 1.0.7
+CATEGORIES= archivers
+MASTER_SITES= https://github.com/vasi/${PORTNAME}/releases/download/v${DISTVERSION}/
+
MAINTAINER= onborodin@gmail.com
COMMENT= Parallel, indexing version of XZ
-#LICENSE= BSD
-#LICENSE_FILE= ${WRKSRC}/LICENSE
+USES= pkgconfig tar:xz
+GNU_CONFIGURE= yes
+CONFIGURE_ENV += LIBARCHIVE_CFLAGS="-I/usr/include"
+CONFIGURE_ENV += LIBARCHIVE_LIBS="-larchive"
-SUB_FILES= Makefile
-MAKE_ENV+= PTHREAD_LIBS="-pthread"
-
-CFLAGS+= -pthread
-
-
-.include
-
-.if ${OSVERSION} < 800505 || (${OSVERSION} >= 900000 && ${OSVERSION} < 900012)
-LIB_DEPENDS+= lzma:archivers/xz
-CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-.endif
-
-post-extract: apply-slist
- ${INSTALL_DATA} ${WRKDIR}/Makefile ${WRKSRC}
- ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.1 ${WRKSRC}
-
-pre-install:
- ${MKDIR} ${STAGEDIR}${PREFIX}/bin
+post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/src/pixz.1 ${STAGEDIR}${PREFIX}/man/man1
-
-.include
+.include
#EOF
diff --git a/arch/pixz/distinfo b/arch/pixz/distinfo
index f85f5508..ad246a34 100644
--- a/arch/pixz/distinfo
+++ b/arch/pixz/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1755469280
-SHA256 (pixz-1.0.2.tgz) = af9dac41edd6bf57953471f7fcbd4793810003bf911593ba4c84f7cccb5f74af
-SIZE (pixz-1.0.2.tgz) = 21425
+TIMESTAMP = 1755754736
+SHA256 (pixz-1.0.7.tar.xz) = e5e32c6eb0bf112b98e74a5da8fb63b9f2cae71800f599d97ce540e150c8ddc5
+SIZE (pixz-1.0.7.tar.xz) = 120876
diff --git a/devel/arm-eabi-binutils/Makefile b/devel/arm-eabi-binutils/Makefile
index 5d37b3bb..559edddd 100644
--- a/devel/arm-eabi-binutils/Makefile
+++ b/devel/arm-eabi-binutils/Makefile
@@ -41,17 +41,5 @@ BUILD_DEPENDS+= makeinfo:system/texinfo
BINS= ar as ld nm objcopy objdump ranlib readelf strip
-COMPAT_TARGET1= arm-none-eabi
-COMPAT_TARGET2= arm-nuttx-eabi
-
-post-install:
- for bin in ${BINS}; do \
- cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${TARGET}-$${bin} ${COMPAT_TARGET1}-$${bin}; \
- done
- for bin in ${BINS}; do \
- cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${TARGET}-$${bin} ${COMPAT_TARGET2}-$${bin}; \
- done
-
-
.include
#EOF
diff --git a/devel/arm-eabi-binutils/pkg-plist b/devel/arm-eabi-binutils/pkg-plist
index 798831cb..47a6a070 100644
--- a/devel/arm-eabi-binutils/pkg-plist
+++ b/devel/arm-eabi-binutils/pkg-plist
@@ -55,15 +55,6 @@ bin/arm-none-eabi-objdump
bin/arm-none-eabi-ranlib
bin/arm-none-eabi-readelf
bin/arm-none-eabi-strip
-bin/arm-nuttx-eabi-ar
-bin/arm-nuttx-eabi-as
-bin/arm-nuttx-eabi-ld
-bin/arm-nuttx-eabi-nm
-bin/arm-nuttx-eabi-objcopy
-bin/arm-nuttx-eabi-objdump
-bin/arm-nuttx-eabi-ranlib
-bin/arm-nuttx-eabi-readelf
-bin/arm-nuttx-eabi-strip
man/man1/arm-eabi-addr2line.1.gz
man/man1/arm-eabi-ar.1.gz
man/man1/arm-eabi-as.1.gz
diff --git a/devel/arm-eabi-gcc/Makefile b/devel/arm-eabi-gcc/Makefile
index 9eff3d29..57f633ba 100644
--- a/devel/arm-eabi-gcc/Makefile
+++ b/devel/arm-eabi-gcc/Makefile
@@ -2,15 +2,16 @@
# $Id: Makefile 1285 2007-10-25 11:42:14Z root $
#
PORTNAME= gcc
-DIST_SUBDIR= arm
+DIST_SUBDIR= gnu
PORTVERSION= ${GCC_VERSION}
CATEGORIES= devel
+MASTER_SITES+= GCC
MASTER_SITES+= http://ftp.gnu.org/gnu/${PORTNAME}/${PORTNAME}-${PORTVERSION}/
CATEGORIES= devel
PKGNAMEPREFIX= ${TARGET}-
-GCC_VERSION= 10.4.0
+GCC_VERSION= 14.2.0
MAINTAINER= homeunix7@gmail.com
COMMENT= GNU Compiler Collection for bare metal arm cross-development
@@ -45,13 +46,11 @@ CFLAGS= -I${WRKSRC}/../include -I${LOCALBASE}/include -Os
CPPFLAGS= -I${WRKSRC}/../include -I${LOCALBASE}/include -Os
-CXXFLAGS+= -fbracket-depth=512 -Os
-CXXFLAGS+= -Wno-error -fbracket-depth=512 -Wno-deprecated-register
-CFLAGS+= -Wno-error -fbracket-depth=512 -Wno-deprecated-register
+#CXXFLAGS+= -fbracket-depth=512 -Os
+#CXXFLAGS+= -Wno-error -fbracket-depth=512 -Wno-deprecated-register
+#CFLAGS+= -Wno-error -fbracket-depth=512 -Wno-deprecated-register
-CONFIGURE_ARGS+= --without-headers
-
-CONFIGURE_ARGS+= --disable-bootstrap
+#CONFIGURE_ARGS+= --disable-bootstrap
CONFIGURE_ARGS+= --without-nls
CONFIGURE_ARGS+= --disable-nls
CONFIGURE_ARGS+= --disable-shared
@@ -59,28 +58,31 @@ CONFIGURE_ARGS+= --infodir=${LOCALBASE}/info/${TARGET}
CONFIGURE_ARGS+= --with-as=${LOCALBASE}/bin/${TARGET}-as
CONFIGURE_ARGS+= --with-ld=${LOCALBASE}/bin/${TARGET}-ld
-MAKE_ARGS+= AWK=${LOCALBASE}/bin/gawk
-MAKE_ARGS+= INHIBIT_LIBC_CFLAGS="-DUSE_TM_CLONE_REGISTRY=0"
+#MAKE_ARGS+= INHIBIT_LIBC_CFLAGS="-DUSE_TM_CLONE_REGISTRY=0"
+#CONFIGURE_ARGS+= --disable-decimal-float
+#CONFIGURE_ARGS+= --disable-libffi
+#CONFIGURE_ARGS+= --disable-libgomp
+#CONFIGURE_ARGS+= --disable-libmudflap
+#CONFIGURE_ARGS+= --disable-libquadmath
+#CONFIGURE_ARGS+= --disable-libssp
+#CONFIGURE_ARGS+= --disable-libstdcxx-pch
+#CONFIGURE_ARGS+= --disable-threads
+#CONFIGURE_ARGS+= --disable-tls
+CONFIGURE_ARGS+= --disable-libstdcxx --without-headers
+CONFIGURE_ARGS+= --disable-libstdcxx
+CONFIGURE_ARGS+= --enable-gnu-indirect-function
-CONFIGURE_ARGS+= --disable-decimal-float
-CONFIGURE_ARGS+= --disable-libffi
-CONFIGURE_ARGS+= --disable-libgomp
-CONFIGURE_ARGS+= --disable-libmudflap
-CONFIGURE_ARGS+= --disable-libquadmath
-CONFIGURE_ARGS+= --disable-libssp
-CONFIGURE_ARGS+= --disable-libstdcxx-pch
-CONFIGURE_ARGS+= --disable-threads
-CONFIGURE_ARGS+= --disable-tls
-
-CONFIGURE_ARGS+= --enable-multilib
-CONFIGURE_ARGS+= --with-multilib-list=rmprofile
+#CONFIGURE_ARGS+= --enable-multilib
+#CONFIGURE_ARGS+= --with-multilib-list=rmprofile
CONFIGURE_ENV+= ac_cv_path_SED=${LOCALBASE}/bin/gsed
-CONFIGURE_ARGS+= --disable-libstdcxx
-CONFIGURE_ARGS+= --with-newlib
+#CONFIGURE_ARGS+= --with-newlib
+
+PATCH_STRIP= -p0
+
+MAKE_ARGS+= AWK=${LOCALBASE}/bin/gawk
-PATCH_STRIP= -p2
CONFIGURE_WRKSRC= ${WRKSRC}/build
BUILD_WRKSRC= ${WRKSRC}/build
@@ -108,12 +110,12 @@ COMPAT_TARGET1= arm-none-eabi
COMPAT_TARGET2= arm-nuttx-eabi
post-install:
- for bin in ${BINS}; do \
- cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${TARGET}-$${bin} ${COMPAT_TARGET1}-$${bin}; \
- done
- for bin in ${BINS}; do \
- cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${TARGET}-$${bin} ${COMPAT_TARGET2}-$${bin}; \
- done
+# for bin in ${BINS}; do \
+# cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${TARGET}-$${bin} ${COMPAT_TARGET1}-$${bin}; \
+# done
+# for bin in ${BINS}; do \
+# cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${TARGET}-$${bin} ${COMPAT_TARGET2}-$${bin}; \
+# done
.include
diff --git a/devel/arm-eabi-gcc/distinfo b/devel/arm-eabi-gcc/distinfo
index 62e06051..772a0c66 100644
--- a/devel/arm-eabi-gcc/distinfo
+++ b/devel/arm-eabi-gcc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1661760285
-SHA256 (arm/gcc-10.4.0.tar.xz) = c9297d5bcd7cb43f3dfc2fed5389e948c9312fd962ef6a4ce455cff963ebe4f1
-SIZE (arm/gcc-10.4.0.tar.xz) = 75018092
+TIMESTAMP = 1755770280
+SHA256 (gnu/gcc-14.2.0.tar.xz) = a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
+SIZE (gnu/gcc-14.2.0.tar.xz) = 92306460
diff --git a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_dtrace-probe.c b/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_dtrace-probe.c
deleted file mode 100644
index 6a3c06ac..00000000
--- a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_dtrace-probe.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gdb/gdb/dtrace-probe.c.orig 2018-01-23 21:30:27.712651000 +0300
-+++ src/gdb/gdb/dtrace-probe.c 2018-01-23 21:30:46.183643000 +0300
-@@ -77,6 +77,8 @@
- class dtrace_static_probe_ops : public static_probe_ops
- {
- public:
-+ dtrace_static_probe_ops() {}
-+
- /* See probe.h. */
- bool is_linespec (const char **linespecp) const override;
-
diff --git a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_dwarf2read.c b/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_dwarf2read.c
deleted file mode 100644
index 14e9260c..00000000
--- a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_dwarf2read.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/gdb/gdb/dwarf2read.c.orig 2018-01-25 13:10:17.113384000 +0300
-+++ src/gdb/gdb/dwarf2read.c 2018-01-25 13:11:33.355566000 +0300
-@@ -23105,7 +23105,7 @@
- }
- break;
-
-- case DW_MACINFO_vendor_ext:
-+ case DW_MACRO_hi_user:
- if (!section_is_gnu)
- {
- unsigned int bytes_read;
-@@ -23281,7 +23281,7 @@
- mac_ptr += offset_size;
- break;
-
-- case DW_MACINFO_vendor_ext:
-+ case DW_MACRO_hi_user:
- /* Only skip the data by MAC_PTR. */
- if (!section_is_gnu)
- {
diff --git a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_gnulib_import_stddef.in.h b/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_gnulib_import_stddef.in.h
deleted file mode 100644
index 194d6ff4..00000000
--- a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_gnulib_import_stddef.in.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gdb/gdb/gnulib/import/stddef.in.h.orig 2016-10-19 20:29:26.000000000 +0300
-+++ src/gdb/gdb/gnulib/import/stddef.in.h 2018-01-14 18:58:11.223138215 +0300
-@@ -84,7 +84,7 @@
- /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
- a hack in case the configure-time test was done with g++ even though
- we are currently compiling with gcc. */
--#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
-+#if 0
- /* On the x86, the maximum storage alignment of double, long, etc. is 4,
- but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
- and the C11 standard allows this. Work around this problem by
diff --git a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_probe.c b/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_probe.c
deleted file mode 100644
index 1d9a4bb8..00000000
--- a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_probe.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gdb/gdb/probe.c.orig 2018-01-24 19:30:20.436713000 +0300
-+++ src/gdb/gdb/probe.c 2018-01-24 19:30:41.659782000 +0300
-@@ -43,6 +43,8 @@
- class any_static_probe_ops : public static_probe_ops
- {
- public:
-+ any_static_probe_ops() {}
-+
- /* See probe.h. */
- bool is_linespec (const char **linespecp) const override;
-
diff --git a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_python_python-config.py b/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_python_python-config.py
deleted file mode 100644
index c0d2b128..00000000
--- a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_python_python-config.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gdb/gdb/python/python-config.py.orig 2019-01-22 16:22:04.766003000 +0300
-+++ src/gdb/gdb/python/python-config.py 2019-01-22 16:22:38.796302000 +0300
-@@ -58,7 +58,7 @@
- print (to_unix_path(' '.join(flags)))
-
- elif opt in ('--libs', '--ldflags'):
-- libs = ['-lpython' + pyver + abiflags]
-+ libs = ['-L' + sysconfig.PREFIX + "/lib", '-lpython' + pyver + abiflags]
- if getvar('LIBS') is not None:
- libs.extend(getvar('LIBS').split())
- if getvar('SYSLIBS') is not None:
diff --git a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_stap-probe.c b/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_stap-probe.c
deleted file mode 100644
index 17023572..00000000
--- a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_stap-probe.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gdb/gdb/stap-probe.c.orig 2018-01-23 18:50:38.886661000 +0300
-+++ src/gdb/gdb/stap-probe.c 2018-01-23 18:51:08.013663000 +0300
-@@ -102,6 +102,8 @@
- class stap_static_probe_ops : public static_probe_ops
- {
- public:
-+ stap_static_probe_ops() {}
-+
- /* See probe.h. */
- bool is_linespec (const char **linespecp) const override;
-
diff --git a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_target-float.c b/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_target-float.c
deleted file mode 100644
index ca790428..00000000
--- a/devel/arm-eabi-gcc/files/gdb/patch-src_gdb_gdb_target-float.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/gdb/gdb/target-float.c.orig 2019-01-22 18:39:51.598469000 +0300
-+++ src/gdb/gdb/target-float.c 2019-01-22 18:40:20.405163000 +0300
-@@ -1155,7 +1155,9 @@
-
- #ifdef HAVE_LIBMPFR
-
-+#ifndef MPFR_USE_INTMAX_T
- #define MPFR_USE_INTMAX_T
-+#endif
-
- #include
-
diff --git a/devel/gcc/files/patch-arm-unwind-cxx-support b/devel/arm-eabi-gcc/files/patch-arm-unwind-cxx-support
similarity index 100%
rename from devel/gcc/files/patch-arm-unwind-cxx-support
rename to devel/arm-eabi-gcc/files/patch-arm-unwind-cxx-support
diff --git a/devel/arm-eabi-gcc/files/patch-gcc_Makefile.in b/devel/arm-eabi-gcc/files/patch-gcc_Makefile.in
new file mode 100644
index 00000000..127c87b1
--- /dev/null
+++ b/devel/arm-eabi-gcc/files/patch-gcc_Makefile.in
@@ -0,0 +1,19 @@
+--- gcc/Makefile.in.orig 2024-02-25 22:32:27 UTC
++++ gcc/Makefile.in
+@@ -671,6 +671,8 @@ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
++# Directory in which the compiler finds headers.
++libsubincludedir = $(libdir)/gcc/$(target_alias)/$(version)/include
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
+ # Directory in which all plugin resources are installed
+@@ -3821,6 +3823,7 @@ installdirs:
+ # $(libdir)/gcc/include isn't currently searched by cpp.
+ installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(libsubdir)
++ $(mkinstalldirs) $(DESTDIR)$(libsubincludedir)
+ $(mkinstalldirs) $(DESTDIR)$(libexecsubdir)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ $(mkinstalldirs) $(DESTDIR)$(includedir)
diff --git a/devel/gcc/files/patch-gcc_configure b/devel/arm-eabi-gcc/files/patch-gcc_configure
similarity index 100%
rename from devel/gcc/files/patch-gcc_configure
rename to devel/arm-eabi-gcc/files/patch-gcc_configure
diff --git a/devel/arm-eabi-gcc/files/patch-gcc_jit_Make-lang.in b/devel/arm-eabi-gcc/files/patch-gcc_jit_Make-lang.in
new file mode 100644
index 00000000..d5fdd610
--- /dev/null
+++ b/devel/arm-eabi-gcc/files/patch-gcc_jit_Make-lang.in
@@ -0,0 +1,14 @@
+--- gcc/jit/Make-lang.in.orig 2024-02-25 22:32:31 UTC
++++ gcc/jit/Make-lang.in
+@@ -360,9 +360,9 @@ jit.install-headers: installdirs
+ # Install hooks:
+ jit.install-headers: installdirs
+ $(INSTALL_DATA) $(srcdir)/jit/libgccjit.h \
+- $(DESTDIR)$(includedir)/libgccjit.h
++ $(DESTDIR)$(libsubincludedir)/libgccjit.h
+ $(INSTALL_DATA) $(srcdir)/jit/libgccjit++.h \
+- $(DESTDIR)$(includedir)/libgccjit++.h
++ $(DESTDIR)$(libsubincludedir)/libgccjit++.h
+
+ ifneq (,$(findstring mingw,$(target)))
+ jit.install-common: installdirs jit.install-headers
diff --git a/devel/arm-eabi-gcc/files/patch-gfortran-libgcc b/devel/arm-eabi-gcc/files/patch-gfortran-libgcc
new file mode 100644
index 00000000..4363c2e1
--- /dev/null
+++ b/devel/arm-eabi-gcc/files/patch-gfortran-libgcc
@@ -0,0 +1,69 @@
+GCC has two runtime libraries: The static library libgcc.a (-lgcc) and
+the shared library libgcc_s.so (-lgcc_s). Both implement many of the
+same functions but they also each have their unique functions. When
+gcc links programs and libraries there are three possibilities:
+
+1. gcc -static-libgcc or gcc -static: -lgcc
+ => Just use libgcc.a.
+
+2. gcc -shared-libgcc: -lgcc_s -lgcc
+ => Link with libgcc_s first, so libgcc.a is only used for its unique
+ functions.
+
+3. gcc: -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed
+ => Link with libgcc.a first so libgcc_s is only used for its unique
+ functions (_Unwind_* functions).
+
+Approach 3 is the default for gcc and it's also what clang and clang++ use;
+approach 2 is the default for gfortran, g++ and probably other front ends.
+
+This patch makes 3 the default for gfortran. It significantly reduces
+the use of libgcc_s. The _Unwind_* functions are also available in the
+old base system libgcc_s which means this reduces the need for
+-rpath /usr/local/lib/gccN in ports that depend on libraries built with
+gfortran. Consider a dependency tree like this:
+
+ prog -> libA -> libgcc_s (old base system libgcc_s is fine)
+ -> libB -> libgcc_s (libB built with gfortran, needs new libgcc_s)
+
+Here prog needs to be linked with -rpath /usr/local/lib/gccN even if it's
+a normal C program compiled with clang. Without -rpath it will fail to
+start because it loads old libgcc_s first as a dependency of libA and then
+it fails to load libB. With this patch libB works with old base system
+libgcc_s or may not need libgcc_s at all, so prog does not need to be
+linked with -rpath.
+
+Upstream is unlikely accept a patch like this because libgfortran calls
+some _Unwind_* functions and so always needs libgcc_s. Also because
+every Fortran program and library links to libgfortran it makes sense
+that option 2 above is the default. On FreeBSD where clang and GCC
+compiled code can be mixed and where multiple libgcc_s may be installed,
+option 3 is just a lot easier to deal with.
+
+The bug that sparked this is PR 208120 (but note there's a lot of
+misleading information in that bug. CMake is not actually doing
+anything wrong.)
+
+--- UTC
+--- gcc/fortran/gfortranspec.cc.orig 2022-01-23 22:32:06.000000000 +0000
++++ gcc/fortran/gfortranspec.cc 2022-02-06 08:56:31.018286000 +0000
+@@ -406,7 +406,7 @@
+ }
+ }
+
+-#ifdef ENABLE_SHARED_LIBGCC
++#if 0
+ if (library)
+ {
+ unsigned int i;
+--- libgfortran/Makefile.in.orig
++++ libgfortran/Makefile.in
+@@ -759,7 +759,7 @@
+ $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \
+ $(HWCAP_LDFLAGS) \
+ $(LIBM) $(extra_darwin_ldflags_libgfortran) \
+- $(version_arg) -Wc,-shared-libgcc
++ $(version_arg)
+
+ libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP)
+ cafexeclib_LTLIBRARIES = libcaf_single.la
diff --git a/devel/arm-eabi-gcc/files/patch-libcxxrt b/devel/arm-eabi-gcc/files/patch-libcxxrt
new file mode 100644
index 00000000..4225df7a
--- /dev/null
+++ b/devel/arm-eabi-gcc/files/patch-libcxxrt
@@ -0,0 +1,18 @@
+libc++ on FreeBSD always uses PathScale libcxxrt and cannot change to
+LLVM libc++abi without breaking backward compatibility. Besides, mixing
+different C++ ABIs is not supported unless subset via DT_FILTER.
+
+https://github.com/llvm/llvm-project/commit/35479ffb1251
+https://github.com/freebsd/freebsd-src/commit/cf56074e5271
+
+--- gcc/cp/g++spec.cc.orig 2022-07-31 22:32:16 UTC
++++ gcc/cp/g++spec.cc
+@@ -60,7 +60,7 @@ along with GCC; see the file COPYING3. If not see
+ #endif
+
+ #ifndef LIBCXXABI
+-#define LIBCXXABI "c++abi"
++#define LIBCXXABI "cxxrt"
+ #endif
+ #ifndef LIBCXXABI_PROFILE
+ #define LIBCXXABI_PROFILE LIBCXXABI
diff --git a/devel/gcc/files/patch-libgcc-config.host b/devel/arm-eabi-gcc/files/patch-libgcc-config.host
similarity index 100%
rename from devel/gcc/files/patch-libgcc-config.host
rename to devel/arm-eabi-gcc/files/patch-libgcc-config.host
diff --git a/devel/gcc/files/patch-libgcc_unwind.inc b/devel/arm-eabi-gcc/files/patch-libgcc_unwind.inc
similarity index 100%
rename from devel/gcc/files/patch-libgcc_unwind.inc
rename to devel/arm-eabi-gcc/files/patch-libgcc_unwind.inc
diff --git a/devel/arm-eabi-gcc/files/patch-libsanitizer_asan_asan__linux.cpp b/devel/arm-eabi-gcc/files/patch-libsanitizer_asan_asan__linux.cpp
new file mode 100644
index 00000000..f6c16d87
--- /dev/null
+++ b/devel/arm-eabi-gcc/files/patch-libsanitizer_asan_asan__linux.cpp
@@ -0,0 +1,23 @@
+Since the vDSO shared librares on Linux and FreeBSD are called
+differently, the initialization order check fails on FreeBSD.
+This patch fixes it by ignoring [vdso] instead of linux-vdso.so.
+
+GCC gets the original file from the LLVM Project, so this patch should
+probably be upstreamed directly to the LLVM Project rather than to GCC.
+
+
+--- libsanitizer/asan/asan_linux.cpp.orig 2022-11-23 11:22:41 UTC
++++ libsanitizer/asan/asan_linux.cpp
+@@ -148,6 +148,12 @@ static int FindFirstDSOCallback(struct dl_phdr_info *i
+ return 0;
+ # endif
+
++# if SANITIZER_FREEBSD
++ // Ignore vDSO
++ if (internal_strncmp(info->dlpi_name, "[vdso]", sizeof("[vdso]") - 1) == 0)
++ return 0;
++# endif
++
+ *name = info->dlpi_name;
+ return 1;
+ }
diff --git a/devel/arm-eabi-gcc/files/patch-libsanitizer_asan_asan__thread.cpp b/devel/arm-eabi-gcc/files/patch-libsanitizer_asan_asan__thread.cpp
new file mode 100644
index 00000000..61c0ccf1
--- /dev/null
+++ b/devel/arm-eabi-gcc/files/patch-libsanitizer_asan_asan__thread.cpp
@@ -0,0 +1,13 @@
+--- libsanitizer/asan/asan_thread.cpp.orig 2024-01-12 13:45:52 UTC
++++ libsanitizer/asan/asan_thread.cpp
+@@ -323,7 +323,9 @@ void AsanThread::ClearShadowForThreadStackAndTLS() {
+ if (tls_begin_ != tls_end_) {
+ uptr tls_begin_aligned = RoundDownTo(tls_begin_, ASAN_SHADOW_GRANULARITY);
+ uptr tls_end_aligned = RoundUpTo(tls_end_, ASAN_SHADOW_GRANULARITY);
+- FastPoisonShadow(tls_begin_aligned, tls_end_aligned - tls_begin_aligned, 0);
++ FastPoisonShadowPartialRightRedzone(tls_begin_aligned,
++ tls_end_ - tls_begin_aligned,
++ tls_end_aligned - tls_end_, 0);
+ }
+ }
+
diff --git a/devel/arm-eabi-gcc/files/patch-src_gcc_gcc_config_arm_arm.h b/devel/arm-eabi-gcc/files/patch-src_gcc_gcc_config_arm_arm.h
deleted file mode 100644
index 349d32bb..00000000
--- a/devel/arm-eabi-gcc/files/patch-src_gcc_gcc_config_arm_arm.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/gcc/gcc/config/arm/arm.h.orig 2016-12-05 16:07:09 UTC
-+++ src/gcc/gcc/config/arm/arm.h
-@@ -2273,7 +2273,7 @@ extern const char *arm_target_thumb_only
-
- /* -mcpu=native handling only makes sense with compiler running on
- an ARM chip. */
--#if defined(__arm__)
-+#if defined(__arm__) && !defined(CROSS_DIRECTORY_STRUCTURE)
- extern const char *host_detect_local_cpu (int argc, const char **argv);
- # define EXTRA_SPEC_FUNCTIONS \
- { "local_cpu_detect", host_detect_local_cpu }, \
diff --git a/devel/gcc/files/pkg-message.in b/devel/arm-eabi-gcc/files/pkg-message.in
similarity index 100%
rename from devel/gcc/files/pkg-message.in
rename to devel/arm-eabi-gcc/files/pkg-message.in
diff --git a/devel/avr-gcc/Makefile b/devel/avr-gcc/Makefile
index 13879a1d..a1af3f60 100644
--- a/devel/avr-gcc/Makefile
+++ b/devel/avr-gcc/Makefile
@@ -17,6 +17,8 @@ LIB_DEPENDS+= libmpfr.so:math/libmpfr
RUN_DEPENDS+= ${TARGET}-as:devel/${TARGET}-binutils
BUILD_DEPENDS+= ${TARGET}-as:devel/${TARGET}-binutils
+USE_GCC = yes
+
GNU_CONFIGURE= yes
USES+= gmake tar:bz2
diff --git a/devel/avr-gcc14/Makefile b/devel/avr-gcc14/Makefile
new file mode 100644
index 00000000..a84bf02f
--- /dev/null
+++ b/devel/avr-gcc14/Makefile
@@ -0,0 +1,117 @@
+#
+# $Id: Makefile 1285 2007-10-25 11:42:14Z root $
+#
+PORTNAME= gcc
+PORTVERSION= 14.2.0
+DIST_SUBDIR= gnu
+#MASTER_SITES+= http://ftp.gnu.org/gnu/${PORTNAME}/${PORTNAME}-${PORTVERSION}/
+#MASTER_SITES+= ftp://ftp.fu-berlin.de/unix/languages/gcc/snapshots/9-20190504/
+CATEGORIES= devel
+MASTER_SITES= GCC
+PKGNAMEPREFIX= ${TARGET}-
+
+MAINTAINER= onborodin@gmail.com
+COMMENT= GNU C Compiler v${PORTVERSION}
+
+
+LIB_DEPENDS+= libgmp.so:math/libgmp
+LIB_DEPENDS+= libmpc.so:math/libmpc
+LIB_DEPENDS+= libmpfr.so:math/libmpfr
+
+BUILD_DEPENDS+= gawk:text/gawk
+
+RUN_DEPENDS+= gas:devel/binutils
+RUN_DEPENDS+= gld:devel/binutils
+BUILD_DEPENDS+= ${RUN_DEPENDS}
+
+USES+= bison gmake perl5 tar:xz
+
+TARGET = avr
+CONFIGURE_TARGET= ${TARGET}
+GNU_CONFIGURE= yes
+USES+= gmake
+PATCH_STRIP= -p0
+
+.include
+
+#TARGET= ${ARCH:S/amd64/x86_64/}-freebsd${OSREL:R}
+
+LANGUAGES= "c,c++"
+
+
+USE_LDCONFIG= ${TARGLIB}
+
+#3CFLAGS+= -fPIC -I${LOCALBASE}/include
+#CXXFLAGS+= -fPIC -I${LOCALBASE}/include
+#LDFLAGS+= -L${LOCALBASE}/lib
+
+TARGLIB= ${PREFIX}/lib/gcc/${PORTVERSION}
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+CONFIGURE_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/build
+BUILD_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/build
+INSTALL_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/build
+
+CONFIGURE_ENV+= CC='gcc' CXX='g++'
+#CONFIGURE_SCRIPT= ${WRKSRC}/configure
+CONFIGURE_SCRIPT= ../configure
+
+CONFIGURE_ARGS+= --target=${TARGET}
+
+#CONFIGURE_ARGS+= --program-suffix=${SUFFIX}
+
+CFLAGS+= -I${LOCALBASE}/include
+USE_CXXSTD= gnu++11
+
+CONFIGURE_ARGS= --disable-nls
+CONFIGURE_ARGS+= --libdir=${TARGLIB}
+CONFIGURE_ARGS+= --with-gmp=${LOCALBASE}
+CONFIGURE_ARGS+= --with-gxx-include-dir=${TARGLIB}/include/c++
+CONFIGURE_ARGS+= --with-libiconv-prefix=${LOCALBASE}
+CONFIGURE_ARGS+= --with-system-zlib
+CONFIGURE_ARGS+= --infodir=${PREFIX}/info/${PKGNAMEPREFIX}-${PORTNAME}
+CONFIGURE_ARGS+= --enable-languages="${LANGUAGES}"
+CONFIGURE_ARGS+= --with-system-zlib
+CONFIGURE_ARGS+= --with-libiconv-prefix=${LOCALBASE}
+CONFIGURE_ARGS+= --program-suffix=''
+#CONFIGURE_ARGS+= --program-transform-name='s&^cpp&gcpp&'
+CONFIGURE_ARGS+= --disable-libssp
+#CONFIGURE_ARGS+= --disable-shared
+CONFIGURE_ARGS+= --with-mpfr=${LOCALBASE}
+CONFIGURE_ARGS+= --with-gmp=${LOCALBASE}
+CONFIGURE_ARGS+= --with-as=${LOCALBASE}/bin/${TARGET}-as
+CONFIGURE_ARGS+= --with-ld=${LOCALBASE}/bin/${TARGET}-ld
+
+#CONFIGURE_ARGS+= --disable-bootstrap
+#CONFIGURE_ARGS+= --disable-multilib
+#CONFIGURE_ARGS+= --enable-gnu-indirect-function
+
+#CONFIGURE_ARGS+= --with-as=${LOCALBASE}/bin/gas
+#CONFIGURE_ARGS+= --with-ld=${LOCALBASE}/bin/gld
+
+MAKE_ARGS+= infodir=${PREFIX}/info/${PORTNAME}
+#MAKE_ARGS+= BOOT_CFLAGS="${CFLAGS}"
+#MAKE_ARGS+= CFLAGS="${CFLAGS}"
+#MAKE_ARGS+= AWK=${LOCALBASE}/bin/gawk
+#MAKE_ARGS+= STAGE1_CXXFLAGS="-fPIC -fbracket-depth=512"
+
+PLIST_SUB+= TARGET=${CONFIGURE_TARGET}
+PLIST_SUB+= VERSION=${PORTVERSION}
+
+
+post-patch:
+ @${FIND} ${WRKSRC} -type f \( -name '*.[ch]' -o -name '*.cc' \) | \
+ ${XARGS} ${EGREP} -l '"(HOST_WIDE|PLUGIN_COND|PRId64)' | \
+ ${XARGS} ${REINPLACE_CMD} -E -e 's/"(HOST_WIDE|PLUGIN_COND|PRId64)/" \1/g'
+
+#pre-configure:
+# ${MKDIR} ${BUILD_WRKSRC}
+# ${FIND} ${BUILD_WRKSRC} -name 'config.cache' -delete
+
+post-configure:
+ ${MKDIR} ${WRKSRC}/gcc/include
+
+
+.include
+#EOF
diff --git a/devel/avr-gcc14/distinfo b/devel/avr-gcc14/distinfo
new file mode 100644
index 00000000..17c0bf95
--- /dev/null
+++ b/devel/avr-gcc14/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1755760177
+SHA256 (gnu/gcc-14.2.0.tar.xz) = a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
+SIZE (gnu/gcc-14.2.0.tar.xz) = 92306460
diff --git a/devel/avr-gcc14/files/patch-Makefile.in b/devel/avr-gcc14/files/patch-Makefile.in
new file mode 100644
index 00000000..c1111503
--- /dev/null
+++ b/devel/avr-gcc14/files/patch-Makefile.in
@@ -0,0 +1,17 @@
+--- Makefile.in.orig 2015-12-04 19:51:35 UTC
++++ Makefile.in
+@@ -38392,6 +38392,14 @@ all-target-libgcc: stage_current
+ TARGET-target-libgcc=all
+ maybe-all-target-libgcc: all-target-libgcc
+ all-target-libgcc: configure-target-libgcc
++ cp ${HOST_SUBDIR}/gcc/libgcc.mvars gcc/
++ cp ${HOST_SUBDIR}/gcc/tconfig.h libgcc/
++ cp ${HOST_SUBDIR}/gcc/auto-host.h libgcc/
++ cp ${HOST_SUBDIR}/gcc/tm.h libgcc/
++ cp ${HOST_SUBDIR}/gcc/options.h libgcc/
++ cp ${HOST_SUBDIR}/gcc/insn-constants.h libgcc/
++ cp ${HOST_SUBDIR}/gcc/insn-modes.h libgcc/
++ cp ${HOST_SUBDIR}/gcc/version.h libgcc/
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
diff --git a/devel/arm-eabi-gcc/files/patch-src_gcc_gcc_tree-vect-loop.c b/devel/avr-gcc14/files/patch-gcc_tree-vect-loop.cc
similarity index 53%
rename from devel/arm-eabi-gcc/files/patch-src_gcc_gcc_tree-vect-loop.c
rename to devel/avr-gcc14/files/patch-gcc_tree-vect-loop.cc
index 09453a81..893998dd 100644
--- a/devel/arm-eabi-gcc/files/patch-src_gcc_gcc_tree-vect-loop.c
+++ b/devel/avr-gcc14/files/patch-gcc_tree-vect-loop.cc
@@ -1,8 +1,8 @@
---- src/gcc/gcc/tree-vect-loop.c.orig 2019-12-02 09:49:15 UTC
-+++ src/gcc/gcc/tree-vect-loop.c
+--- gcc/tree-vect-loop.cc.orig 2019-11-28 10:47:59 UTC
++++ gcc/tree-vect-loop.cc
@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see
- #include "vec-perm-indices.h"
- #include "tree-eh.h"
+ #include "case-cfn-macros.h"
+ #include "langhooks.h"
+#define vec_step vec_step_
+
diff --git a/devel/avr-gcc14/files/patch-libgcov.h b/devel/avr-gcc14/files/patch-libgcov.h
new file mode 100644
index 00000000..91419497
--- /dev/null
+++ b/devel/avr-gcc14/files/patch-libgcov.h
@@ -0,0 +1,11 @@
+--- libgcc/libgcov.h~ 2021-07-28 08:55:08.812308622 +0200
++++ libgcc/libgcov.h 2022-02-18 23:18:28.532448000 +0100
+@@ -45,6 +45,8 @@
+ #include "libgcc_tm.h"
+ #include "gcov.h"
+
++#undef HAVE_SYS_MMAN_H // AVR environment doesn't have it
++
+ #if HAVE_SYS_MMAN_H
+ #include
+ #endif
diff --git a/devel/gcc/pkg-descr b/devel/avr-gcc14/pkg-descr
similarity index 100%
rename from devel/gcc/pkg-descr
rename to devel/avr-gcc14/pkg-descr
diff --git a/devel/gcc/Makefile b/devel/gcc12/Makefile
similarity index 100%
rename from devel/gcc/Makefile
rename to devel/gcc12/Makefile
diff --git a/devel/gcc/distinfo b/devel/gcc12/distinfo
similarity index 100%
rename from devel/gcc/distinfo
rename to devel/gcc12/distinfo
diff --git a/devel/gcc12/files/patch-arm-unwind-cxx-support b/devel/gcc12/files/patch-arm-unwind-cxx-support
new file mode 100644
index 00000000..ec6959b9
--- /dev/null
+++ b/devel/gcc12/files/patch-arm-unwind-cxx-support
@@ -0,0 +1,106 @@
+--- UTC
+Index: gcc/ginclude/unwind-arm-common.h
+===================================================================
+--- gcc/ginclude/unwind-arm-common.h (revision 219113)
++++ gcc/ginclude/unwind-arm-common.h (working copy)
+@@ -82,7 +82,11 @@
+
+ struct _Unwind_Control_Block
+ {
++#ifdef __FreeBSD__
++ unsigned exception_class __attribute__((__mode__(__DI__)));
++#else
+ char exception_class[8];
++#endif
+ void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
+ /* Unwinder cache, private fields for the unwinder's use */
+ struct
+@@ -181,7 +185,11 @@
+
+ /* Support functions for the PR. */
+ #define _Unwind_Exception _Unwind_Control_Block
++#ifdef __FreeBSD__
++ typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
++#else
+ typedef char _Unwind_Exception_Class[8];
++#endif
+
+ void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
+ _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
+Index: libstdc++-v3/libsupc++/unwind-cxx.h
+===================================================================
+--- libstdc++-v3/libsupc++/unwind-cxx.h (revision 219147)
++++ libstdc++-v3/libsupc++/unwind-cxx.h (working copy)
+@@ -235,7 +235,7 @@
+ return reinterpret_cast<__cxa_dependent_exception *>(exc + 1) - 1;
+ }
+
+-#ifdef __ARM_EABI_UNWINDER__
++#if defined(__ARM_EABI_UNWINDER__) && !defined(__FreeBSD__)
+ static inline bool
+ __is_gxx_exception_class(_Unwind_Exception_Class c)
+ {
+@@ -309,13 +309,7 @@
+ c[6] = 'R';
+ c[7] = '\0';
+ }
+-
+-static inline void*
+-__gxx_caught_object(_Unwind_Exception* eo)
+-{
+- return (void*)eo->barrier_cache.bitpattern[0];
+-}
+-#else // !__ARM_EABI_UNWINDER__
++#else // !__ARM_EABI_UNWINDER__ || __FreeBSD__
+ // This is the primary exception class we report -- "GNUCC++\0".
+ const _Unwind_Exception_Class __gxx_primary_exception_class
+ = ((((((((_Unwind_Exception_Class) 'G'
+@@ -339,6 +333,16 @@
+ << 8 | (_Unwind_Exception_Class) '+')
+ << 8 | (_Unwind_Exception_Class) '\x01');
+
++const _Unwind_Exception_Class __gxx_forced_unwind_class
++= ((((((((_Unwind_Exception_Class) 'G'
++ << 8 | (_Unwind_Exception_Class) 'N')
++ << 8 | (_Unwind_Exception_Class) 'U')
++ << 8 | (_Unwind_Exception_Class) 'C')
++ << 8 | (_Unwind_Exception_Class) 'F')
++ << 8 | (_Unwind_Exception_Class) 'O')
++ << 8 | (_Unwind_Exception_Class) 'R')
++ << 8 | (_Unwind_Exception_Class) '\0');
++
+ static inline bool
+ __is_gxx_exception_class(_Unwind_Exception_Class c)
+ {
+@@ -346,6 +350,12 @@
+ || c == __gxx_dependent_exception_class;
+ }
+
++static inline bool
++__is_gxx_forced_unwind_class(_Unwind_Exception_Class c)
++{
++ return c == __gxx_forced_unwind_class;
++}
++
+ // Only checks for primary or dependent, but not that it is a C++ exception at
+ // all.
+ static inline bool
+@@ -357,7 +367,18 @@
+ #define __GXX_INIT_PRIMARY_EXCEPTION_CLASS(c) c = __gxx_primary_exception_class
+ #define __GXX_INIT_DEPENDENT_EXCEPTION_CLASS(c) \
+ c = __gxx_dependent_exception_class
++#define __GXX_INIT_FORCED_UNWIND_CLASS(c) c = __gxx_forced_unwind_class
++#endif // __ARM_EABI_UNWINDER__ && !__FreeBSD__
+
++#ifdef __ARM_EABI_UNWINDER__
++static inline void*
++__gxx_caught_object(_Unwind_Exception* eo)
++{
++ return (void*)eo->barrier_cache.bitpattern[0];
++}
++
++#else // !__ARM_EABI_UNWINDER__
++
+ // GNU C++ personality routine, Version 0.
+ extern "C" _Unwind_Reason_Code __gxx_personality_v0
+ (int, _Unwind_Action, _Unwind_Exception_Class,
diff --git a/devel/gcc/files/patch-clang-vec_step b/devel/gcc12/files/patch-clang-vec_step
similarity index 100%
rename from devel/gcc/files/patch-clang-vec_step
rename to devel/gcc12/files/patch-clang-vec_step
diff --git a/devel/gcc/files/patch-gcc_Makefile.in b/devel/gcc12/files/patch-gcc_Makefile.in
similarity index 100%
rename from devel/gcc/files/patch-gcc_Makefile.in
rename to devel/gcc12/files/patch-gcc_Makefile.in
diff --git a/devel/gcc12/files/patch-gcc_configure b/devel/gcc12/files/patch-gcc_configure
new file mode 100644
index 00000000..cc60593b
--- /dev/null
+++ b/devel/gcc12/files/patch-gcc_configure
@@ -0,0 +1,22 @@
+Enable support for .init_array and .fini_array, which FreeBSD supports
+since commit 83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb in the src
+repository.
+
+There __FreeBSD_version is 1000009, so we start enabling the support
+from __FreeBSD_version == 1000010.
+--- gcc/configure.orig 2023-05-11 22:33:34 UTC
++++ gcc/configure
+@@ -24214,6 +24214,13 @@ EOF
+ #else
+ # if defined __sun__ && defined __svr4__
+ /* Solaris ld.so.1 supports .init_array/.fini_array since Solaris 8. */
++# elif defined __FreeBSD__
++# include
++# if __FreeBSD_version >= 1000010
++ /* FreeBSD supports .init_array/.fini_array since FreeBSD 10. */
++# else
++# error The C library not known to support .init_array/.fini_array
++# endif
+ # else
+ # error The C library not known to support .init_array/.fini_array
+ # endif
diff --git a/devel/gcc/files/patch-gcc_jit_Make-lang.in b/devel/gcc12/files/patch-gcc_jit_Make-lang.in
similarity index 100%
rename from devel/gcc/files/patch-gcc_jit_Make-lang.in
rename to devel/gcc12/files/patch-gcc_jit_Make-lang.in
diff --git a/devel/gcc/files/patch-gets-no-more b/devel/gcc12/files/patch-gets-no-more
similarity index 100%
rename from devel/gcc/files/patch-gets-no-more
rename to devel/gcc12/files/patch-gets-no-more
diff --git a/devel/gcc/files/patch-gfortran-libgcc b/devel/gcc12/files/patch-gfortran-libgcc
similarity index 100%
rename from devel/gcc/files/patch-gfortran-libgcc
rename to devel/gcc12/files/patch-gfortran-libgcc
diff --git a/devel/gcc/files/patch-libcxxrt b/devel/gcc12/files/patch-libcxxrt
similarity index 100%
rename from devel/gcc/files/patch-libcxxrt
rename to devel/gcc12/files/patch-libcxxrt
diff --git a/devel/gcc12/files/patch-libgcc-config.host b/devel/gcc12/files/patch-libgcc-config.host
new file mode 100644
index 00000000..26669467
--- /dev/null
+++ b/devel/gcc12/files/patch-libgcc-config.host
@@ -0,0 +1,11 @@
+--- libgcc/config.host.orig 2025-01-30 12:31:26.479569000 -0800
++++ libgcc/config.host 2025-01-30 12:32:03.732682000 -0800
+@@ -286,7 +286,7 @@
+ # machine-specific sections may refine and add to this
+ # configuration.
+ tmake_file="$tmake_file t-freebsd t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
+- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtbeginT.o crtendS.o"
+ case ${target_thread_file} in
+ posix)
+ tmake_file="${tmake_file} t-freebsd-thread"
diff --git a/devel/gcc12/files/patch-libgcc_unwind.inc b/devel/gcc12/files/patch-libgcc_unwind.inc
new file mode 100644
index 00000000..94fb7f65
--- /dev/null
+++ b/devel/gcc12/files/patch-libgcc_unwind.inc
@@ -0,0 +1,31 @@
+GCC generates instructions that require variables to be aligned in memory on
+certain CPUs. Our libthr does not have the required alignment so these CPUs fail
+to execute these instructions. The instructions generation is driven by CPUTYPE.
+Some CPUs are fine to execute these instructions on unaligned data.
+
+This patch explicitly forbids GCC to generate instructions that require
+alignment of the data.
+
+If the entire program is compiled by LLVM or GCC, there is no problem (with GCC
+everything is aligned, with LLVM vmovdqa is not used to assign both variables
+at once).
+
+Linux does not have libthr, so Linux is not affected. Moreover Linux is likely
+to build everything with GCC.
+
+This patch will become obsolete once all supported FreeBSD releases
+include commit 22e564c74eb20e14bd93fd9fdde20e38a29cfcf1.
+
+--- libgcc/unwind.inc.orig 2025-04-12 08:18:17 UTC
++++ libgcc/unwind.inc
+@@ -212,8 +212,8 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc,
+ uw_init_context (&this_context);
+ cur_context = this_context;
+
+- exc->private_1 = (_Unwind_Ptr) stop;
+- exc->private_2 = (_Unwind_Ptr) stop_argument;
++ __builtin_memcpy(&exc->private_1, &stop, sizeof(_Unwind_Ptr));
++ __builtin_memcpy(&exc->private_2, &stop_argument, sizeof(_Unwind_Ptr));
+
+ code = _Unwind_ForcedUnwind_Phase2 (exc, &cur_context, &frames);
+ if (code != _URC_INSTALL_CONTEXT)
diff --git a/devel/gcc/files/patch-libsanitizer_asan_asan__linux.cpp b/devel/gcc12/files/patch-libsanitizer_asan_asan__linux.cpp
similarity index 100%
rename from devel/gcc/files/patch-libsanitizer_asan_asan__linux.cpp
rename to devel/gcc12/files/patch-libsanitizer_asan_asan__linux.cpp
diff --git a/devel/gcc/files/patch-libsanitizer_sanitizer__common_sanitizer__linux.cpp b/devel/gcc12/files/patch-libsanitizer_sanitizer__common_sanitizer__linux.cpp
similarity index 100%
rename from devel/gcc/files/patch-libsanitizer_sanitizer__common_sanitizer__linux.cpp
rename to devel/gcc12/files/patch-libsanitizer_sanitizer__common_sanitizer__linux.cpp
diff --git a/devel/gcc/files/patch-libsanitizer_sanitizer__common_sanitizer__linux__libcdep.cpp b/devel/gcc12/files/patch-libsanitizer_sanitizer__common_sanitizer__linux__libcdep.cpp
similarity index 100%
rename from devel/gcc/files/patch-libsanitizer_sanitizer__common_sanitizer__linux__libcdep.cpp
rename to devel/gcc12/files/patch-libsanitizer_sanitizer__common_sanitizer__linux__libcdep.cpp
diff --git a/devel/gcc12/files/pkg-message.in b/devel/gcc12/files/pkg-message.in
new file mode 100644
index 00000000..df3ea725
--- /dev/null
+++ b/devel/gcc12/files/pkg-message.in
@@ -0,0 +1,13 @@
+[
+{ type: install
+ message: <
+
+TARGET= ${ARCH:S/amd64/x86_64/}-freebsd${OSREL:R}
+LANGUAGES= "c,fortran,c++"
+
+USE_LDCONFIG= ${TARGLIB}
+
+CFLAGS+= -fPIC -I${LOCALBASE}/include
+CXXFLAGS+= -fPIC -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+
+TARGLIB= ${PREFIX}/lib/gcc/${PORTVERSION}
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
+CONFIGURE_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/build
+BUILD_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/build
+INSTALL_WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/build
+
+
+#CONFIGURE_SCRIPT= ${WRKSRC}/configure
+CONFIGURE_SCRIPT= ../configure
+
+CONFIGURE_ARGS+= --target=${TARGET}
+
+#CONFIGURE_ARGS+= --program-suffix=${SUFFIX}
+
+CFLAGS+= -I${LOCALBASE}/include
+CONFIGURE_ARGS+= --disable-nls
+CONFIGURE_ARGS+= --libdir=${TARGLIB}
+CONFIGURE_ARGS+= --with-gmp=${LOCALBASE}
+CONFIGURE_ARGS+= --with-gxx-include-dir=${TARGLIB}/include/c++
+CONFIGURE_ARGS+= --with-libiconv-prefix=${LOCALBASE}
+CONFIGURE_ARGS+= --with-system-zlib
+
+CONFIGURE_ARGS+= --infodir=${PREFIX}/info/${PORTNAME}
+
+CONFIGURE_ARGS+= --enable-languages="${LANGUAGES}"
+CONFIGURE_ARGS+= --with-system-zlib
+CONFIGURE_ARGS+= --with-libiconv-prefix=${LOCALBASE}
+CONFIGURE_ARGS+= --program-suffix=''
+CONFIGURE_ARGS+= --program-transform-name='s&^cpp&gcpp&'
+
+#CONFIGURE_ARGS+= --disable-shared
+CONFIGURE_ARGS+= --with-mpfr=${LOCALBASE}
+CONFIGURE_ARGS+= --with-gmp=${LOCALBASE}
+
+CONFIGURE_ARGS+= --disable-bootstrap
+CONFIGURE_ARGS+= --disable-multilib
+CONFIGURE_ARGS+= --enable-gnu-indirect-function
+
+CONFIGURE_ARGS+= --with-as=${LOCALBASE}/bin/gas
+CONFIGURE_ARGS+= --with-ld=${LOCALBASE}/bin/gld
+
+MAKE_ARGS+= infodir=${PREFIX}/info/${PORTNAME}
+MAKE_ARGS+= BOOT_CFLAGS="${CFLAGS}"
+MAKE_ARGS+= CFLAGS="${CFLAGS}"
+MAKE_ARGS+= AWK=${LOCALBASE}/bin/gawk
+MAKE_ARGS+= STAGE1_CXXFLAGS="-fPIC -fbracket-depth=512"
+
+PLIST_SUB+= TARGET=${CONFIGURE_TARGET}
+PLIST_SUB+= VERSION=${PORTVERSION}
+
+post-extract:
+ ${MKDIR} ${BUILD_WRKSRC}
+
+pre-configure:
+ ${MKDIR} ${BUILD_WRKSRC}
+ ${FIND} ${BUILD_WRKSRC} -name 'config.cache' -delete
+
+INFO+= ${PORTNAME}/cpp
+INFO+= ${PORTNAME}/cppinternals
+INFO+= ${PORTNAME}/gcc
+INFO+= ${PORTNAME}/gccinstall
+INFO+= ${PORTNAME}/gccint
+INFO+= ${PORTNAME}/libgomp
+INFO+= ${PORTNAME}/libquadmath
+
+PLIST= pkg-plist.${ARCH}
+
+.include
+#EOF
diff --git a/devel/gcc14/distinfo b/devel/gcc14/distinfo
new file mode 100644
index 00000000..17c0bf95
--- /dev/null
+++ b/devel/gcc14/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1755760177
+SHA256 (gnu/gcc-14.2.0.tar.xz) = a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
+SIZE (gnu/gcc-14.2.0.tar.xz) = 92306460
diff --git a/devel/gcc14/files/patch-arm-unwind-cxx-support b/devel/gcc14/files/patch-arm-unwind-cxx-support
new file mode 100644
index 00000000..ec6959b9
--- /dev/null
+++ b/devel/gcc14/files/patch-arm-unwind-cxx-support
@@ -0,0 +1,106 @@
+--- UTC
+Index: gcc/ginclude/unwind-arm-common.h
+===================================================================
+--- gcc/ginclude/unwind-arm-common.h (revision 219113)
++++ gcc/ginclude/unwind-arm-common.h (working copy)
+@@ -82,7 +82,11 @@
+
+ struct _Unwind_Control_Block
+ {
++#ifdef __FreeBSD__
++ unsigned exception_class __attribute__((__mode__(__DI__)));
++#else
+ char exception_class[8];
++#endif
+ void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
+ /* Unwinder cache, private fields for the unwinder's use */
+ struct
+@@ -181,7 +185,11 @@
+
+ /* Support functions for the PR. */
+ #define _Unwind_Exception _Unwind_Control_Block
++#ifdef __FreeBSD__
++ typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
++#else
+ typedef char _Unwind_Exception_Class[8];
++#endif
+
+ void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
+ _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
+Index: libstdc++-v3/libsupc++/unwind-cxx.h
+===================================================================
+--- libstdc++-v3/libsupc++/unwind-cxx.h (revision 219147)
++++ libstdc++-v3/libsupc++/unwind-cxx.h (working copy)
+@@ -235,7 +235,7 @@
+ return reinterpret_cast<__cxa_dependent_exception *>(exc + 1) - 1;
+ }
+
+-#ifdef __ARM_EABI_UNWINDER__
++#if defined(__ARM_EABI_UNWINDER__) && !defined(__FreeBSD__)
+ static inline bool
+ __is_gxx_exception_class(_Unwind_Exception_Class c)
+ {
+@@ -309,13 +309,7 @@
+ c[6] = 'R';
+ c[7] = '\0';
+ }
+-
+-static inline void*
+-__gxx_caught_object(_Unwind_Exception* eo)
+-{
+- return (void*)eo->barrier_cache.bitpattern[0];
+-}
+-#else // !__ARM_EABI_UNWINDER__
++#else // !__ARM_EABI_UNWINDER__ || __FreeBSD__
+ // This is the primary exception class we report -- "GNUCC++\0".
+ const _Unwind_Exception_Class __gxx_primary_exception_class
+ = ((((((((_Unwind_Exception_Class) 'G'
+@@ -339,6 +333,16 @@
+ << 8 | (_Unwind_Exception_Class) '+')
+ << 8 | (_Unwind_Exception_Class) '\x01');
+
++const _Unwind_Exception_Class __gxx_forced_unwind_class
++= ((((((((_Unwind_Exception_Class) 'G'
++ << 8 | (_Unwind_Exception_Class) 'N')
++ << 8 | (_Unwind_Exception_Class) 'U')
++ << 8 | (_Unwind_Exception_Class) 'C')
++ << 8 | (_Unwind_Exception_Class) 'F')
++ << 8 | (_Unwind_Exception_Class) 'O')
++ << 8 | (_Unwind_Exception_Class) 'R')
++ << 8 | (_Unwind_Exception_Class) '\0');
++
+ static inline bool
+ __is_gxx_exception_class(_Unwind_Exception_Class c)
+ {
+@@ -346,6 +350,12 @@
+ || c == __gxx_dependent_exception_class;
+ }
+
++static inline bool
++__is_gxx_forced_unwind_class(_Unwind_Exception_Class c)
++{
++ return c == __gxx_forced_unwind_class;
++}
++
+ // Only checks for primary or dependent, but not that it is a C++ exception at
+ // all.
+ static inline bool
+@@ -357,7 +367,18 @@
+ #define __GXX_INIT_PRIMARY_EXCEPTION_CLASS(c) c = __gxx_primary_exception_class
+ #define __GXX_INIT_DEPENDENT_EXCEPTION_CLASS(c) \
+ c = __gxx_dependent_exception_class
++#define __GXX_INIT_FORCED_UNWIND_CLASS(c) c = __gxx_forced_unwind_class
++#endif // __ARM_EABI_UNWINDER__ && !__FreeBSD__
+
++#ifdef __ARM_EABI_UNWINDER__
++static inline void*
++__gxx_caught_object(_Unwind_Exception* eo)
++{
++ return (void*)eo->barrier_cache.bitpattern[0];
++}
++
++#else // !__ARM_EABI_UNWINDER__
++
+ // GNU C++ personality routine, Version 0.
+ extern "C" _Unwind_Reason_Code __gxx_personality_v0
+ (int, _Unwind_Action, _Unwind_Exception_Class,
diff --git a/devel/gcc14/files/patch-gcc_Makefile.in b/devel/gcc14/files/patch-gcc_Makefile.in
new file mode 100644
index 00000000..127c87b1
--- /dev/null
+++ b/devel/gcc14/files/patch-gcc_Makefile.in
@@ -0,0 +1,19 @@
+--- gcc/Makefile.in.orig 2024-02-25 22:32:27 UTC
++++ gcc/Makefile.in
+@@ -671,6 +671,8 @@ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
++# Directory in which the compiler finds headers.
++libsubincludedir = $(libdir)/gcc/$(target_alias)/$(version)/include
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
+ # Directory in which all plugin resources are installed
+@@ -3821,6 +3823,7 @@ installdirs:
+ # $(libdir)/gcc/include isn't currently searched by cpp.
+ installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(libsubdir)
++ $(mkinstalldirs) $(DESTDIR)$(libsubincludedir)
+ $(mkinstalldirs) $(DESTDIR)$(libexecsubdir)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ $(mkinstalldirs) $(DESTDIR)$(includedir)
diff --git a/devel/gcc14/files/patch-gcc_configure b/devel/gcc14/files/patch-gcc_configure
new file mode 100644
index 00000000..cc60593b
--- /dev/null
+++ b/devel/gcc14/files/patch-gcc_configure
@@ -0,0 +1,22 @@
+Enable support for .init_array and .fini_array, which FreeBSD supports
+since commit 83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb in the src
+repository.
+
+There __FreeBSD_version is 1000009, so we start enabling the support
+from __FreeBSD_version == 1000010.
+--- gcc/configure.orig 2023-05-11 22:33:34 UTC
++++ gcc/configure
+@@ -24214,6 +24214,13 @@ EOF
+ #else
+ # if defined __sun__ && defined __svr4__
+ /* Solaris ld.so.1 supports .init_array/.fini_array since Solaris 8. */
++# elif defined __FreeBSD__
++# include
++# if __FreeBSD_version >= 1000010
++ /* FreeBSD supports .init_array/.fini_array since FreeBSD 10. */
++# else
++# error The C library not known to support .init_array/.fini_array
++# endif
+ # else
+ # error The C library not known to support .init_array/.fini_array
+ # endif
diff --git a/devel/gcc14/files/patch-gcc_jit_Make-lang.in b/devel/gcc14/files/patch-gcc_jit_Make-lang.in
new file mode 100644
index 00000000..d5fdd610
--- /dev/null
+++ b/devel/gcc14/files/patch-gcc_jit_Make-lang.in
@@ -0,0 +1,14 @@
+--- gcc/jit/Make-lang.in.orig 2024-02-25 22:32:31 UTC
++++ gcc/jit/Make-lang.in
+@@ -360,9 +360,9 @@ jit.install-headers: installdirs
+ # Install hooks:
+ jit.install-headers: installdirs
+ $(INSTALL_DATA) $(srcdir)/jit/libgccjit.h \
+- $(DESTDIR)$(includedir)/libgccjit.h
++ $(DESTDIR)$(libsubincludedir)/libgccjit.h
+ $(INSTALL_DATA) $(srcdir)/jit/libgccjit++.h \
+- $(DESTDIR)$(includedir)/libgccjit++.h
++ $(DESTDIR)$(libsubincludedir)/libgccjit++.h
+
+ ifneq (,$(findstring mingw,$(target)))
+ jit.install-common: installdirs jit.install-headers
diff --git a/devel/gcc14/files/patch-gfortran-libgcc b/devel/gcc14/files/patch-gfortran-libgcc
new file mode 100644
index 00000000..4363c2e1
--- /dev/null
+++ b/devel/gcc14/files/patch-gfortran-libgcc
@@ -0,0 +1,69 @@
+GCC has two runtime libraries: The static library libgcc.a (-lgcc) and
+the shared library libgcc_s.so (-lgcc_s). Both implement many of the
+same functions but they also each have their unique functions. When
+gcc links programs and libraries there are three possibilities:
+
+1. gcc -static-libgcc or gcc -static: -lgcc
+ => Just use libgcc.a.
+
+2. gcc -shared-libgcc: -lgcc_s -lgcc
+ => Link with libgcc_s first, so libgcc.a is only used for its unique
+ functions.
+
+3. gcc: -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed
+ => Link with libgcc.a first so libgcc_s is only used for its unique
+ functions (_Unwind_* functions).
+
+Approach 3 is the default for gcc and it's also what clang and clang++ use;
+approach 2 is the default for gfortran, g++ and probably other front ends.
+
+This patch makes 3 the default for gfortran. It significantly reduces
+the use of libgcc_s. The _Unwind_* functions are also available in the
+old base system libgcc_s which means this reduces the need for
+-rpath /usr/local/lib/gccN in ports that depend on libraries built with
+gfortran. Consider a dependency tree like this:
+
+ prog -> libA -> libgcc_s (old base system libgcc_s is fine)
+ -> libB -> libgcc_s (libB built with gfortran, needs new libgcc_s)
+
+Here prog needs to be linked with -rpath /usr/local/lib/gccN even if it's
+a normal C program compiled with clang. Without -rpath it will fail to
+start because it loads old libgcc_s first as a dependency of libA and then
+it fails to load libB. With this patch libB works with old base system
+libgcc_s or may not need libgcc_s at all, so prog does not need to be
+linked with -rpath.
+
+Upstream is unlikely accept a patch like this because libgfortran calls
+some _Unwind_* functions and so always needs libgcc_s. Also because
+every Fortran program and library links to libgfortran it makes sense
+that option 2 above is the default. On FreeBSD where clang and GCC
+compiled code can be mixed and where multiple libgcc_s may be installed,
+option 3 is just a lot easier to deal with.
+
+The bug that sparked this is PR 208120 (but note there's a lot of
+misleading information in that bug. CMake is not actually doing
+anything wrong.)
+
+--- UTC
+--- gcc/fortran/gfortranspec.cc.orig 2022-01-23 22:32:06.000000000 +0000
++++ gcc/fortran/gfortranspec.cc 2022-02-06 08:56:31.018286000 +0000
+@@ -406,7 +406,7 @@
+ }
+ }
+
+-#ifdef ENABLE_SHARED_LIBGCC
++#if 0
+ if (library)
+ {
+ unsigned int i;
+--- libgfortran/Makefile.in.orig
++++ libgfortran/Makefile.in
+@@ -759,7 +759,7 @@
+ $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \
+ $(HWCAP_LDFLAGS) \
+ $(LIBM) $(extra_darwin_ldflags_libgfortran) \
+- $(version_arg) -Wc,-shared-libgcc
++ $(version_arg)
+
+ libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP)
+ cafexeclib_LTLIBRARIES = libcaf_single.la
diff --git a/devel/gcc14/files/patch-libcxxrt b/devel/gcc14/files/patch-libcxxrt
new file mode 100644
index 00000000..4225df7a
--- /dev/null
+++ b/devel/gcc14/files/patch-libcxxrt
@@ -0,0 +1,18 @@
+libc++ on FreeBSD always uses PathScale libcxxrt and cannot change to
+LLVM libc++abi without breaking backward compatibility. Besides, mixing
+different C++ ABIs is not supported unless subset via DT_FILTER.
+
+https://github.com/llvm/llvm-project/commit/35479ffb1251
+https://github.com/freebsd/freebsd-src/commit/cf56074e5271
+
+--- gcc/cp/g++spec.cc.orig 2022-07-31 22:32:16 UTC
++++ gcc/cp/g++spec.cc
+@@ -60,7 +60,7 @@ along with GCC; see the file COPYING3. If not see
+ #endif
+
+ #ifndef LIBCXXABI
+-#define LIBCXXABI "c++abi"
++#define LIBCXXABI "cxxrt"
+ #endif
+ #ifndef LIBCXXABI_PROFILE
+ #define LIBCXXABI_PROFILE LIBCXXABI
diff --git a/devel/gcc14/files/patch-libgcc-config.host b/devel/gcc14/files/patch-libgcc-config.host
new file mode 100644
index 00000000..26669467
--- /dev/null
+++ b/devel/gcc14/files/patch-libgcc-config.host
@@ -0,0 +1,11 @@
+--- libgcc/config.host.orig 2025-01-30 12:31:26.479569000 -0800
++++ libgcc/config.host 2025-01-30 12:32:03.732682000 -0800
+@@ -286,7 +286,7 @@
+ # machine-specific sections may refine and add to this
+ # configuration.
+ tmake_file="$tmake_file t-freebsd t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
+- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtbeginT.o crtendS.o"
+ case ${target_thread_file} in
+ posix)
+ tmake_file="${tmake_file} t-freebsd-thread"
diff --git a/devel/gcc14/files/patch-libgcc_unwind.inc b/devel/gcc14/files/patch-libgcc_unwind.inc
new file mode 100644
index 00000000..94fb7f65
--- /dev/null
+++ b/devel/gcc14/files/patch-libgcc_unwind.inc
@@ -0,0 +1,31 @@
+GCC generates instructions that require variables to be aligned in memory on
+certain CPUs. Our libthr does not have the required alignment so these CPUs fail
+to execute these instructions. The instructions generation is driven by CPUTYPE.
+Some CPUs are fine to execute these instructions on unaligned data.
+
+This patch explicitly forbids GCC to generate instructions that require
+alignment of the data.
+
+If the entire program is compiled by LLVM or GCC, there is no problem (with GCC
+everything is aligned, with LLVM vmovdqa is not used to assign both variables
+at once).
+
+Linux does not have libthr, so Linux is not affected. Moreover Linux is likely
+to build everything with GCC.
+
+This patch will become obsolete once all supported FreeBSD releases
+include commit 22e564c74eb20e14bd93fd9fdde20e38a29cfcf1.
+
+--- libgcc/unwind.inc.orig 2025-04-12 08:18:17 UTC
++++ libgcc/unwind.inc
+@@ -212,8 +212,8 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc,
+ uw_init_context (&this_context);
+ cur_context = this_context;
+
+- exc->private_1 = (_Unwind_Ptr) stop;
+- exc->private_2 = (_Unwind_Ptr) stop_argument;
++ __builtin_memcpy(&exc->private_1, &stop, sizeof(_Unwind_Ptr));
++ __builtin_memcpy(&exc->private_2, &stop_argument, sizeof(_Unwind_Ptr));
+
+ code = _Unwind_ForcedUnwind_Phase2 (exc, &cur_context, &frames);
+ if (code != _URC_INSTALL_CONTEXT)
diff --git a/devel/gcc14/files/patch-libsanitizer_asan_asan__linux.cpp b/devel/gcc14/files/patch-libsanitizer_asan_asan__linux.cpp
new file mode 100644
index 00000000..f6c16d87
--- /dev/null
+++ b/devel/gcc14/files/patch-libsanitizer_asan_asan__linux.cpp
@@ -0,0 +1,23 @@
+Since the vDSO shared librares on Linux and FreeBSD are called
+differently, the initialization order check fails on FreeBSD.
+This patch fixes it by ignoring [vdso] instead of linux-vdso.so.
+
+GCC gets the original file from the LLVM Project, so this patch should
+probably be upstreamed directly to the LLVM Project rather than to GCC.
+
+
+--- libsanitizer/asan/asan_linux.cpp.orig 2022-11-23 11:22:41 UTC
++++ libsanitizer/asan/asan_linux.cpp
+@@ -148,6 +148,12 @@ static int FindFirstDSOCallback(struct dl_phdr_info *i
+ return 0;
+ # endif
+
++# if SANITIZER_FREEBSD
++ // Ignore vDSO
++ if (internal_strncmp(info->dlpi_name, "[vdso]", sizeof("[vdso]") - 1) == 0)
++ return 0;
++# endif
++
+ *name = info->dlpi_name;
+ return 1;
+ }
diff --git a/devel/gcc14/files/patch-libsanitizer_asan_asan__thread.cpp b/devel/gcc14/files/patch-libsanitizer_asan_asan__thread.cpp
new file mode 100644
index 00000000..61c0ccf1
--- /dev/null
+++ b/devel/gcc14/files/patch-libsanitizer_asan_asan__thread.cpp
@@ -0,0 +1,13 @@
+--- libsanitizer/asan/asan_thread.cpp.orig 2024-01-12 13:45:52 UTC
++++ libsanitizer/asan/asan_thread.cpp
+@@ -323,7 +323,9 @@ void AsanThread::ClearShadowForThreadStackAndTLS() {
+ if (tls_begin_ != tls_end_) {
+ uptr tls_begin_aligned = RoundDownTo(tls_begin_, ASAN_SHADOW_GRANULARITY);
+ uptr tls_end_aligned = RoundUpTo(tls_end_, ASAN_SHADOW_GRANULARITY);
+- FastPoisonShadow(tls_begin_aligned, tls_end_aligned - tls_begin_aligned, 0);
++ FastPoisonShadowPartialRightRedzone(tls_begin_aligned,
++ tls_end_ - tls_begin_aligned,
++ tls_end_aligned - tls_end_, 0);
+ }
+ }
+
diff --git a/devel/gcc14/files/pkg-message.in b/devel/gcc14/files/pkg-message.in
new file mode 100644
index 00000000..df3ea725
--- /dev/null
+++ b/devel/gcc14/files/pkg-message.in
@@ -0,0 +1,13 @@
+[
+{ type: install
+ message: <&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CC+:} false; then :
-@@ -3416,7 +3416,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA
+@@ -3362,7 +3362,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
diff --git a/net/nmap/files/patch-libdnet-stripped_configure b/net/nmap/files/patch-libdnet-stripped_configure
index 2f8357e7..74170ec4 100644
--- a/net/nmap/files/patch-libdnet-stripped_configure
+++ b/net/nmap/files/patch-libdnet-stripped_configure
@@ -1,6 +1,6 @@
---- libdnet-stripped/configure.orig 2017-02-13 19:46:23 UTC
+--- libdnet-stripped/configure.orig 2017-08-02 18:48:27 UTC
+++ libdnet-stripped/configure
-@@ -733,6 +733,9 @@ ac_includes_default="\
+@@ -764,6 +764,9 @@ ac_includes_default="\
#ifdef HAVE_STDINT_H
# include
#endif
@@ -10,8 +10,8 @@
#ifdef HAVE_UNISTD_H
# include
#endif"
-@@ -11716,11 +11719,8 @@ $as_echo_n "checking for Berkeley Packet
- if test "${ac_cv_dnet_bsd_bpf+set}" = set; then :
+@@ -11828,11 +11831,8 @@ $as_echo_n "checking for Berkeley Packet Filter... " >
+ if ${ac_cv_dnet_bsd_bpf+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -c /dev/bpf0 ; then
diff --git a/net/nmap/files/patch-libdnet-stripped_src_arp-ioctl.c b/net/nmap/files/patch-libdnet-stripped_src_arp-ioctl.c
deleted file mode 100644
index 19ffb7f0..00000000
--- a/net/nmap/files/patch-libdnet-stripped_src_arp-ioctl.c
+++ /dev/null
@@ -1,14 +0,0 @@
-# Use correct width in sscanf. Fixes #1156
-# https://github.com/nmap/nmap/commit/36a6d897a584013d25e51ac339fe45ffc45df9df
-
---- libdnet-stripped/src/arp-ioctl.c.orig 2008-09-19 06:12:25 UTC
-+++ libdnet-stripped/src/arp-ioctl.c
-@@ -218,7 +218,7 @@ arp_loop(arp_t *a, arp_handler callback,
-
- ret = 0;
- while (fgets(buf, sizeof(buf), fp) != NULL) {
-- i = sscanf(buf, "%s 0x%x 0x%x %100s %100s %100s\n",
-+ i = sscanf(buf, "%s 0x%x 0x%x %99s %99s %99s\n",
- ipbuf, &type, &flags, macbuf, maskbuf, devbuf);
-
- if (i < 4 || (flags & ATF_COM) == 0)
diff --git a/net/nmap/files/patch-liblua_Makefile b/net/nmap/files/patch-liblua_Makefile
index 647f655b..5ff1968b 100644
--- a/net/nmap/files/patch-liblua_Makefile
+++ b/net/nmap/files/patch-liblua_Makefile
@@ -5,9 +5,9 @@
PLAT= none
-CC= gcc -std=gnu99
--CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
+-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
+CC?= gcc -std=gnu99
-+CFLAGS= -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)
++CFLAGS= -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
diff --git a/net/nmap/files/patch-libpcap_Makefile.in b/net/nmap/files/patch-libpcap_Makefile.in
new file mode 100644
index 00000000..91bae330
--- /dev/null
+++ b/net/nmap/files/patch-libpcap_Makefile.in
@@ -0,0 +1,13 @@
+--- libpcap/Makefile.in.orig 2022-08-31 11:39:55.000000000 -0700
++++ libpcap/Makefile.in 2022-09-28 08:38:02.131119000 -0700
+@@ -70,8 +70,8 @@
+ EXTRA_NETWORK_LIBS=@EXTRA_NETWORK_LIBS@
+
+ # Standard CFLAGS for building members of a shared library
+-FULL_CFLAGS = $(CCOPT) @V_LIB_CCOPT_FAT@ $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
+-CXXFLAGS = $(CCOPT) @V_LIB_CCOPT_FAT@ $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
++FULL_CFLAGS = -I. $(CCOPT) @V_LIB_CCOPT_FAT@ $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
++CXXFLAGS = -I. $(CCOPT) @V_LIB_CCOPT_FAT@ $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
+
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/net/nmap/files/patch-libssh2_src_openssl.h b/net/nmap/files/patch-libssh2_src_openssl.h
new file mode 100644
index 00000000..a43c568b
--- /dev/null
+++ b/net/nmap/files/patch-libssh2_src_openssl.h
@@ -0,0 +1,14 @@
+--- libssh2/src/openssl.h.orig 2022-06-29 20:40:29 UTC
++++ libssh2/src/openssl.h
+@@ -57,8 +57,9 @@
+ #include
+ #include
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
+- !defined(LIBRESSL_VERSION_NUMBER)
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
++ ((!defined LIBRESSL_VERSION_NUMBER) || \
++ (defined LIBRESSL_VERSION_NUMBER && LIBRESSL_VERSION_NUMBER >= 0x30500000L))
+ # define HAVE_OPAQUE_STRUCTS 1
+ #endif
+
diff --git a/net/nmap/files/patch-ncat__ncat_ssl.c b/net/nmap/files/patch-ncat__ncat_ssl.c
new file mode 100644
index 00000000..59468e4b
--- /dev/null
+++ b/net/nmap/files/patch-ncat__ncat_ssl.c
@@ -0,0 +1,13 @@
+--- ncat/ncat_ssl.c.orig 2022-08-29 17:09:47 UTC
++++ ncat/ncat_ssl.c
+@@ -73,7 +73,9 @@
+ #include
+ #include
+
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined LIBRESSL_VERSION_NUMBER
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
++ ((!defined LIBRESSL_VERSION_NUMBER) || \
++ (defined LIBRESSL_VERSION_NUMBER && LIBRESSL_VERSION_NUMBER >= 0x30500000L))
+ #define HAVE_OPAQUE_STRUCTS 1
+ #define FUNC_ASN1_STRING_data ASN1_STRING_get0_data
+ #else
diff --git a/net/nmap/files/patch-ncat_ncat__ssl.h b/net/nmap/files/patch-ncat_ncat__ssl.h
new file mode 100644
index 00000000..d266e277
--- /dev/null
+++ b/net/nmap/files/patch-ncat_ncat__ssl.h
@@ -0,0 +1,12 @@
+--- ncat/ncat_ssl.h.orig 2022-08-25 07:51:59.000000000 -0700
++++ ncat/ncat_ssl.h 2022-09-28 08:44:14.564723000 -0700
+@@ -67,7 +67,8 @@
+ #include
+ #include
+
+ #define NCAT_CA_CERTS_FILE "ca-bundle.crt"
++#define OPENSSL_API_COMPAT OPENSSL_VERSION_NUMBER
+
+ /* OPENSSL_API_LEVEL per OpenSSL 3.0: decimal MMmmpp */
+ #ifndef OPENSSL_API_LEVEL
+ # if OPENSSL_API_COMPAT < 0x900000L
diff --git a/net/nmap/files/patch-nmap.cc b/net/nmap/files/patch-nmap.cc
index 0db38d88..e73b24a5 100644
--- a/net/nmap/files/patch-nmap.cc
+++ b/net/nmap/files/patch-nmap.cc
@@ -1,8 +1,8 @@
---- nmap.cc.orig 2017-07-31 16:56:48 UTC
+--- nmap.cc.orig 2020-10-02 16:12:22 UTC
+++ nmap.cc
-@@ -130,6 +130,7 @@
-
- /* $Id: nmap.cc 36896 2017-07-31 16:56:48Z dmiller $ */
+@@ -69,6 +69,7 @@
+ #include
+ #endif
+#include
#include "nmap.h"
diff --git a/net/nmap/files/patch-nping_Crypto.cc b/net/nmap/files/patch-nping_Crypto.cc
new file mode 100644
index 00000000..c234e6c8
--- /dev/null
+++ b/net/nmap/files/patch-nping_Crypto.cc
@@ -0,0 +1,13 @@
+--- nping/Crypto.cc.orig 2022-02-18 17:38:46 UTC
++++ nping/Crypto.cc
+@@ -70,7 +70,9 @@
+ #include
+ #include
+
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined LIBRESSL_VERSION_NUMBER
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
++ ((!defined LIBRESSL_VERSION_NUMBER) || \
++ (defined LIBRESSL_VERSION_NUMBER && LIBRESSL_VERSION_NUMBER >= 0x30500000L))
+ #define HAVE_OPAQUE_EVP_PKEY 1
+ #define FUNC_EVP_MD_CTX_init EVP_MD_CTX_reset
+ #define FUNC_EVP_MD_CTX_cleanup EVP_MD_CTX_reset
diff --git a/net/nmap/files/patch-nping_EchoServer.cc b/net/nmap/files/patch-nping_EchoServer.cc
index 9e5e551e..cb903d06 100644
--- a/net/nmap/files/patch-nping_EchoServer.cc
+++ b/net/nmap/files/patch-nping_EchoServer.cc
@@ -1,6 +1,6 @@
---- nping/EchoServer.cc.orig 2018-01-28 21:18:17 UTC
+--- nping/EchoServer.cc.orig 2020-10-02 16:12:22 UTC
+++ nping/EchoServer.cc
-@@ -281,12 +281,12 @@ int EchoServer::nep_listen_socket(){
+@@ -213,12 +213,12 @@ int EchoServer::nep_listen_socket(){
server_addr6.sin6_len = sizeof(struct sockaddr_in6);
#endif
/* Bind to local address and the specified port */
@@ -15,7 +15,7 @@
nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno));
}else{
nping_print(VB_1, "Server bound to port %d", port);
-@@ -319,12 +319,12 @@ int EchoServer::nep_listen_socket(){
+@@ -251,12 +251,12 @@ int EchoServer::nep_listen_socket(){
#endif
/* Bind to local address and the specified port */
diff --git a/net/nmap/files/patch-nse__openssl.cc b/net/nmap/files/patch-nse__openssl.cc
new file mode 100644
index 00000000..43474fef
--- /dev/null
+++ b/net/nmap/files/patch-nse__openssl.cc
@@ -0,0 +1,13 @@
+--- nse_openssl.cc.orig 2022-09-01 22:22:29 UTC
++++ nse_openssl.cc
+@@ -13,7 +13,9 @@
+ #include
+ #include
+
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined LIBRESSL_VERSION_NUMBER
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
++ ((!defined LIBRESSL_VERSION_NUMBER) || \
++ (defined LIBRESSL_VERSION_NUMBER && LIBRESSL_VERSION_NUMBER >= 0x30500000L))
+ #define HAVE_OPAQUE_STRUCTS 1
+ #define FUNC_EVP_MD_CTX_init EVP_MD_CTX_reset
+ #define FUNC_EVP_MD_CTX_cleanup EVP_MD_CTX_reset
diff --git a/net/nmap/files/patch-nse__ssl__cert.cc b/net/nmap/files/patch-nse__ssl__cert.cc
new file mode 100644
index 00000000..3f02236b
--- /dev/null
+++ b/net/nmap/files/patch-nse__ssl__cert.cc
@@ -0,0 +1,13 @@
+--- nse_ssl_cert.cc.orig 2022-08-31 13:43:38 UTC
++++ nse_ssl_cert.cc
+@@ -80,7 +80,9 @@
+ #include
+ #include
+
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined LIBRESSL_VERSION_NUMBER
++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
++ ((!defined LIBRESSL_VERSION_NUMBER) || \
++ (defined LIBRESSL_VERSION_NUMBER && LIBRESSL_VERSION_NUMBER >= 0x30500000L))
+ /* Technically some of these things were added in 0x10100006
+ * but that was pre-release. */
+ #define HAVE_OPAQUE_STRUCTS 1
diff --git a/net/nmap/files/patch-output.cc b/net/nmap/files/patch-output.cc
index 45c26a93..d0b6705f 100644
--- a/net/nmap/files/patch-output.cc
+++ b/net/nmap/files/patch-output.cc
@@ -1,6 +1,6 @@
---- output.cc.orig 2017-06-07 12:32:38 UTC
+--- output.cc.orig 2020-10-02 16:12:22 UTC
+++ output.cc
-@@ -157,6 +157,7 @@
+@@ -90,6 +90,7 @@
#include
#include
#include
diff --git a/net/nmap/files/patch-tcpip.cc b/net/nmap/files/patch-tcpip.cc
index 493c12d4..4cccc9dd 100644
--- a/net/nmap/files/patch-tcpip.cc
+++ b/net/nmap/files/patch-tcpip.cc
@@ -1,6 +1,6 @@
---- tcpip.cc.orig 2017-06-07 12:32:38 UTC
+--- tcpip.cc.orig 2020-10-02 16:12:22 UTC
+++ tcpip.cc
-@@ -151,6 +151,8 @@
+@@ -83,6 +83,8 @@
#endif /* NETINET_IF_ETHER_H */
#endif /* HAVE_NETINET_IF_ETHER_H */
diff --git a/net/nmap/pkg-plist b/net/nmap/pkg-plist
index 5f3cb32c..c7092f54 100644
--- a/net/nmap/pkg-plist
+++ b/net/nmap/pkg-plist
@@ -1,13 +1,26 @@
bin/ncat
bin/nmap
bin/nping
+man/de/man1/nmap.1.gz
+man/es/man1/nmap.1.gz
+man/fr/man1/nmap.1.gz
+man/hr/man1/nmap.1.gz
+man/hu/man1/nmap.1.gz
+man/it/man1/nmap.1.gz
+man/ja/man1/nmap.1.gz
man/man1/ncat.1.gz
man/man1/nmap.1.gz
man/man1/nping.1.gz
+man/pl/man1/nmap.1.gz
+man/pt_BR/man1/nmap.1.gz
+man/pt_PT/man1/nmap.1.gz
+man/ro/man1/nmap.1.gz
+man/ru/man1/nmap.1.gz
+man/sk/man1/nmap.1.gz
+man/zh/man1/nmap.1.gz
share/ncat/ca-bundle.crt
share/nmap/nmap-mac-prefixes
share/nmap/nmap-os-db
-share/nmap/nmap-payloads
share/nmap/nmap-protocols
share/nmap/nmap-rpc
share/nmap/nmap-service-probes
@@ -23,7 +36,6 @@ share/nmap/nselib/asn1.lua
share/nmap/nselib/base32.lua
share/nmap/nselib/base64.lua
share/nmap/nselib/bin.lua
-share/nmap/nselib/bit.lua
share/nmap/nselib/bitcoin.lua
share/nmap/nselib/bits.lua
share/nmap/nselib/bittorrent.lua
@@ -75,6 +87,7 @@ share/nmap/nselib/data/rtsp-urls.txt
share/nmap/nselib/data/snmpcommunities.lst
share/nmap/nselib/data/ssl-fingerprints
share/nmap/nselib/data/targets-ipv6-wordlist
+share/nmap/nselib/data/tftp-fingerprints.lua
share/nmap/nselib/data/tftplist.txt
share/nmap/nselib/data/usernames.lst
share/nmap/nselib/data/vhosts-default.lst
@@ -85,6 +98,7 @@ share/nmap/nselib/datafiles.lua
share/nmap/nselib/datetime.lua
share/nmap/nselib/dhcp.lua
share/nmap/nselib/dhcp6.lua
+share/nmap/nselib/dicom.lua
share/nmap/nselib/dns.lua
share/nmap/nselib/dnsbl.lua
share/nmap/nselib/dnssd.lua
@@ -111,6 +125,7 @@ share/nmap/nselib/iscsi.lua
share/nmap/nselib/isns.lua
share/nmap/nselib/jdwp.lua
share/nmap/nselib/json.lua
+share/nmap/nselib/knx.lua
share/nmap/nselib/ldap.lua
share/nmap/nselib/lfs.luadoc
share/nmap/nselib/libssh2-utility.lua
@@ -139,8 +154,10 @@ share/nmap/nselib/nmap.luadoc
share/nmap/nselib/nrpc.lua
share/nmap/nselib/nsedebug.lua
share/nmap/nselib/omp2.lua
+share/nmap/nselib/oops.lua
share/nmap/nselib/openssl.luadoc
share/nmap/nselib/ospf.lua
+share/nmap/nselib/outlib.lua
share/nmap/nselib/packet.lua
share/nmap/nselib/pcre.luadoc
share/nmap/nselib/pgsql.lua
@@ -148,6 +165,7 @@ share/nmap/nselib/pop3.lua
share/nmap/nselib/pppoe.lua
share/nmap/nselib/proxy.lua
share/nmap/nselib/punycode.lua
+share/nmap/nselib/rand.lua
share/nmap/nselib/rdp.lua
share/nmap/nselib/re.lua
share/nmap/nselib/redis.lua
@@ -174,8 +192,10 @@ share/nmap/nselib/sslv2.lua
share/nmap/nselib/stdnse.lua
share/nmap/nselib/strbuf.lua
share/nmap/nselib/strict.lua
+share/nmap/nselib/stringaux.lua
share/nmap/nselib/stun.lua
share/nmap/nselib/tab.lua
+share/nmap/nselib/tableaux.lua
share/nmap/nselib/target.lua
share/nmap/nselib/tftp.lua
share/nmap/nselib/tls.lua
@@ -229,7 +249,9 @@ share/nmap/scripts/broadcast-dhcp6-discover.nse
share/nmap/scripts/broadcast-dns-service-discovery.nse
share/nmap/scripts/broadcast-dropbox-listener.nse
share/nmap/scripts/broadcast-eigrp-discovery.nse
+share/nmap/scripts/broadcast-hid-discoveryd.nse
share/nmap/scripts/broadcast-igmp-discovery.nse
+share/nmap/scripts/broadcast-jenkins-discover.nse
share/nmap/scripts/broadcast-listener.nse
share/nmap/scripts/broadcast-ms-sql-discover.nse
share/nmap/scripts/broadcast-netbios-master-browser.nse
@@ -279,6 +301,8 @@ share/nmap/scripts/daytime.nse
share/nmap/scripts/db2-das-info.nse
share/nmap/scripts/deluge-rpc-brute.nse
share/nmap/scripts/dhcp-discover.nse
+share/nmap/scripts/dicom-brute.nse
+share/nmap/scripts/dicom-ping.nse
share/nmap/scripts/dict-info.nse
share/nmap/scripts/distcc-cve2004-2687.nse
share/nmap/scripts/dns-blacklist.nse
@@ -343,7 +367,6 @@ share/nmap/scripts/hddtemp-info.nse
share/nmap/scripts/hnap-info.nse
share/nmap/scripts/hostmap-bfk.nse
share/nmap/scripts/hostmap-crtsh.nse
-share/nmap/scripts/hostmap-ip2hosts.nse
share/nmap/scripts/hostmap-robtex.nse
share/nmap/scripts/http-adobe-coldfusion-apsa1301.nse
share/nmap/scripts/http-affiliate-id.nse
@@ -393,6 +416,7 @@ share/nmap/scripts/http-gitweb-projects-enum.nse
share/nmap/scripts/http-google-malware.nse
share/nmap/scripts/http-grep.nse
share/nmap/scripts/http-headers.nse
+share/nmap/scripts/http-hp-ilo-info.nse
share/nmap/scripts/http-huawei-hg5xx-vuln.nse
share/nmap/scripts/http-icloud-findmyiphone.nse
share/nmap/scripts/http-icloud-sendmsg.nse
@@ -424,6 +448,7 @@ share/nmap/scripts/http-rfi-spider.nse
share/nmap/scripts/http-robots.txt.nse
share/nmap/scripts/http-robtex-reverse-ip.nse
share/nmap/scripts/http-robtex-shared-ns.nse
+share/nmap/scripts/http-sap-netweaver-leak.nse
share/nmap/scripts/http-security-headers.nse
share/nmap/scripts/http-server-header.nse
share/nmap/scripts/http-shellshock.nse
@@ -477,6 +502,7 @@ share/nmap/scripts/http-wordpress-brute.nse
share/nmap/scripts/http-wordpress-enum.nse
share/nmap/scripts/http-wordpress-users.nse
share/nmap/scripts/http-xssed.nse
+share/nmap/scripts/https-redirect.nse
share/nmap/scripts/iax2-brute.nse
share/nmap/scripts/iax2-version.nse
share/nmap/scripts/icap-info.nse
@@ -526,6 +552,7 @@ share/nmap/scripts/ldap-search.nse
share/nmap/scripts/lexmark-config.nse
share/nmap/scripts/llmnr-resolve.nse
share/nmap/scripts/lltd-discovery.nse
+share/nmap/scripts/lu-enum.nse
share/nmap/scripts/maxdb-info.nse
share/nmap/scripts/mcafee-epo-agent.nse
share/nmap/scripts/membase-brute.nse
@@ -571,6 +598,7 @@ share/nmap/scripts/mysql-vuln-cve2012-2122.nse
share/nmap/scripts/nat-pmp-info.nse
share/nmap/scripts/nat-pmp-mapport.nse
share/nmap/scripts/nbd-info.nse
+share/nmap/scripts/nbns-interfaces.nse
share/nmap/scripts/nbstat.nse
share/nmap/scripts/ncp-enum-users.nse
share/nmap/scripts/ncp-serverinfo.nse
@@ -596,6 +624,7 @@ share/nmap/scripts/ntp-monlist.nse
share/nmap/scripts/omp2-brute.nse
share/nmap/scripts/omp2-enum-targets.nse
share/nmap/scripts/omron-info.nse
+share/nmap/scripts/openflow-info.nse
share/nmap/scripts/openlookup-info.nse
share/nmap/scripts/openvas-otp-brute.nse
share/nmap/scripts/openwebnet-discovery.nse
@@ -614,6 +643,7 @@ share/nmap/scripts/pjl-ready-message.nse
share/nmap/scripts/pop3-brute.nse
share/nmap/scripts/pop3-capabilities.nse
share/nmap/scripts/pop3-ntlm-info.nse
+share/nmap/scripts/port-states.nse
share/nmap/scripts/pptp-version.nse
share/nmap/scripts/puppet-naivesigning.nse
share/nmap/scripts/qconn-exec.nse
@@ -622,6 +652,7 @@ share/nmap/scripts/quake1-info.nse
share/nmap/scripts/quake3-info.nse
share/nmap/scripts/quake3-master-getservers.nse
share/nmap/scripts/rdp-enum-encryption.nse
+share/nmap/scripts/rdp-ntlm-info.nse
share/nmap/scripts/rdp-vuln-ms12-020.nse
share/nmap/scripts/realvnc-auth-bypass.nse
share/nmap/scripts/redis-brute.nse
@@ -683,6 +714,8 @@ share/nmap/scripts/smb-vuln-ms10-054.nse
share/nmap/scripts/smb-vuln-ms10-061.nse
share/nmap/scripts/smb-vuln-ms17-010.nse
share/nmap/scripts/smb-vuln-regsvc-dos.nse
+share/nmap/scripts/smb-vuln-webexec.nse
+share/nmap/scripts/smb-webexec-exploit.nse
share/nmap/scripts/smb2-capabilities.nse
share/nmap/scripts/smb2-security-mode.nse
share/nmap/scripts/smb2-time.nse
@@ -751,6 +784,7 @@ share/nmap/scripts/telnet-brute.nse
share/nmap/scripts/telnet-encryption.nse
share/nmap/scripts/telnet-ntlm-info.nse
share/nmap/scripts/tftp-enum.nse
+share/nmap/scripts/tftp-version.nse
share/nmap/scripts/tls-alpn.nse
share/nmap/scripts/tls-nextprotoneg.nse
share/nmap/scripts/tls-ticketbleed.nse
@@ -759,9 +793,11 @@ share/nmap/scripts/tor-consensus-checker.nse
share/nmap/scripts/traceroute-geolocation.nse
share/nmap/scripts/tso-brute.nse
share/nmap/scripts/tso-enum.nse
+share/nmap/scripts/ubiquiti-discovery.nse
share/nmap/scripts/unittest.nse
share/nmap/scripts/unusual-port.nse
share/nmap/scripts/upnp-info.nse
+share/nmap/scripts/uptime-agent-info.nse
share/nmap/scripts/url-snarf.nse
share/nmap/scripts/ventrilo-info.nse
share/nmap/scripts/versant-info.nse
@@ -772,6 +808,7 @@ share/nmap/scripts/vnc-info.nse
share/nmap/scripts/vnc-title.nse
share/nmap/scripts/voldemort-info.nse
share/nmap/scripts/vtam-enum.nse
+share/nmap/scripts/vulners.nse
share/nmap/scripts/vuze-dht-info.nse
share/nmap/scripts/wdb-version.nse
share/nmap/scripts/weblogic-t3-info.nse
diff --git a/system/lscpu/Makefile b/system/lscpu/Makefile
index 8f14918b..25acb958 100644
--- a/system/lscpu/Makefile
+++ b/system/lscpu/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD: head/sysutils/lscpu/Makefile 476951 2018-08-12 01:57:26Z zi $
PORTNAME= lscpu
-PORTVERSION= 1.2.0
+PORTVERSION= 1.3.0
CATEGORIES= sysutils
MAINTAINER= zi@FreeBSD.org
diff --git a/system/lscpu/distinfo b/system/lscpu/distinfo
index eaaba38a..ee559654 100644
--- a/system/lscpu/distinfo
+++ b/system/lscpu/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1534038982
-SHA256 (NanXiao-lscpu-1.2.0_GH0.tar.gz) = d91a87694bd14a26b1ed8cd44d62444d93e68eaf98db6488b3abd36ad09a6bcc
-SIZE (NanXiao-lscpu-1.2.0_GH0.tar.gz) = 7863
+TIMESTAMP = 1755636053
+SHA256 (NanXiao-lscpu-1.3.0_GH0.tar.gz) = ce6fc8f4b6fbc67f11b95821137682f3e27f0c660b74a0cce4c7a72d642b3afe
+SIZE (NanXiao-lscpu-1.3.0_GH0.tar.gz) = 7954