aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek Rutkowski <robak@FreeBSD.org>2015-08-05 13:18:22 +0000
committerBartek Rutkowski <robak@FreeBSD.org>2015-08-05 13:18:22 +0000
commitd69c2fb4f334175f3150dca5c354ef02454f2407 (patch)
tree078d39c5c12c7e9026283f8341a5d396e07d989f
parent63728b1c93b1c2aa7585bc8c20afaaa50d2578d1 (diff)
downloadports-d69c2fb4f334175f3150dca5c354ef02454f2407.tar.gz
ports-d69c2fb4f334175f3150dca5c354ef02454f2407.zip
Notes
-rw-r--r--lang/tcc/Makefile2
-rw-r--r--lang/tcc/files/patch-configure30
-rw-r--r--lang/tcc/files/patch-lib_Makefile2
-rw-r--r--lang/tcc/files/patch-libtcc.c28
-rw-r--r--lang/tcc/files/patch-va__list.c9
5 files changed, 69 insertions, 2 deletions
diff --git a/lang/tcc/Makefile b/lang/tcc/Makefile
index 72b016e43c21..77063416c772 100644
--- a/lang/tcc/Makefile
+++ b/lang/tcc/Makefile
@@ -2,7 +2,7 @@
PORTNAME= tcc
PORTVERSION= 0.9.26
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= lang
MASTER_SITES= SAVANNAH/tinycc
diff --git a/lang/tcc/files/patch-configure b/lang/tcc/files/patch-configure
new file mode 100644
index 000000000000..979af4e42c90
--- /dev/null
+++ b/lang/tcc/files/patch-configure
@@ -0,0 +1,30 @@
+--- configure.orig 2013-02-15 14:24:00 UTC
++++ configure
+@@ -45,6 +45,7 @@ tcc_crtprefix=""
+ tcc_elfinterp=""
+ tcc_lddir=
+ confvars=
++define_va_list=""
+
+ cpu=`uname -m`
+
+@@ -332,6 +333,9 @@ if test -z "$cross_prefix" ; then
+
+ fi
+ fi
++ if ! $cc -o $CONFTEST -c $source_path/va_list.c 2>/dev/null ; then
++ define_va_list="yes"
++ fi
+ else
+ # if cross compiling, cannot launch a program, so make a static guess
+ case $cpu in
+@@ -483,6 +487,9 @@ if test "$have_selinux" = "yes" ; then
+ echo "#define HAVE_SELINUX" >> $TMPH
+ echo "HAVE_SELINUX=yes" >> config.mak
+ fi
++if test "$define_va_list" = "yes" ; then
++ echo "#define DEFINE_VA_LIST" >> $TMPH
++fi
+
+ version=`head $source_path/VERSION`
+ echo "VERSION=$version" >>config.mak
diff --git a/lang/tcc/files/patch-lib_Makefile b/lang/tcc/files/patch-lib_Makefile
index 3ad891d58461..6c30b495f3de 100644
--- a/lang/tcc/files/patch-lib_Makefile
+++ b/lang/tcc/files/patch-lib_Makefile
@@ -1,4 +1,4 @@
---- lib/Makefile.orig 2015-07-21 22:05:25 UTC
+--- lib/Makefile.orig 2013-02-15 14:24:00 UTC
+++ lib/Makefile
@@ -40,7 +40,7 @@ native : TCC = $(TOP)/tcc$(EXESUF)
cross : TCC = $(TOP)/$(TARGET)-tcc$(EXESUF)
diff --git a/lang/tcc/files/patch-libtcc.c b/lang/tcc/files/patch-libtcc.c
new file mode 100644
index 000000000000..0df9ac88dcdd
--- /dev/null
+++ b/lang/tcc/files/patch-libtcc.c
@@ -0,0 +1,28 @@
+--- libtcc.c.orig 2013-02-15 14:24:00 UTC
++++ libtcc.c
+@@ -931,7 +931,11 @@ LIBTCCAPI TCCState *tcc_new(void)
+ tcc_define_symbol(s, "__i386", NULL);
+ tcc_define_symbol(s, "i386", NULL);
+ #elif defined(TCC_TARGET_X86_64)
++# if defined(__FreeBSD__)
++ tcc_define_symbol(s, "__amd64__", NULL);
++# endif
+ tcc_define_symbol(s, "__x86_64__", NULL);
++ tcc_define_symbol(s, "__LP64__", NULL);
+ #elif defined(TCC_TARGET_ARM)
+ tcc_define_symbol(s, "__ARM_ARCH_4__", NULL);
+ tcc_define_symbol(s, "__arm_elf__", NULL);
+@@ -957,6 +961,13 @@ LIBTCCAPI TCCState *tcc_new(void)
+ tcc_define_symbol(s, "__linux", NULL);
+ # endif
+ # if defined(__FreeBSD__)
++# if defined(DEFINE_VA_LIST)
++# if defined(TCC_TARGET_X86_64)
++ tcc_define_symbol(s, "__va_list", "struct { long pad[3]; }");
++# else
++ tcc_define_symbol(s, "__va_list", "char *");
++# endif
++# endif
+ # define str(s) #s
+ tcc_define_symbol(s, "__FreeBSD__", str( __FreeBSD__));
+ # undef str
diff --git a/lang/tcc/files/patch-va__list.c b/lang/tcc/files/patch-va__list.c
new file mode 100644
index 000000000000..93ac0f1a22d6
--- /dev/null
+++ b/lang/tcc/files/patch-va__list.c
@@ -0,0 +1,9 @@
+--- va_list.c.orig 2015-08-04 22:06:53 UTC
++++ va_list.c
+@@ -0,0 +1,6 @@
++#ifdef __FreeBSD__
++#undef __GNUC__
++#undef __GNUC_MINOR__
++#include <sys/types.h>
++void foo(__va_list);
++#endif