Re: [Tinycc-devel] arm-asm: Test script

2021-01-05 Thread Michael Matz

Hello,

On Wed, 6 Jan 2021, Danny Milosavljevic wrote:


Hello,

On Wed, 6 Jan 2021 00:07:07 +0100 (CET)
Michael Matz  wrote:


Hmm, how can I get the name of the tcc executable to use for tests from
inside the shell script?  Do I just use ./tcc ?


Probably easiest to pass $(TCC) to the shell script as an argument I
guess.  It needs -B and -I flags to work correctly from uninstalled paths
and the Makefile sets that up correctly.


Does that mean I should use ${TCC} without quotes in the shell script?


No, it's currently not exported from make, so not available in the 
environment.  What I meant is something like this: extend the script to 
take an optional compiler-with-arguments argument, so that it can be 
called like:


% ./the-test-script.sh -c "../tcc -B.. -I.. -whatever-else"

and then use it with that argument in the makefile like so:

 snip 
mytarget: the-test-script.sh
./the-test-script.sh -c "$(TCC)"
 snap 


Do I need $(TCCFLAGS), too?


The Makevariable $(TCC) should contain everything that's needed.
Still, even the above might be overdesigning it a bit :)
(I see you also access the tcc-tok file directly, so that might further 
complicate things from the tests/ Makefile, so don't bother if that gets 
you into the rabbit hole too far)



Ciao,
Michael.

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


Re: [Tinycc-devel] arm-asm: Test script

2021-01-05 Thread Danny Milosavljevic
Hello,

On Wed, 6 Jan 2021 00:07:07 +0100 (CET)
Michael Matz  wrote:

> > Hmm, how can I get the name of the tcc executable to use for tests from 
> > inside the shell script?  Do I just use ./tcc ?  
> 
> Probably easiest to pass $(TCC) to the shell script as an argument I 
> guess.  It needs -B and -I flags to work correctly from uninstalled paths 
> and the Makefile sets that up correctly.

Does that mean I should use ${TCC} without quotes in the shell script?

Do I need $(TCCFLAGS), too?


pgpUdFPgXx6XE.pgp
Description: OpenPGP digital signature
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] arm-asm: Test script

2021-01-05 Thread Michael Matz

Hello,

On Tue, 5 Jan 2021, Danny Milosavljevic wrote:


Hi,

On Mon, 4 Jan 2021 05:05:40 +0100 (CET)
Michael Matz  wrote:


Yeah, put it into tests/ I'd say.


Ok, I've added it as tests/arm-asm-testsuite.sh .


 The x86 assembler also has a little
testfile in there that isn't used by default (as it shows a few
differences between GNU as and tcc; and needs updates from time to time
to cater to stricter versions of GNU as).



Maybe you can wire it into the
existing asmtest target when $(ARCH) is arm.


Hmm, how can I get the name of the tcc executable to use for tests from 
inside the shell script?  Do I just use ./tcc ?


Probably easiest to pass $(TCC) to the shell script as an argument I 
guess.  It needs -B and -I flags to work correctly from uninstalled paths 
and the Makefile sets that up correctly.



Ciao,
Michael.

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


Re: [Tinycc-devel] arm-asm: Test script

2021-01-04 Thread Danny Milosavljevic
Hi,

On Mon, 4 Jan 2021 05:05:40 +0100 (CET)
Michael Matz  wrote:

> Yeah, put it into tests/ I'd say.

Ok, I've added it as tests/arm-asm-testsuite.sh .

>  The x86 assembler also has a little 
> testfile in there that isn't used by default (as it shows a few 
> differences between GNU as and tcc; and needs updates from time to time 
> to cater to stricter versions of GNU as).

>Maybe you can wire it into the 
> existing asmtest target when $(ARCH) is arm.

Hmm, how can I get the name of the tcc executable to use for tests from
inside the shell script?  Do I just use ./tcc ?



pgpUpRRUSN0KO.pgp
Description: OpenPGP digital signature
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel


Re: [Tinycc-devel] arm-asm: Test script

2021-01-03 Thread Michael Matz

Hello,

On Sun, 3 Jan 2021, Danny Milosavljevic wrote:


Updated test script for all of this (should I also commit this?  Where?):


Yeah, put it into tests/ I'd say.  The x86 assembler also has a little 
testfile in there that isn't used by default (as it shows a few 
differences between GNU as and tcc; and needs updates from time to time 
to cater to stricter versions of GNU as).  Maybe you can wire it into the 
existing asmtest target when $(ARCH) is arm.



Ciao,
Michael.

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