From 43d9a7de9b83f437d55c2cbc6e9625e3fafa5102 Mon Sep 17 00:00:00 2001 From: grischka Date: Mon, 13 Feb 2017 19:03:29 +0100 Subject: updates & cleanups (tcc-doc/Changelog/TODO ...) - tcc-doc.texi: commandline option info update - Changelog/TODO: update - tests/tcctest.py: removed - tests/Makefile: weaktest fixed - tests/tests2: some files renamed and/or converted to unix LF - configure/Makefile: --enable-static option (no dll on win32) - win32/build-tcc.bat: msvc support - win32/tcc-win32.txt: build info update - win32/vs2015/: VS solution removed - win32/include/tcc/tcc_libm.h: #include statement fixed - tcc.c: -include option help info - .gitignore: cleanup --- win32/Makefile | 2 +- win32/build-tcc.bat | 23 ++++- win32/include/tcc/tcc_libm.h | 2 +- win32/tcc-win32.txt | 15 +-- win32/vs2015/PreBuild.bat | 9 -- win32/vs2015/libtcc.vcxproj | 220 ------------------------------------------- win32/vs2015/tcc.sln | 41 -------- win32/vs2015/tcc.vcxproj | 195 -------------------------------------- 8 files changed, 31 insertions(+), 476 deletions(-) delete mode 100644 win32/vs2015/PreBuild.bat delete mode 100644 win32/vs2015/libtcc.vcxproj delete mode 100644 win32/vs2015/tcc.sln delete mode 100644 win32/vs2015/tcc.vcxproj (limited to 'win32') diff --git a/win32/Makefile b/win32/Makefile index 0b0c5b5..f52da4b 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -110,7 +110,7 @@ tarball: @cp -r lib $(TARNAME) @cp -r libtcc $(TARNAME) @cp -r tools $(TARNAME) - @cp -r vs2015 $(TARNAME) +# @cp -r vs2015 $(TARNAME) @cp -r build-tcc.bat $(TARNAME) @cp -r i386-win32-tcc.exe $(TARNAME) @cp -r libtcc.def $(TARNAME) diff --git a/win32/build-tcc.bat b/win32/build-tcc.bat index 0598119..77c0067 100644 --- a/win32/build-tcc.bat +++ b/win32/build-tcc.bat @@ -1,10 +1,11 @@ @rem ------------------------------------------------------ -@rem batch file to build tcc using mingw gcc or tcc itself +@rem batch file to build tcc using mingw, msvc or tcc itself @rem ------------------------------------------------------ @echo off -set CC=gcc -Os -s -fno-strict-aliasing +set CC=gcc -Os -s + set T=32 if %PROCESSOR_ARCHITECTURE%_==AMD64_ set T=64 if %PROCESSOR_ARCHITEW6432%_==AMD64_ set T=64 @@ -16,7 +17,7 @@ goto :a0 :usage echo usage: build-tcc.bat [ options ... ] echo options: -echo -c prog use prog (gcc or tcc) to compile tcc +echo -c prog use prog (gcc/tcc/cl) to compile tcc echo -c "prog options" use prog with options to compile tcc echo -t 32/64 force 32/64 bit default target echo -v "version" set tcc version @@ -24,6 +25,21 @@ echo -i dir install tcc into dir echo -d create tcc-doc.html too (needs makeinfo) exit /B 1 +:cl +@echo off +set CMD=cl +:c0 +set ARG=%1 +set ARG=%ARG:.dll=.lib% +if (%1)==(-shared) set ARG=-LD +if (%1)==(-o) shift && set ARG=-Fe%2 +set CMD=%CMD% %ARG% +shift +if not (%1)==() goto :c0 +echo on +%CMD% -O1 -W2 -Zi -MT -GS- -nologo -link -opt:ref,icf +@exit /B %ERRORLEVEL% + :a2 shift :a1 @@ -31,6 +47,7 @@ shift :a0 if not (%1)==(-c) goto :a3 set CC=%~2 +if (%2)==(cl) set CC=@call :cl goto :a2 :a3 if not (%1)==(-t) goto :a4 diff --git a/win32/include/tcc/tcc_libm.h b/win32/include/tcc/tcc_libm.h index c9a6ad1..44b96e2 100644 --- a/win32/include/tcc/tcc_libm.h +++ b/win32/include/tcc/tcc_libm.h @@ -1,7 +1,7 @@ #ifndef _TCC_LIBM_H_ #define _TCC_LIBM_H_ -#include "../include/math.h" +#include "../math.h" /* TCC uses 8 bytes for double and long double, so effectively the l variants * are never used. For now, they just run the normal (double) variant. diff --git a/win32/tcc-win32.txt b/win32/tcc-win32.txt index da07e44..9299e68 100644 --- a/win32/tcc-win32.txt +++ b/win32/tcc-win32.txt @@ -107,23 +107,26 @@ Compilation from source: ------------------------ * You can use the MinGW and MSYS tools available at - http://www.mingw.org Untar the TCC archive and type in the MSYS shell: - ./configure [--prefix installpath] make make install - The default install location is c:\Program Files\tcc + The default install location is c:\Program Files\tcc * Alternatively you can compile TCC with just GCC from MinGW using + > build-tcc.bat (from the win32 directory) + + Also MSVC can be used with the "VSTools Developer Command Prompt": + > build-tcc.bat -c cl - build-tcc.bat (from the win32 directory) + or with a tcc (needs to be in a different directory) + > build-tcc.bat -c some-tcc-dir\tcc.exe - To install, copy the entire contents of the win32 directory to - where you want. + Also you can copy/install everything into another directory: + > build-tcc.bat -i Limitations: diff --git a/win32/vs2015/PreBuild.bat b/win32/vs2015/PreBuild.bat deleted file mode 100644 index 9d2f8b1..0000000 --- a/win32/vs2015/PreBuild.bat +++ /dev/null @@ -1,9 +0,0 @@ -set /p VERSION= < %~dp0..\..\VERSION - -:config.h -echo> .\config.h #define TCC_VERSION "%VERSION%" -echo>> .\config.h #ifdef TCC_TARGET_X86_64 -echo>> .\config.h #define CONFIG_TCC_LIBPATHS "{B}/lib/64;{B}/lib" -echo>> .\config.h #else -echo>> .\config.h #define CONFIG_TCC_LIBPATHS "{B}/lib/32;{B}/lib" -echo>> .\config.h #endif diff --git a/win32/vs2015/libtcc.vcxproj b/win32/vs2015/libtcc.vcxproj deleted file mode 100644 index af179c3..0000000 --- a/win32/vs2015/libtcc.vcxproj +++ /dev/null @@ -1,220 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {41F2DA74-9707-49A3-A466-157C7028BD79} - Win32Proj - libtcc - 8.1 - - - - DynamicLibrary - true - v140 - MultiByte - - - DynamicLibrary - false - v140 - true - MultiByte - - - DynamicLibrary - true - v140 - MultiByte - - - DynamicLibrary - false - v140 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - true - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - true - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - false - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - false - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - - - - Level3 - Disabled - ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - EditAndContinue - - - Windows - true - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - - - Generate config.h - - - - - - - Level3 - Disabled - ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions) - EditAndContinue - - - Windows - true - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - - - Generate config.h - - - - - Level3 - - - MaxSpeed - true - true - ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions) - - - Windows - true - true - true - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - - - Generate config.h - - - - - Level3 - - - MaxSpeed - true - true - ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions) - - - Windows - true - true - true - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - - - Generate config.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32/vs2015/tcc.sln b/win32/vs2015/tcc.sln deleted file mode 100644 index 9015cd0..0000000 --- a/win32/vs2015/tcc.sln +++ /dev/null @@ -1,41 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcc", "tcc.vcxproj", "{6E7932A7-B123-48EB-AB39-40867AF28105}" - ProjectSection(ProjectDependencies) = postProject - {41F2DA74-9707-49A3-A466-157C7028BD79} = {41F2DA74-9707-49A3-A466-157C7028BD79} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtcc", "libtcc.vcxproj", "{41F2DA74-9707-49A3-A466-157C7028BD79}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.ActiveCfg = Debug|x64 - {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x64.Build.0 = Debug|x64 - {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.ActiveCfg = Debug|Win32 - {6E7932A7-B123-48EB-AB39-40867AF28105}.Debug|x86.Build.0 = Debug|Win32 - {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.ActiveCfg = Release|x64 - {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x64.Build.0 = Release|x64 - {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.ActiveCfg = Release|Win32 - {6E7932A7-B123-48EB-AB39-40867AF28105}.Release|x86.Build.0 = Release|Win32 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.ActiveCfg = Debug|x64 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x64.Build.0 = Debug|x64 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.ActiveCfg = Debug|Win32 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Debug|x86.Build.0 = Debug|Win32 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.ActiveCfg = Release|x64 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x64.Build.0 = Release|x64 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.ActiveCfg = Release|Win32 - {41F2DA74-9707-49A3-A466-157C7028BD79}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/win32/vs2015/tcc.vcxproj b/win32/vs2015/tcc.vcxproj deleted file mode 100644 index 29543d7..0000000 --- a/win32/vs2015/tcc.vcxproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {6E7932A7-B123-48EB-AB39-40867AF28105} - Win32Proj - tcc - 8.1 - - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - true - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - false - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - false - $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); - - - - - - Level3 - Disabled - TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - EditAndContinue - - - Console - true - Debug - libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - Generate config.h - - - - - - - Level3 - Disabled - TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - EditAndContinue - - - Console - true - libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - x64\Debug - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - Generate config.h - - - - - Level3 - - - MaxSpeed - true - true - TCC_TARGET_PE;TCC_TARGET_I386;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - true - true - Release - libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - Generate config.h - - - - - Level3 - - - MaxSpeed - true - true - TCC_TARGET_PE;TCC_TARGET_X86_64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - true - true - libtcc.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - x64\Release - - - copy $(TargetPath) $(SolutionDir).. - - - $(ProjectDir)PreBuild.bat - Generate config.h - - - - - - - - - - - - \ No newline at end of file -- cgit v1.3.1