I built Perl 5 with tcc a while ago (read: it might no longer work;
unfortunately, I don't have time to test right now). IIRC it worked
okay, though it required some minor changes that are in the patch I've
attached. Sorry there's some other crud in it that you're not going to
need, and I hope the patch still applies to blead.

I used ./Configure -Uusedl -Dusedevel -Dcc='gdb --ex run --ex bt
--batch --args tcc' -Dld=ld -Ddynamic_ext=none
-Dccflags=-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Dccdlflags=-fPIC -de && make -k && sudo make
-k install

though obviously you want to modify that if you don't need gdb backtraces :-)

Can you report back on whether that works for you? I'm hoping to get
back soon to something that requires a tcc-built perl5.


On Thu, Jul 16, 2015 at 10:08 PM, Chris Marshall <[email protected]> wrote:
> I would like to integrate tcc with some perl5 programs to the best extent
> possible.
> Has anyone tried and/or reported being able to build perl5 with tcc?
>
> Thanks,
> Chris
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
diff --git a/.sivtar.sh b/.sivtar.sh
new file mode 100644
index 0000000..a5ca12f
--- /dev/null
+++ b/.sivtar.sh
@@ -0,0 +1,3 @@
+bash ./Configure -des -Dusedevel &&
+    make &&
+    sudo make install
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..29249e7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,11 @@
+language: C
+
+before_install:
+  - git clone --branch "$TCC_PERL_BRANCH" --recurse 
https://github.com/pipcet/tinycc && cd tinycc && ./configure && make && sudo 
make install && cd ..
+
+script:
+  - ./Configure -Uusedl -Dusedevel -Dcc=tcc -Dld=ld -Ddynamic_ext=none 
-Dccflags=-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-Dccdlflags=-fPIC -de && make -k && sudo make -k install
+
+env:
+  - TCC_PERL_BRANCH="exsymtab"
+  - TCC_PERL_BRANCH="pipcet"
diff --git a/Configure b/Configure
index 0a405d3..c777db7 100755
--- a/Configure
+++ b/Configure
@@ -15917,6 +15917,9 @@ EOCP
        fi;
        $rm_try
        ;;
+*)
+        d_lc_monetary_2008="$undef"
+        ;;
 esac
 
 : see if lchown exists
diff --git a/ext/SDBM_File/sdbm.h b/ext/SDBM_File/sdbm.h
index e7cf730..a94cc0e 100644
--- a/ext/SDBM_File/sdbm.h
+++ b/ext/SDBM_File/sdbm.h
@@ -51,11 +51,10 @@ typedef struct {
        int dsize;
 } datum;
 
-extern const datum nullitem
+extern const datum nullitem;
 #ifdef DOINIT
-                        = {0, 0}
+const datum nullitem  = {0, 0};
 #endif
-                                   ;
 
 #if defined(__STDC__) || defined(__cplusplus) || defined(CAN_PROTOTYPE)
 #define proto(p) p
diff --git a/perl.h b/perl.h
index 7313de0..a31ef2e 100644
--- a/perl.h
+++ b/perl.h
@@ -3543,6 +3543,12 @@ typedef pthread_key_t    perl_key;
    STATIC_ASSERT_STMT expands to a statement and is suitable for use inside a
    function.
 */
+#if defined(__TINYC__)
+/* TinyCC does not support _Static_assert, even when using the GNU
+   headers saying it does. */
+#  define _Static_assert(e,e2) do { } while(0)
+#endif
+
 #if (defined(static_assert) || (defined(__cplusplus) && __cplusplus >= 
201103L)) && (!defined(__IBMC__) || __IBMC__ >= 1210)
 /* static_assert is a macro defined in <assert.h> in C11 or a compiler
    builtin in C++11.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to