Re: [Tinycc-devel] TCC as default compiler

2015-01-03 Thread Thomas Preud'homme
Le mardi 9 décembre 2014, 14:03:10 stephen Turner a écrit :
 I compiled musl-libc with gcc as well as tcc. Tcc appears to be in good
 working order but when i use tcc to compile musl-libc it errors out.
 
 The command im using is CC=/path/to/tcc ./configure --prefix=/dest/folder
 --target=i386-linux-musl
 
 the error i receive is crt/i386/Scrt1.s:17: error: bad expression syntax [[]

It appears you hit one of the many bugs tcc has in its assembly parser. 
Improvement to that part of tcc are welcome but beware, there lies dragons ;-)

Best regards,

Thomas

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] TCC as default compiler

2014-12-09 Thread stephen Turner
Thanks, that is helpful.

I read mention of TCC including the linker, does this mean binutils is not
necessary?

I would be very interested to see C++ be included.

On Tue, Dec 9, 2014 at 9:54 AM, cbdev c...@cbcdn.com wrote:

 Hi Stephen,

 On Tue, Dec 9, 2014 at 7:19 AM, stephen Turner
 stephen.n.tur...@gmail.com wrote:
  I have found tcc and wondered how viable it is as a alternative to gcc
 and
  clang/llvm for my uses

 I'm actively using tcc as my main compiler, only switching back to GCC
 on demand for eg. running tests with valgrind (as tcc's debug symbols
 currently do not work with valgrind).
 So far, it works perfectly for my C projects, producing reasonably
 small output binaries very fast.
 You should of course be aware that tcc does almost no optimizations,
 instead translating the code almost literally - which I perceive as an
 advantage (The reasoning being that when my code is performing well
 when compiled without lots of optimization, it will most likely run
 even better with an optimizing compiler).

  Does it use makefiles?
 If you want to use them. Makefiles are processed by make, not by tcc,
 so that's completely independent. In most shells, you can try to run
 make with tcc instead of whatever your default C Compiler is by
 running
 user@box:/path/to/project$ CC=tcc make
 This might not work if the project you're trying to compile is using
 functionality that tcc does not support.

 Hope that helps!

 Regards,
 cbdev

 ___
 Tinycc-devel mailing list
 Tinycc-devel@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/tinycc-devel

___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] TCC as default compiler

2014-12-09 Thread stephen Turner
I compiled musl-libc with gcc as well as tcc. Tcc appears to be in good
working order but when i use tcc to compile musl-libc it errors out.

The command im using is CC=/path/to/tcc ./configure --prefix=/dest/folder
--target=i386-linux-musl

the error i receive is crt/i386/Scrt1.s:17: error: bad expression syntax [[]

Is there any log files generated i can provide? i did not see the usual
config.log that gcc would output.

thanks,
stephen

On Tue, Dec 9, 2014 at 10:31 AM, stephen Turner stephen.n.tur...@gmail.com
wrote:

 Thanks, that is helpful.

 I read mention of TCC including the linker, does this mean binutils is not
 necessary?

 I would be very interested to see C++ be included.

 On Tue, Dec 9, 2014 at 9:54 AM, cbdev c...@cbcdn.com wrote:

 Hi Stephen,

 On Tue, Dec 9, 2014 at 7:19 AM, stephen Turner
 stephen.n.tur...@gmail.com wrote:
  I have found tcc and wondered how viable it is as a alternative to gcc
 and
  clang/llvm for my uses

 I'm actively using tcc as my main compiler, only switching back to GCC
 on demand for eg. running tests with valgrind (as tcc's debug symbols
 currently do not work with valgrind).
 So far, it works perfectly for my C projects, producing reasonably
 small output binaries very fast.
 You should of course be aware that tcc does almost no optimizations,
 instead translating the code almost literally - which I perceive as an
 advantage (The reasoning being that when my code is performing well
 when compiled without lots of optimization, it will most likely run
 even better with an optimizing compiler).

  Does it use makefiles?
 If you want to use them. Makefiles are processed by make, not by tcc,
 so that's completely independent. In most shells, you can try to run
 make with tcc instead of whatever your default C Compiler is by
 running
 user@box:/path/to/project$ CC=tcc make
 This might not work if the project you're trying to compile is using
 functionality that tcc does not support.

 Hope that helps!

 Regards,
 cbdev

 ___
 Tinycc-devel mailing list
 Tinycc-devel@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/tinycc-devel



___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] TCC as default compiler

2014-12-09 Thread stephen Turner
perhaps im not using this correctly. I built a quick chroot env with a
static tcc and musl-libc. performing ./configure it still believes gcc is
being used when TCC is available in the /bin dir and appears to be compiled
correctly. (it responds when called anyways)

Is there documentation i can reference to get started other than on the
website? I don't want to ask questions that may have been answered
elsewhere.

thanks, and i greatly appreciate any/all help getting started.
stephen

On Tue, Dec 9, 2014 at 2:03 PM, stephen Turner stephen.n.tur...@gmail.com
wrote:

 I compiled musl-libc with gcc as well as tcc. Tcc appears to be in good
 working order but when i use tcc to compile musl-libc it errors out.

 The command im using is CC=/path/to/tcc ./configure --prefix=/dest/folder
 --target=i386-linux-musl

 the error i receive is crt/i386/Scrt1.s:17: error: bad expression syntax
 [[]

 Is there any log files generated i can provide? i did not see the usual
 config.log that gcc would output.

 thanks,
 stephen

 On Tue, Dec 9, 2014 at 10:31 AM, stephen Turner 
 stephen.n.tur...@gmail.com wrote:

 Thanks, that is helpful.

 I read mention of TCC including the linker, does this mean binutils is
 not necessary?

 I would be very interested to see C++ be included.

 On Tue, Dec 9, 2014 at 9:54 AM, cbdev c...@cbcdn.com wrote:

 Hi Stephen,

 On Tue, Dec 9, 2014 at 7:19 AM, stephen Turner
 stephen.n.tur...@gmail.com wrote:
  I have found tcc and wondered how viable it is as a alternative to gcc
 and
  clang/llvm for my uses

 I'm actively using tcc as my main compiler, only switching back to GCC
 on demand for eg. running tests with valgrind (as tcc's debug symbols
 currently do not work with valgrind).
 So far, it works perfectly for my C projects, producing reasonably
 small output binaries very fast.
 You should of course be aware that tcc does almost no optimizations,
 instead translating the code almost literally - which I perceive as an
 advantage (The reasoning being that when my code is performing well
 when compiled without lots of optimization, it will most likely run
 even better with an optimizing compiler).

  Does it use makefiles?
 If you want to use them. Makefiles are processed by make, not by tcc,
 so that's completely independent. In most shells, you can try to run
 make with tcc instead of whatever your default C Compiler is by
 running
 user@box:/path/to/project$ CC=tcc make
 This might not work if the project you're trying to compile is using
 functionality that tcc does not support.

 Hope that helps!

 Regards,
 cbdev

 ___
 Tinycc-devel mailing list
 Tinycc-devel@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/tinycc-devel




___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] TCC as default compiler

2014-12-09 Thread stephen Turner
Sorry, it was unexpected that there would be a config flag to set the
compiler.

Im getting what appears to be code related compile errors now. How can I
collect data that would help troubleshoot such issues?  I successfully
compiled the gnu make application in the chroot env. I tried running strace
but the output doesnt make sense to me. Can it help in this case show how
the compiler is failing to compile musl or tinycc itself?
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


[Tinycc-devel] TCC as default compiler

2014-12-08 Thread stephen Turner
I have found tcc and wondered how viable it is as a alternative to gcc and
clang/llvm for my uses. I checked the website but it appears to have been
dead for several years.

Does it use makefiles?
can it be a simple drop in replacement for GCC (atleast for c if not c++
too)

i have done a few quick serches but it seems either information is not
readily available or im not asking the right questions.

I see the git has recent development unlike the website. I was hoping once
built, tcc could be set as the compiler by a simple CC=tcc and then one
could compile code same as with gcc by ./configure make and make install.

From what i have read so far its only a c compiler? Or is it being built
out to support c++ as well?

thanks for your time and advice/answers
stephen
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel