|
From: | Christian JULLIEN |
Subject: | Re: [Tinycc-devel] build-tcc.bat is broken since recent changes |
Date: | Tue, 25 Jul 2017 15:33:45 +0200 (CEST) |
Grischka,
Thank you for your efforts to convince me (I'm still not).
Of course I know that build-tcc.bat was supposed to work with mingw. This is how I started to build tcc for Windows long ago.
I also know that until you very recently changed
# define CONFIG_TCCDIR "."
to
# define CONFIG_TCCDIR "/usr/local/lib/tcc"
Standard Cygwin+gcc install was ALSO able to bootstrap a fully working tcc.exe for Windows.
I still don't understand the reasons of this change. IMHO "." , i.e. relative path is far better than "/usr/local/lib/tcc" which supposes that lib has already installed in this path which is btw not very Windows friendly.
If I locally change back to # define CONFIG_TCCDIR "."
tcc.exe bootstraps again with Cygwin/gcc that why I thing it's a regression.
Now I give up, I have the trick to make Makefile working again which is my main goal.
Even nothing is perfect, I would like to thank you for the time you spend on this project. I'll no more bother you with this topic.
C.
Le : 25 juillet 2017 à 12:25 (GMT +02:00)
De : "grischka" <address@hidden>
À : "Christian JULLIEN" <address@hidden>
Cc : "address@hidden" <address@hidden>
Objet : Re: [Tinycc-devel] build-tcc.bat is broken since recent changes
Christian JULLIEN wrote:
> Hi Grischka,
>
> Please read carefully!
Hi Christian, please read carefully:
from build-tcc.bat:
@rem ------------------------------------------------------
@rem batch file to build tcc using mingw, msvc or tcc itself
@rem ------------------------------------------------------
You see mingw? MINGW!!! *** M I N G W ***
> Cygwin used to work perfectly with your .bat script.
Using a cygwin gcc to compile tcc will NOT produce something generally
usable, not in one stage at least.
Also, CONFIG_TCCDIR has no meaning in a correctly compiled tcc for
windows. It is never used.
Cheers, --- grischka
> 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
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
[Prev in Thread] | Current Thread | [Next in Thread] |