mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
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
This commit is contained in:
parent
8ec2cc2af3
commit
a03e3a2f72
2 changed files with 40 additions and 0 deletions
|
@ -37,6 +37,8 @@ post-extract: .SILENT
|
||||||
${TAR} xzf ${_DISTDIR}/gcc-${GCC_VER}.tar.gz -C ${WRKDIR}
|
${TAR} xzf ${_DISTDIR}/gcc-${GCC_VER}.tar.gz -C ${WRKDIR}
|
||||||
# Patch GCC a bit
|
# Patch GCC a bit
|
||||||
${PATCH} -d ${GCC_DIR} -s < ${WRKSRC}/gcc-target/patches-${GCC_VER}
|
${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
|
# Prepare GCC by creating proper config symlink
|
||||||
${LN} -sf ../../saturn/gcc-target/config-saturn ${GCC_DIR}/config/saturn
|
${LN} -sf ../../saturn/gcc-target/config-saturn ${GCC_DIR}/config/saturn
|
||||||
# Allow GCC to build in our environment
|
# Allow GCC to build in our environment
|
||||||
|
|
38
devel/hp48xgcc/files/patch-gcc-genattr.c
Normal file
38
devel/hp48xgcc/files/patch-gcc-genattr.c
Normal file
|
@ -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);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue