diff options
| author | Daniel Glöckner <daniel-gl@gmx.net> | 2008-09-05 21:08:37 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2008-09-12 22:22:58 +0200 |
| commit | 15e0dc08a67003f72c59a1f06d762245824d2ae6 (patch) | |
| tree | 3082b92909e6b7b9f99e6a8bcd6c684f511781e2 /Makefile | |
| parent | 256f6e6200be1a73cbf663938213778624436cad (diff) | |
| download | tinycc-15e0dc08a67003f72c59a1f06d762245824d2ae6.tar.gz tinycc-15e0dc08a67003f72c59a1f06d762245824d2ae6.tar.bz2 | |
Allow to use libgcc instead of libtcc1
This patch adds a switch --with-libgcc to configure.
When passed it prevents libtcc1.a from being built and links to
/lib/libgcc_s.so.1 instead of PREFIX/lib/tcc/libtcc1.a.
It will work on ARM when using libgcc from GCC >= 4.2.0.
Prior versions don't have the __floatun[sd]i[sdx]f functions.
It won't work on i386 because of two missing symbols emitted when
floats are cast to integers, but users can provide those symbols
(global short constants) in their code if needed.
Daniel
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -51,11 +51,17 @@ PROGS+=c67-tcc$(EXESUF) i386-win32-tcc$(EXESUF) endif endif +ifdef CONFIG_USE_LIBGCC +LIBTCC1= +else +LIBTCC1=libtcc1.a +endif + # run local version of tcc with local libraries and includes TCC=./tcc -B. -I. all: $(PROGS) \ - libtcc1.a $(BCHECK_O) tcc-doc.html tcc.1 libtcc.a \ + $(LIBTCC1) $(BCHECK_O) tcc-doc.html tcc.1 libtcc.a \ libtcc_test$(EXESUF) Makefile: config.mak @@ -214,7 +220,7 @@ bcheck.o: bcheck.c install: tcc_install libinstall -tcc_install: $(PROGS) tcc.1 libtcc1.a $(BCHECK_O) tcc-doc.html +tcc_install: $(PROGS) tcc.1 $(LIBTCC1) $(BCHECK_O) tcc-doc.html mkdir -p "$(DESTDIR)$(bindir)" $(INSTALL) -s -m755 $(PROGS) "$(DESTDIR)$(bindir)" ifndef CONFIG_WIN32 @@ -225,11 +231,14 @@ endif mkdir -p "$(DESTDIR)$(tccdir)/include" ifdef CONFIG_WIN32 mkdir -p "$(DESTDIR)$(tccdir)/lib" - $(INSTALL) -m644 libtcc1.a win32/lib/*.def "$(DESTDIR)$(tccdir)/lib" + $(INSTALL) -m644 $(LIBTCC1) win32/lib/*.def "$(DESTDIR)$(tccdir)/lib" cp -r win32/include/. "$(DESTDIR)$(tccdir)/include" cp -r win32/examples/. "$(DESTDIR)$(tccdir)/examples" else - $(INSTALL) -m644 libtcc1.a $(BCHECK_O) "$(DESTDIR)$(tccdir)" +ifndef CONFIG_USE_LIBGCC + $(INSTALL) -m644 libtcc1.a "$(DESTDIR)$(tccdir)" +endif + $(INSTALL) -m644 $(BCHECK_O) "$(DESTDIR)$(tccdir)" $(INSTALL) -m644 stdarg.h stddef.h stdbool.h float.h varargs.h \ tcclib.h "$(DESTDIR)$(tccdir)/include" endif |
