tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] build-tcc.bat is broken since recent changes


From: Christian JULLIEN
Subject: Re: [Tinycc-devel] build-tcc.bat is broken since recent changes
Date: Tue, 25 Jul 2017 07:31:05 +0200 (CEST)

Hi Grischka,

Please read carefully!

The issue is definitely not with Cygwin/Mingwin gcc. Cygwin used to work perfectly with your .bat script.


The issue is with new default value for :

#ifndef CONFIG_TCCDIR
# define CONFIG_TCCDIR "/usr/local/lib/tcc"
#endif


Which prevents tcc boostrapt unless you set CONFIG_TCCDIR in config.h for example to "." as it was before.

You can change your .bat script with either:


echo>>..\config.h #define CONFIG_TCCDIR "%CD:\=/%"

‍for an absolute value or


echo>>..\config.h #define CONFIG_TCCDIR "."

For a relative value.


C.

Le : 24 juillet 2017 à 23:46 (GMT +02:00)
De : "grischka" <address@hidden>
À : "Christian JULLIEN" <address@hidden>
Cc : "address@hidden" <address@hidden>
Objet : Re: RE : Re: [Tinycc-devel] build-tcc.bat is broken since recent changes


Christian JULLIEN wrote:
> Hum?
>
> No sure to understand what's wrong.
>
>
> I'm using up to date Cygwin + gcc 5.4.0 64bit version.
>
> Until recently, I was able to compile tcc on Windows 10 just calling
> *‍build-tcc.bat*

build-tcc.bat is meant to be used with a gcc from mingw.

For example from
https://sourceforge.net/projects/mingw-w64/files/mingw-w64/

Scroll down and take "i686 or x86_64 - win32 - sjlj or seh"

--gr


> My Makefile was working the same.
>
>
> Now, build-tcc.bat complains because tcc fails to find some .h like;
>
> c:\usr\jullien\tinycc\win32>.\tcc -m32 -c lib/crt1.c
> lib/crt1.c:5: error: include file 'tchar.h' not found
>
> c:\usr\jullien\tinycc\win32>.\tcc -m32 -c lib/crt1w.c
> In file included from lib/crt1w.c:3:
> lib/crt1.c:5: error: include file 'tchar.h' not found
>
> ‍
> The config.h generated by your script only contains:
>
>
> c:\tinycc\win32>more ..\config.h
> #define TCC_VERSION "0.9.27"
> #ifdef TCC_TARGET_X86_64
> #define TCC_LIBTCC1 "libtcc1-64.a"
> #else
> #define TCC_LIBTCC1 "libtcc1-32.a"
> #endif
>
>
> I see that in previous versions we had
>
> #ifndef CONFIG_TCCDIR
> # define CONFIG_TCCDIR "."
> #endif
>
>
> But now it's defined as
>
>
> #ifndef CONFIG_TCCDIR
> # define CONFIG_TCCDIR "/usr/local/lib/tcc"
> #endif
>
>
> Which looks to be the source of the problem. Adding this line in
> build-tcc.bat solves the issue, is it what we should do now?
>
>
> :config.h
> echo>..\config.h #define TCC_VERSION "%VERSION%"
> *+ echo>>..\config.h #define CONFIG_TCCDIR "%CD:\=/%"*
> echo>> ..\config.h #ifdef TCC_TARGET_X86_64
>
> *Le : *24 juillet 2017 à 18:39 (GMT +02:00)
> *De : *"grischka" <address@hidden>
> *À : *"Christian JULLIEN" <address@hidden>,
> "address@hidden" <address@hidden>
> *Objet : *Re: [Tinycc-devel] build-tcc.bat is broken since recent
> changes
>
>
> Christian JULLIEN wrote:
> > Grischka‍
> >
> >
> > Trying to synchronize Cygwin Makefile with your recent reorg, 'make'
> > stops because includes are now not found.
>
> There is a change to the default CONFIG_TCCDIR.
>
> You can define it in the config.h that you create or use tcc -B. ...
>
> > The same issue exists with your .bat
>
> Not unless (ab)used with a cygwin gcc ;)
>
> Btw, cygwin has the option to install a mingw compiler too (from the
> setup
> program). Then you could just use the normal configure + make like
>
> $ ./configure --cross-prefix=i686-w64-mingw32- --prefix=c:/tcc
> $ make && make install
>
> The gcc prefix may vary (look in cygwin/bin).
>
> -- gr
>
>
>
>
>
>
>
>



 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]