diff options
author | dinoex <dinoex@FreeBSD.org> | 2009-08-21 12:39:28 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2009-08-21 12:39:28 +0800 |
commit | d2d085e82a0db947c003d97266a49b89b616fe73 (patch) | |
tree | 521b33aed01b49acabbf8b71cac2ecc55f255544 | |
parent | fd4d71fd85d664a7e632ae4313721e37f8f9cb49 (diff) | |
download | freebsd-ports-gnome-d2d085e82a0db947c003d97266a49b89b616fe73.tar.gz freebsd-ports-gnome-d2d085e82a0db947c003d97266a49b89b616fe73.tar.zst freebsd-ports-gnome-d2d085e82a0db947c003d97266a49b89b616fe73.zip |
- add experimetal support for new archs
-rw-r--r-- | lang/tcc/Makefile | 14 | ||||
-rw-r--r-- | lang/tcc/files/patch-Makefile | 45 | ||||
-rw-r--r-- | lang/tcc/files/patch-configure | 12 | ||||
-rw-r--r-- | lang/tcc/files/patch-libtcc.c | 21 | ||||
-rw-r--r-- | lang/tcc/pkg-plist | 2 |
5 files changed, 89 insertions, 5 deletions
diff --git a/lang/tcc/Makefile b/lang/tcc/Makefile index 770def7489a0..2d8adbd11a55 100644 --- a/lang/tcc/Makefile +++ b/lang/tcc/Makefile @@ -15,6 +15,8 @@ MAINTAINER= dinoex@FreeBSD.org COMMENT= Tiny C Compiler ONLY_FOR_ARCHS= i386 +#ONLY_FOR_ARCHS= i386 amd64 arm alpha mips powerpc + CONFLICTS= TenDRA-* USE_BZIP2= yes @@ -25,7 +27,15 @@ MAKE_ARGS+= CONFIG_NOLDL=1 MAN1= tcc.1 .if defined(NOPORTDOCS) -MAKE_ARGS+= NOPORTDOCS=1 +MAKE_ARGS+= NOPORTDOCS=1 CFLAGS="${CFLAGS}" +.endif + +.include <bsd.port.pre.mk> + +.if (${ARCH} == i386) +PLIST_SUB+= WITH_I386="" +.else +PLIST_SUB+= WITH_I386="@comment " .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/lang/tcc/files/patch-Makefile b/lang/tcc/files/patch-Makefile index 919887498898..b8248da8158b 100644 --- a/lang/tcc/files/patch-Makefile +++ b/lang/tcc/files/patch-Makefile @@ -1,6 +1,47 @@ --- Makefile.orig 2009-05-18 16:27:06.000000000 +0200 -+++ Makefile 2009-05-21 06:39:33.000000000 +0200 -@@ -210,8 +210,10 @@ ++++ Makefile 2009-07-03 07:40:15.000000000 +0200 +@@ -28,6 +28,9 @@ + ifeq ($(ARCH),x86-64) + CFLAGS+=-Wno-pointer-sign + endif ++ifeq ($(ARCH),amd64) ++CFLAGS+=-Wno-pointer-sign ++endif + + ifndef CONFIG_WIN32 + LIBS=-lm +@@ -53,6 +56,11 @@ + ifeq ($(ARCH),x86-64) + NATIVE_TARGET=-DTCC_TARGET_X86_64 + LIBTCC1=libtcc1.a ++else ++ifeq ($(ARCH),amd64) ++NATIVE_TARGET=-DTCC_TARGET_X86_64 ++LIBTCC1=libtcc1.a ++endif + endif + endif + endif +@@ -99,6 +107,10 @@ + NATIVE_FILES=$(X86_64_FILES) + PROGS_CROSS=$(I386_CROSS) $(WIN32_CROSS) $(ARM_CROSS) $(C67_CROSS) + else ++ifeq ($(ARCH),amd64) ++NATIVE_FILES=$(X86_64_FILES) ++PROGS_CROSS=$(I386_CROSS) $(WIN32_CROSS) $(ARM_CROSS) $(C67_CROSS) ++else + ifeq ($(ARCH),arm) + NATIVE_FILES=$(ARM_FILES) + PROGS_CROSS=$(I386_CROSS) $(X64_CROSS) $(WIN32_CROSS) $(C67_CROSS) +@@ -106,6 +118,7 @@ + endif + endif + endif ++endif + + ifdef CONFIG_CROSS + PROGS+=$(PROGS_CROSS) +@@ -210,8 +223,10 @@ $(INSTALL) -m644 $(BCHECK_O) "$(tccdir)" endif $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include" diff --git a/lang/tcc/files/patch-configure b/lang/tcc/files/patch-configure new file mode 100644 index 000000000000..15d6f7241aca --- /dev/null +++ b/lang/tcc/files/patch-configure @@ -0,0 +1,12 @@ +--- configure.orig 2009-05-18 16:27:06.000000000 +0200 ++++ configure 2009-07-03 07:32:51.000000000 +0200 +@@ -38,6 +38,9 @@ + i386|i486|i586|i686|i86pc|BePC) + cpu="x86" + ;; ++ amd64) ++ cpu="x86-64" ++ ;; + x86_64) + cpu="x86-64" + ;; diff --git a/lang/tcc/files/patch-libtcc.c b/lang/tcc/files/patch-libtcc.c new file mode 100644 index 000000000000..9c514b3dcfc7 --- /dev/null +++ b/lang/tcc/files/patch-libtcc.c @@ -0,0 +1,21 @@ +--- libtcc.c.orig 2009-05-18 16:27:06.000000000 +0200 ++++ libtcc.c 2009-07-03 07:51:05.000000000 +0200 +@@ -1509,10 +1509,18 @@ + + if (level == 0) { + /* XXX: only support linux */ ++#if defined(__FreeBSD__) ++ *paddr = uc->uc_mcontext.mc_rip; ++#else + *paddr = uc->uc_mcontext.gregs[REG_RIP]; ++#endif + return 0; + } else { ++#if defined(__FreeBSD__) ++ fp = uc->uc_mcontext.mc_rbp; ++#else + fp = uc->uc_mcontext.gregs[REG_RBP]; ++#endif + for(i=1;i<level;i++) { + /* XXX: check address validity with program info */ + if (fp <= 0x1000) diff --git a/lang/tcc/pkg-plist b/lang/tcc/pkg-plist index 819010325661..a3c870221352 100644 --- a/lang/tcc/pkg-plist +++ b/lang/tcc/pkg-plist @@ -1,7 +1,7 @@ bin/tcc include/libtcc.h lib/libtcc.a -lib/tcc/bcheck.o +%%WITH_I386%%lib/tcc/bcheck.o lib/tcc/include/float.h lib/tcc/include/stdarg.h lib/tcc/include/stdbool.h |