-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding tcc support #73
Comments
Hi Norayr,
Nice to be supporting a small and simple(r) C compiler.
I've added comments to your commit - there's a better, simpler way to
disable static linking for tcc, but otherwise looks good. I've never
given comments on github before, so please let me know whether you see
them OK.
I will look into getting all my build machines running again. At least
some of them should be easy ... I hope.
And I'm hoping the removal of the space after -l won't be an issue.
Re tcc on windows - I've no idea what would be required, maybe it would
just work, maybe it would be a lot of trouble. Is it important?
Cheers -- Dave.
On 2019-10-10 15:01, Norayr Chilingarian wrote:
hello, @dcwbrown [1]
I have added initial support for tcc compiler.
I did it mostly because I have a request to add it by the company, which has to use only tcc compiler for one important project.
Also, tcc seems to be a fairly good compiler (I checked it back 10 years ago, and it wasn't stable enough, as I remember) nowadays, fairly fast, much faster than gcc/clanng, and generates slimmer binaries.
Please review my changes in dedicated tcc_support branch:
a35668b [2]
9626a95 [3]
I had to add:
*
#elif defined(TINYC) case in src/tools/make/configure.c
*
ifeq condition for tcc compiler in src/tools/make/oberon.mk
(though tcc seems to support -static flag, it was not able to combine object files into one executable while using that flag).
*
I had to change the line snprintf(libspec, sizeof(libspec), " -l%s", oname); where I removed whitespace between -l and %s because otherwise tcc was failing.
I also had to update bootstrap sources.
I only have linux/x86_64, and cannot test the changes now on other Unix systems.
Also, tcc is available for Windows, so I am looking forward for your suggestions on how to integrate tcc related changes in to the mainline voc source.
--
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [4], or unsubscribe [5].
Links:
------
[1] https://github.com/dcwbrown
[2]
a35668b
[3]
9626a95
[4]
#73
[5]
https://github.com/notifications/unsubscribe-auth/AAYKDIHFEBG7UNOD6UQAIY3QN4YUFANCNFSM4I7NLYJA
|
Greetings all
David, would you mind if I setup the build infrastructure?
I’m thinking about using BuildBot and generate artifacts and serve them from my home server.
However, if you agree, I might need your help to setup agents on non-intel devices :)
Let me know.
…Sent from my iPhone
On Oct 10, 2019, at 9:25 PM, David C W Brown ***@***.***> wrote:
Hi Norayr,
Nice to be supporting a small and simple(r) C compiler.
I've added comments to your commit - there's a better, simpler way to
disable static linking for tcc, but otherwise looks good. I've never
given comments on github before, so please let me know whether you see
them OK.
I will look into getting all my build machines running again. At least
some of them should be easy ... I hope.
And I'm hoping the removal of the space after -l won't be an issue.
Re tcc on windows - I've no idea what would be required, maybe it would
just work, maybe it would be a lot of trouble. Is it important?
Cheers -- Dave.
On 2019-10-10 15:01, Norayr Chilingarian wrote:
> hello, @dcwbrown [1]
>
> I have added initial support for tcc compiler.
> I did it mostly because I have a request to add it by the company, which has to use only tcc compiler for one important project.
> Also, tcc seems to be a fairly good compiler (I checked it back 10 years ago, and it wasn't stable enough, as I remember) nowadays, fairly fast, much faster than gcc/clanng, and generates slimmer binaries.
>
> Please review my changes in dedicated tcc_support branch:
> a35668b [2]
> 9626a95 [3]
>
> I had to add:
>
> *
>
> #elif defined(TINYC) case in src/tools/make/configure.c
> *
>
> ifeq condition for tcc compiler in src/tools/make/oberon.mk
> (though tcc seems to support -static flag, it was not able to combine object files into one executable while using that flag).
> *
>
> I had to change the line snprintf(libspec, sizeof(libspec), " -l%s", oname); where I removed whitespace between -l and %s because otherwise tcc was failing.
>
> I also had to update bootstrap sources.
>
> I only have linux/x86_64, and cannot test the changes now on other Unix systems.
> Also, tcc is available for Windows, so I am looking forward for your suggestions on how to integrate tcc related changes in to the mainline voc source.
>
> --
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub [4], or unsubscribe [5].
Links:
------
[1] https://github.com/dcwbrown
[2]
a35668b
[3]
9626a95
[4]
#73
[5]
https://github.com/notifications/unsubscribe-auth/AAYKDIHFEBG7UNOD6UQAIY3QN4YUFANCNFSM4I7NLYJA
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I have finished making my build server work again. It's building all except the android platform (there is no problem but I need to stop for today). It should be responding to github checkin hooks though I haven't tested this. I added a feature for manually triggering builds: If you open webpage
-- you will trigger a new build of the branch named at the end of the url. The build status is updated dynamically on the github/visshaps/voc readme, or you can view
Note that if you click on any line in the status you will be shown the build log for that particular build. This even works during the build so you can see how far it has got. With regard to BuildBot - I'm afraid I'm out of my depth there. I've no idea how much it can do. You are very welcome to have a go :-). Can it build with mingw, or MSVC, or on android? Can it parse logs and show status of test parts? Good luck! I think you may have big job on your hands ... |
thank you all, also, i am afraid, building software with -M (link statically) won't work. |
So, I have updated the branch, and it is ready to be merged with master. I think Readme also should be updated. About Windows, it only passed somewhere on the web, that for linking to Windows libraries tcc needs some .def files, and headers alone are not enough. |
Looks good - all the existing tests passed. You're fine to do the merge. Re comment - I'll update doc/compiler.md once you've merged. And maybe I will get around to updating the compiler help display to indicate which link types it supports depending on how it has been built, perhaps. I'm not planning to do the work to make tcc work on windows and document it. -- Dave. |
merged to master. |
also, there is no test currently for tcc on the main page. |
It will need creating ... I can do so if you wish - for a couple of architectures. Which of centos, freebsd, fedora, ubuntu, opensuse would you most want to test? |
i don't know, don't want to cause you unnecessary/extra work. if or when you find mood to do so, i think ubuntu or fedora are okay, because they have more recent tcc, and if anything changes, it will be noticeable on those platforms? so just pick one of those. and may be freebsd as well. and thank you. |
On Ubuntu tcc went smoothly. The latest tcc is easily installed with apt install tcc. On Fedora (29 or 30) the tcc compiler itself segfaults. There are some messages about it on the tcc mailing list, but no resolution. Did you try on Fedora, and if you solved this, how did you do it? Now trying freebsd. -- Dave. |
Also getting segfault in tcc on freebsd. |
hmmm. No, I only have gentoo (or funtoo) or all my computers. I guess, I did not do a research yet, I guess, this might be about stack protection. Or something like address space randomization, some modern security feature related to address space. |
hello, @dcwbrown
I have added initial support for tcc compiler.
I did it mostly because I have a request to add it by the company, which has to use only tcc compiler for one important project.
Also, tcc seems to be a fairly good compiler (I checked it back 10 years ago, and it wasn't stable enough, as I remember) nowadays, fairly fast, much faster than gcc/clanng, and generates slimmer binaries.
Please review my changes in dedicated tcc_support branch:
a35668b
9626a95
I had to add:
#elif defined(TINYC) case in src/tools/make/configure.c
ifeq condition for tcc compiler in src/tools/make/oberon.mk
(though tcc seems to support -static flag, it was not able to combine object files into one executable while using that flag).
I had to change the line
snprintf(libspec, sizeof(libspec), " -l%s", oname);
where I removed whitespace between-l
and%s
because otherwise tcc was failing.I also had to update bootstrap sources.
I only have linux/x86_64, and cannot test the changes now on other Unix systems.
Also, tcc is available for Windows, so I am looking forward for your suggestions on how to integrate tcc related changes in to the mainline voc source.
The text was updated successfully, but these errors were encountered: