Coder Social home page Coder Social logo

tccbin's Introduction

tccbin

This is a prebuild tcc (git://repo.or.cz/tinycc.git), cut at commit 9eef339 .

It is compiled with:

./configure --prefix=/var/tmp/tcc --crtprefix=/var/tmp/tcc/lib:/usr/lib64:/usr/lib/x86_64-linux-gnu --libpaths=/var/tmp/tcc/lib:/usr/lib/x86_64-linux-gnu:/usr/lib64:/usr/lib:/lib/x86_64-linux-gnu:/lib:/usr/local/lib/x86_64-linux-gnu:/usr/local/lib  --debug

tccbin's People

Contributors

medvednikov avatar spaceface777 avatar spytheman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tccbin's Issues

libgc.a for macos is built without `-mmacosx-version-min=10.7` breaking macos pre-12.0

Right now, using tcc (built from git) on macos 11 (or anything prior to 12.0) will fail with:

ld: warning: object file (/Users/x/d/v/thirdparty/tcc/lib/libgc.a(gc.o)) was built for newer macOS version (12.0) than being linked (10.7)
Undefined symbols for architecture x86_64:
  "____chkstk_darwin", referenced from:
      _GC_forward_exception in libgc.a(gc.o)
      _GC_mark_thread in libgc.a(gc.o)
ld: symbol(s) not found for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)

This is resolved by rebuilding libgc.a and passing the -mmacosx-version-min=10.7, which matches what v itself is passing to tcc internally.

This specifically affects https://github.com/vlang/tccbin/tree/thirdparty-macos-amd64

I've worked around this locally by manually rebuilding libgc.a with these commands (from the tcc repo):

cc -mmacosx-version-min=10.7 thirdparty/libgc/gc.c -c -o gc.o
libtool -static -o thirdparty/tcc/lib/libgc.a gc.o

(tangential relation to vlang/v#16386)

Branch content is swapped.

Branch "thirdparty-windows-amd64" contains i386-win32-tcc.exe
thirdparty-windows-i386 contains x86_64-win32-tcc.exe

TCC build does not support non latin symbols on the path

C:\Users\Вася\Desktop\learning>v run .
==================
C:/Users/17D3~1/AppData/Local/Temp/v_0/learning.10108219506391785254.tmp.c:7362: warning: cast between pointer and integer of different size
tcc: error: could not create 'C:\Users\Вася\Desktop\learning\learning.def': No such file or directory
...
==================
(Use `v -cg` to print the entire error message)

builder error:
==================
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

https://github.com/vlang/v/issues/new/choose

You can also use #help on Discord: https://discord.gg/vlang

Windows 10
After moving the v src file to something like "C:\learning\v" error doesnt occurred, no Вася allowed.

On branch thirdparty-freebsd-amd64 buildtcc.sh needs a fix

A linking failure, at least with the latest tcc (4410dbd):

cc -o tcc tcc.o libtcc.a -lm -lpthread -g
ld: error: undefined symbol: tcc_new
>>> referenced by tcc.c:283
>>>               lto.tmp:(main)

etc. The following fixes it:

diff --git a/buildtcc.sh b/buildtcc.sh
index 32faa74..81bc042 100644
--- a/buildtcc.sh
+++ b/buildtcc.sh
@@ -11,7 +11,7 @@ git clone git://repo.or.cz/tinycc.git
 cd tinycc

 export CC=cc
-export CFLAGS='-O3 -flto'
+export CFLAGS='-O3'

 ./configure \
             --prefix=thirdparty/tcc \

Ideally the script should exit 1 when any step fails rather than try to copy things in v/thirdparty/tcc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.