git: a03e3a2f72b4 - main - devel/hp48xgcc: unbreak the port's build against Clang 15
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Feb 2023 08:44:03 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=a03e3a2f72b4ec44072e20e921672ddcff05e835 commit a03e3a2f72b4ec44072e20e921672ddcff05e835 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2023-02-14 08:42:04 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2023-02-14 08:42:04 +0000 devel/hp48xgcc: unbreak the port's build against Clang 15 - Implement variadic function fatal() using <stdarg.h> API - While here, respect the user's preferred compiler ${CC} Obtained from: gcc-2.95.2.1 Reported by: pkg-fallout --- devel/hp48xgcc/Makefile | 2 ++ devel/hp48xgcc/files/patch-gcc-genattr.c | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/devel/hp48xgcc/Makefile b/devel/hp48xgcc/Makefile index 6a47ae030f83..4aa2d5680ead 100644 --- a/devel/hp48xgcc/Makefile +++ b/devel/hp48xgcc/Makefile @@ -37,6 +37,8 @@ post-extract: .SILENT ${TAR} xzf ${_DISTDIR}/gcc-${GCC_VER}.tar.gz -C ${WRKDIR} # Patch GCC a bit ${PATCH} -d ${GCC_DIR} -s < ${WRKSRC}/gcc-target/patches-${GCC_VER} +# Respect user's preferred compiler + ${REINPLACE_CMD} -e 's,CC = cc,CC = ${CC},' ${GCC_DIR}/Makefile.in # Prepare GCC by creating proper config symlink ${LN} -sf ../../saturn/gcc-target/config-saturn ${GCC_DIR}/config/saturn # Allow GCC to build in our environment diff --git a/devel/hp48xgcc/files/patch-gcc-genattr.c b/devel/hp48xgcc/files/patch-gcc-genattr.c new file mode 100644 index 000000000000..2d9d8ac1768e --- /dev/null +++ b/devel/hp48xgcc/files/patch-gcc-genattr.c @@ -0,0 +1,38 @@ +--- ../gcc-2.7.2/genattr.c.orig 1995-06-15 11:38:53 UTC ++++ ../gcc-2.7.2/genattr.c +@@ -20,6 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite + Boston, MA 02111-1307, USA. */ + + ++#include <stdarg.h> + #include <stdio.h> + #include "hconfig.h" + #include "rtl.h" +@@ -35,7 +36,7 @@ extern void free PROTO((void *)); + extern rtx read_rtx PROTO((FILE *)); + + char *xmalloc PROTO((unsigned)); +-static void fatal (); ++static void fatal PVPROTO ((const char *, ...)); + void fancy_abort PROTO((void)); + + /* A range of values. */ +@@ -214,11 +215,15 @@ xrealloc (ptr, size) + } + + static void +-fatal (s, a1, a2) +- char *s; ++fatal VPROTO ((const char *format, ...)) + { ++ va_list ap; ++ ++ VA_START (ap, format); ++ + fprintf (stderr, "genattr: "); +- fprintf (stderr, s, a1, a2); ++ vfprintf (stderr, format, ap); ++ va_end (ap); + fprintf (stderr, "\n"); + exit (FATAL_EXIT_CODE); + }