View | Details | Raw Unified | Return to bug 202093
Collapse All | Expand All

(-)/usr/ports/lang/tcc/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	tcc
3
PORTNAME=	tcc
4
PORTVERSION=	0.9.26
4
PORTVERSION=	0.9.26
5
PORTREVISION=	2
5
PORTREVISION=	3
6
CATEGORIES=	lang
6
CATEGORIES=	lang
7
MASTER_SITES=	SAVANNAH/tinycc
7
MASTER_SITES=	SAVANNAH/tinycc
8
8
(-)/usr/ports/lang/tcc/files/patch-configure (+30 lines)
Line 0 Link Here
1
--- configure.orig	2013-02-15 14:24:00 UTC
2
+++ configure
3
@@ -45,6 +45,7 @@ tcc_crtprefix=""
4
 tcc_elfinterp=""
5
 tcc_lddir=
6
 confvars=
7
+define_va_list=""
8
 
9
 cpu=`uname -m`
10
 
11
@@ -332,6 +333,9 @@ if test -z "$cross_prefix" ; then
12
 
13
     fi
14
   fi
15
+  if ! $cc -o $CONFTEST -c $source_path/va_list.c 2>/dev/null ; then
16
+    define_va_list="yes"
17
+  fi
18
 else
19
   # if cross compiling, cannot launch a program, so make a static guess
20
   case $cpu in
21
@@ -483,6 +487,9 @@ if test "$have_selinux" = "yes" ; then
22
   echo "#define HAVE_SELINUX" >> $TMPH
23
   echo "HAVE_SELINUX=yes" >> config.mak
24
 fi
25
+if test "$define_va_list" = "yes" ; then
26
+  echo "#define DEFINE_VA_LIST" >> $TMPH
27
+fi
28
 
29
 version=`head $source_path/VERSION`
30
 echo "VERSION=$version" >>config.mak
(-)/usr/ports/lang/tcc/files/patch-lib_Makefile (-1 / +1 lines)
Lines 1-4 Link Here
1
--- lib/Makefile.orig	2015-07-21 22:05:25 UTC
1
--- lib/Makefile.orig	2013-02-15 14:24:00 UTC
2
+++ lib/Makefile
2
+++ lib/Makefile
3
@@ -40,7 +40,7 @@ native : TCC = $(TOP)/tcc$(EXESUF)
3
@@ -40,7 +40,7 @@ native : TCC = $(TOP)/tcc$(EXESUF)
4
 cross : TCC = $(TOP)/$(TARGET)-tcc$(EXESUF)
4
 cross : TCC = $(TOP)/$(TARGET)-tcc$(EXESUF)
(-)/usr/ports/lang/tcc/files/patch-libtcc.c (+28 lines)
Line 0 Link Here
1
--- libtcc.c.orig	2013-02-15 14:24:00 UTC
2
+++ libtcc.c
3
@@ -931,7 +931,11 @@ LIBTCCAPI TCCState *tcc_new(void)
4
     tcc_define_symbol(s, "__i386", NULL);
5
     tcc_define_symbol(s, "i386", NULL);
6
 #elif defined(TCC_TARGET_X86_64)
7
+# if defined(__FreeBSD__)
8
+    tcc_define_symbol(s, "__amd64__", NULL);
9
+# endif
10
     tcc_define_symbol(s, "__x86_64__", NULL);
11
+    tcc_define_symbol(s, "__LP64__", NULL);
12
 #elif defined(TCC_TARGET_ARM)
13
     tcc_define_symbol(s, "__ARM_ARCH_4__", NULL);
14
     tcc_define_symbol(s, "__arm_elf__", NULL);
15
@@ -957,6 +961,13 @@ LIBTCCAPI TCCState *tcc_new(void)
16
     tcc_define_symbol(s, "__linux", NULL);
17
 # endif
18
 # if defined(__FreeBSD__)
19
+#  if defined(DEFINE_VA_LIST)
20
+#   if defined(TCC_TARGET_X86_64)
21
+    tcc_define_symbol(s, "__va_list", "struct { long pad[3]; }");
22
+#   else
23
+    tcc_define_symbol(s, "__va_list", "char *");
24
+#   endif
25
+#  endif
26
 #  define str(s) #s
27
     tcc_define_symbol(s, "__FreeBSD__", str( __FreeBSD__));
28
 #  undef str
(-)/usr/ports/lang/tcc/files/patch-va__list.c (+9 lines)
Line 0 Link Here
1
--- va_list.c.orig	2015-08-04 22:06:53 UTC
2
+++ va_list.c
3
@@ -0,0 +1,6 @@
4
+#ifdef __FreeBSD__
5
+#undef __GNUC__
6
+#undef __GNUC_MINOR__
7
+#include <sys/types.h>
8
+void foo(__va_list);
9
+#endif

Return to bug 202093