This commit is contained in:
2025-08-25 16:16:32 +02:00
parent 3141cacd8a
commit 4b5c2a9467
93 changed files with 2984 additions and 241 deletions

View File

@@ -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%/ \

View File

@@ -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}

View File

@@ -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

View File

@@ -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 <http://www.gnu.org/licenses/>.
.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

View File

@@ -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' \

View File

@@ -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

View File

@@ -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 <bsd.port.pre.mk>
.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 <bsd.port.post.mk>
.include <bsd.port.mk>
#EOF

View File

@@ -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

View File

@@ -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 <bsd.port.post.mk>
#EOF

View File

@@ -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

View File

@@ -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 <bsd.port.pre.mk>

View File

@@ -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

View File

@@ -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;

View File

@@ -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)
{

View File

@@ -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

View File

@@ -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;

View File

@@ -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:

View File

@@ -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;

View File

@@ -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 <mpfr.h>

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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);
}
}

View File

@@ -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 }, \

View File

@@ -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

117
devel/avr-gcc14/Makefile Normal file
View File

@@ -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 <bsd.port.pre.mk>
#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 <bsd.port.post.mk>
#EOF

3
devel/avr-gcc14/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1755760177
SHA256 (gnu/gcc-14.2.0.tar.xz) = a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
SIZE (gnu/gcc-14.2.0.tar.xz) = 92306460

View File

@@ -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) \

View File

@@ -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_
+

View File

@@ -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 <sys/mman.h>
#endif

View File

@@ -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,

View File

@@ -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 <sys/param.h>
+# 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

View File

@@ -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"

View File

@@ -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)

View File

@@ -0,0 +1,13 @@
[
{ type: install
message: <<EOD
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using
-Wl,-rpath=%%TARGLIB%%
For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.
EOD
}
]

6
devel/gcc12/pkg-descr Normal file
View File

@@ -0,0 +1,6 @@
The GNU Ada compiler system built from GCC 4.1.2.
Please add ${PREFIX}/bin/gcc41 to your PATH variable
before using this port.
WWW: http://gcc.gnu.org/

116
devel/gcc14/Makefile Normal file
View File

@@ -0,0 +1,116 @@
#
# $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
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}
CONFIGURE_TARGET= ${TARGET}
USES+= tar:xz
GNU_CONFIGURE= yes
USES+= gmake
PATCH_STRIP= -p0
.include <bsd.port.pre.mk>
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 <bsd.port.post.mk>
#EOF

3
devel/gcc14/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1755760177
SHA256 (gnu/gcc-14.2.0.tar.xz) = a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
SIZE (gnu/gcc-14.2.0.tar.xz) = 92306460

View File

@@ -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,

View File

@@ -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)

View File

@@ -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 <sys/param.h>
+# 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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)

View File

@@ -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;
}

View File

@@ -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);
}
}

View File

@@ -0,0 +1,13 @@
[
{ type: install
message: <<EOD
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using
-Wl,-rpath=%%TARGLIB%%
For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens
transparently.
EOD
}
]

6
devel/gcc14/pkg-descr Normal file
View File

@@ -0,0 +1,6 @@
The GNU Ada compiler system built from GCC 4.1.2.
Please add ${PREFIX}/bin/gcc41 to your PATH variable
before using this port.
WWW: http://gcc.gnu.org/

1716
devel/gcc14/pkg-plist.amd64 Normal file

File diff suppressed because it is too large Load Diff

25
find-installed.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
pkgs=$(pkg info | awk '{print $1}')
echo $pkgs
#exit
ports=""
for mk in $(find /usr/ports/ -name 'Makefile' -maxdepth 3); do
portdir=$(dirname $mk)
port=$(cd $portdir && make package-name)
ports="$ports $portdir:$port"
echo $port
done
echo $ports
echo "================"
for pkg in $pkgs;do
for port in $ports; do
portname=$(echo $port | cut -d: -f2)
test "xxx$pkg" == "xxx$portname" && echo "==:$port"
done
done

View File

@@ -2,7 +2,7 @@
# $Id$
#
PORTNAME= nmap
PORTVERSION= 7.70
PORTVERSION= 7.94
CATEGORIES= security
MASTER_SITES+= http://nmap.org/dist/
MASTER_SITES+= http://download.insecure.org/nmap/dist/

View File

@@ -1,2 +1,3 @@
SHA256 (nmap-7.70.tar.bz2) = 847b068955f792f4cc247593aca6dc3dc4aae12976169873247488de147a6e18
SIZE (nmap-7.70.tar.bz2) = 10467371
TIMESTAMP = 1755758442
SHA256 (nmap-7.94.tar.bz2) = d71be189eec43d7e099bac8571509d316c4577ca79491832ac3e1217bc8f92cc
SIZE (nmap-7.94.tar.bz2) = 11102195

View File

@@ -1,6 +1,6 @@
--- Makefile.in.orig 2017-07-31 20:56:53 UTC
--- Makefile.in.orig 2020-08-27 19:13:31 UTC
+++ Makefile.in
@@ -13,7 +13,7 @@ mandir = @mandir@
@@ -10,7 +10,7 @@ mandir = @mandir@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
nmapdatadir = @datadir@/nmap

View File

@@ -1,6 +1,6 @@
--- configure.orig 2017-07-31 19:09:47 UTC
--- configure.orig 2020-08-27 19:13:31 UTC
+++ configure
@@ -2583,7 +2583,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA
@@ -2529,7 +2529,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.
@@ -9,7 +9,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&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.

View File

@@ -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 <stdint.h>
#endif
@@ -10,8 +10,8 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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@

View File

@@ -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 <openssl/pem.h>
#include <openssl/rand.h>
-#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

View File

@@ -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 <openssl/x509.h>
#include <openssl/x509v3.h>
-#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

View File

@@ -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 <openssl/ssl.h>
#include <openssl/err.h>
#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

View File

@@ -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 <shlobj.h>
#endif
+#include <getopt.h>
#include "nmap.h"

View File

@@ -0,0 +1,13 @@
--- nping/Crypto.cc.orig 2022-02-18 17:38:46 UTC
+++ nping/Crypto.cc
@@ -70,7 +70,9 @@
#include <openssl/evp.h>
#include <openssl/err.h>
-#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

View File

@@ -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 */

View File

@@ -0,0 +1,13 @@
--- nse_openssl.cc.orig 2022-09-01 22:22:29 UTC
+++ nse_openssl.cc
@@ -13,7 +13,9 @@
#include <openssl/hmac.h>
#include <openssl/rand.h>
-#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

View File

@@ -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 <openssl/evp.h>
#include <openssl/err.h>
-#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

View File

@@ -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 <set>
#include <vector>
#include <list>

View File

@@ -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 */

View File

@@ -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

View File

@@ -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

View File

@@ -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