Re: [Tinycc-devel] Predefined macro identifying TinyC?

2015-03-23 Thread Martin Guy
Great work, many thanks!

M

On 23/03/2015, Sergey Korshunoff  wrote:
> Hi! A current tcc from the mob is patched to resolve this problem. No
> a top word with a strange value.
>
> ___
> 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] Commit b7b9f9f5 broke -dumpversion

2015-03-23 Thread Sergey Korshunoff
Hi! A patch is pushed to the mob: fix for a -dumpversion option

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


[Tinycc-devel] Commit b7b9f9f5 broke -dumpversion

2015-03-23 Thread oldfaber
Hi,

using a self-compiled tcc for Windows 32 bit
tcc -dumpversion
gives the error
tcc: error: invalid option -- '-dumpversion'

In tcc_parse_args() strstart() looks only at the first char,
'd' and decides that the option is -dD !!!

Thanks
Fabio

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


Re: [Tinycc-devel] Predefined macro identifying TinyC?

2015-03-23 Thread Sergey Korshunoff
Hi! A current tcc from the mob is patched to resolve this problem. No
a top word with a strange value.

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


Re: [Tinycc-devel] [BUG] x86_64-tcc compiled by i386-tcc is wrong

2015-03-23 Thread Sergey Korshunoff
The above patch is reduced and submitted to the mob. What is changed?
In the greloca() and put_elf_reloca() a type of the addend parm is
changed from "unsigned long" to the "addr_t"

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


Re: [Tinycc-devel] out of the box configuration on x86_64 ubuntu still broken

2015-03-23 Thread arnold
Hi all.

> arn...@skeeve.com :
>
> > Here is the result of running sh -x configure. Thanks - Arnold
> > 
> > $ sh -x ./configure --prefix=/tmp/tcc 2>&1 | tee configure.out
>
> > + test -z
> > + test -n i386
> > + cpu=i386

Edmund Grimley Evans  wrote:
> Do you have ARCH=i386 already set in your environment when you run
> ./configure?

Indeed - defines set up long ago for running Java. :-( :-(

Please excuse me while I try to simultaneously wipe egg off my face
and take my foot out of my mouth.

After removing this definition everything is working fine again.

Thanks to everyone for your help!

Arnold

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


Re: [Tinycc-devel] out of the box configuration on x86_64 ubuntu still broken

2015-03-23 Thread Edmund Grimley Evans
arn...@skeeve.com :

> Here is the result of running sh -x configure. Thanks - Arnold
> 
> $ sh -x ./configure --prefix=/tmp/tcc 2>&1 | tee configure.out

> + test -z
> + test -n i386
> + cpu=i386

Do you have ARCH=i386 already set in your environment when you run
./configure?

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


Re: [Tinycc-devel] out of the box configuration on x86_64 ubuntu still broken

2015-03-23 Thread arnold
Hi.

> Sergey Korshunoff  wrote:
>
> > I tested it on debian 7 x86_64 and all was OK. What the output of the
> > "uname -m" ?
> > There was many messages about building a i386 compiler. But no one
> > tell me the output of the "uname -m" on that systems.

arn...@skeeve.com wrote:
> Thanks for letting me know what you need to know.
>
> This is interesting. My Ubuntu 12.04 box at home:
>
>   $ uname -m
>   x86_64
>
> And indeed, tcc builds fine here.  I will get the info from my
> work 14.04 box later today for you.

On my Ubuntu-Mate 14.04 box at work, current mob:

$ uname -m
x86_64
arobbins@arobbins-ubuntu:~/Repos/tinycc$ ./configure --prefix=/tmp/tcc
Binary  directory   /tmp/tcc/bin
TinyCC directory/tmp/tcc/lib/tcc
Library directory   /tmp/tcc/lib
Include directory   /tmp/tcc/include
Manual directory/tmp/tcc/share/man
Info directory  /tmp/tcc/share/info
Doc directory   /tmp/tcc/share/doc//tmp/tcc/lib/tcc
Target root prefix
Source path  /home/arobbins/Repos/tinycc
C compiler   gcc
cross compilers  no
Target CPU   x86
Host OS  Linux
Target OSLinux
Big Endian   no
gprof enabledno
use libgcc   no
Creating config.mak and config.h
config.h is unchanged

That wasn't helpful. Sigh.

$ uname -a
Linux arobbins-ubuntu 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 
2015 x86_64 x86_64 x86_64 GNU/Linux

Here is the result of running sh -x configure. Thanks - Arnold

$ sh -x ./configure --prefix=/tmp/tcc 2>&1 | tee configure.out
+ TMPN=./conftest-18474
+ TMPH=./conftest-18474.h
+ build_cross=no
+ use_libgcc=no
+ enable_assert=no
+ prefix=
+ execprefix=
+ bindir=
+ libdir=
+ tccdir=
+ includedir=
+ mandir=
+ infodir=
+ sysroot=
+ cross_prefix=
+ cc=gcc
+ host_cc=gcc
+ ar=ar
+ strip=strip
+ cygwin=no
+ gprof=no
+ bigendian=no
+ mingw32=no
+ LIBSUF=.a
+ EXESUF=
+ tcc_sysincludepaths=
+ tcc_libpaths=
+ tcc_crtprefix=
+ tcc_elfinterp=
+ tcc_lddir=
+ confvars=
+ cpu=
+ host_os=Linux
+ uname -s
+ targetos=Linux
+ source_path=./
+ source_path=.
+ source_path_used=yes
+ test -z . -o . = .
+ pwd
+ source_path=/home/arobbins/Repos/tinycc
+ source_path_used=no
+ eval opt="--prefix=/tmp/tcc"
+ opt=--prefix=/tmp/tcc
+ echo --prefix=/tmp/tcc
+ cut -d = -f 2
+ prefix=/tmp/tcc
+ test -z
+ test -n i386
+ cpu=i386
+ classify_cpu i386
+ cpu=i386
+ cpu=x86
+ test -z
+ CFLAGS=-Wall -g -O2
+ test no = yes
+ test -z /tmp/tcc
+ test -z
+ sharedir=/tmp/tcc/share
+ test x = x
+ execprefix=/tmp/tcc
+ test x = x
+ tccdir=tcc
+ test x = x
+ libdir=/tmp/tcc/lib
+ test -n tcc
+ tccdir=/tmp/tcc/lib/tcc
+ test x86 = x86-64
+ test x = x
+ bindir=/tmp/tcc/bin
+ test x = x
+ docdir=/tmp/tcc/share/doc//tmp/tcc/lib/tcc
+ test x = x
+ mandir=/tmp/tcc/share/man
+ test x = x
+ infodir=/tmp/tcc/share/info
+ test x = x
+ includedir=/tmp/tcc/include
+ test x = xyes
+ test gcc != tcc
+ ar=ar
+ cc=gcc
+ strip=strip
+ CONFTEST=./conftest
+ test -z
+ gcc -o ./conftest /home/arobbins/Repos/tinycc/conftest.c
+ ./conftest bigendian
+ bigendian=no
+ ./conftest version
+ gcc_major=4
+ ./conftest minor
+ gcc_minor=8
+ test no = no
+ ./conftest triplet
+ triplet=x86_64-linux-gnu
+ test -f /usr/lib/x86_64-linux-gnu/crti.o
+ tcc_lddir=lib
+ multiarch_triplet=x86_64-linux-gnu
+ test x86 = armv4l
+ test -f /lib/ld-uClibc.so.0
+ W_OPTIONS=deprecated-declarations strict-aliasing pointer-sign sign-compare 
unused-result uninitialized
+ gcc -v --help
+ grep -- -Wdeprecated-declarations
+ O_PRESENT=  -Wdeprecated-declarations   Warn about uses of 
__attribute__((deprecated))
+ test -n   -Wdeprecated-declarations   Warn about uses of 
__attribute__((deprecated))
+ CFLAGS=-Wall -g -O2 -Wno-deprecated-declarations
+ gcc -v --help
+ grep -- -Wstrict-aliasing
+ O_PRESENT=  -Wstrict-aliasing=  Warn about code which might break 
strict aliasing
  -Wstrict-aliasing   Warn about code which might break strict aliasing
+ test -n   -Wstrict-aliasing=  Warn about code which might break 
strict aliasing
  -Wstrict-aliasing   Warn about code which might break strict aliasing
+ CFLAGS=-Wall -g -O2 -Wno-deprecated-declarations -Wno-strict-aliasing
+ gcc -v --help
+ grep -- -Wpointer-sign
+ O_PRESENT=  -Wpointer-sign  Warn when a pointer differs in 
signedness in an
+ test -n   -Wpointer-sign  Warn when a pointer differs in 
signedness in an
+ CFLAGS=-Wall -g -O2 -Wno-deprecated-declarations -Wno-strict-aliasing 
-Wno-pointer-sign
+ gcc -v --help
+ grep -- -Wsign-compare
+ O_PRESENT=  -Wsign-compare  Warn about signed-unsigned comparisons
+ test -n   -Wsign-compare  Warn about signed-unsigned comparisons
+ CFLAGS=-Wall -g -O2 -Wno-deprecated-declarations -Wno-strict-aliasing 
-Wno-pointer-sign -Wno-sign-compare
+ gcc -v --help
+ grep -- -Wunused-result
+ O_PRESENT=  -Wunused-result Warn if a caller of a function, 
marked with
+ test -n   -Wunused-result Warn if a caller of a function, marked 
with
+ CFLAGS=-Wall -g -O2 -Wno-