From: Peter Johnson Date: Tue, 17 Jan 2006 04:47:49 +0000 (-0000) Subject: VC8 build files cleanup. Also combines yasm32.rules and yasm64.rules into single... X-Git-Tag: v0.5.0rc1~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e6488d4d0afd87ac5316c5bb1291d4cddb315af;p=yasm VC8 build files cleanup. Also combines yasm32.rules and yasm64.rules into single yasm.rules. Works for native Win32 builds, Win32->x64 cross builds, and native x64 builds. Submitted by: Brian Gladman svn path=/trunk/yasm/; revision=1334 --- diff --git a/Mkfiles/vc8/genmacro/genmacro.vcproj b/Mkfiles/vc8/genmacro/genmacro.vcproj index 97ce5249..d7c8ba91 100644 --- a/Mkfiles/vc8/genmacro/genmacro.vcproj +++ b/Mkfiles/vc8/genmacro/genmacro.vcproj @@ -11,9 +11,6 @@ - @@ -23,7 +20,6 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > @@ -102,7 +100,6 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mkfiles/vc8/genmodule/genmodule.vcproj b/Mkfiles/vc8/genmodule/genmodule.vcproj index ee1dd65b..aa376e41 100644 --- a/Mkfiles/vc8/genmodule/genmodule.vcproj +++ b/Mkfiles/vc8/genmodule/genmodule.vcproj @@ -10,9 +10,6 @@ - @@ -22,7 +19,6 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > @@ -101,7 +100,6 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mkfiles/vc8/libyasm/libyasm.vcproj b/Mkfiles/vc8/libyasm/libyasm.vcproj index 3b503d1c..d2db99d8 100644 --- a/Mkfiles/vc8/libyasm/libyasm.vcproj +++ b/Mkfiles/vc8/libyasm/libyasm.vcproj @@ -4,7 +4,6 @@ Version="8.00" Name="libyasm" ProjectGUID="{29FE7874-1256-4AD6-B889-68E399DC9608}" - SignManifests="true" > - @@ -23,7 +20,6 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > @@ -98,93 +96,11 @@ CommandLine="run.bat "$(TargetPath)"" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mkfiles/vc8/readme.vc8.txt b/Mkfiles/vc8/readme.vc8.txt index 15b9ce60..05c2a39e 100644 --- a/Mkfiles/vc8/readme.vc8.txt +++ b/Mkfiles/vc8/readme.vc8.txt @@ -2,23 +2,20 @@ Building YASM with Microsoft Visual Studio 2005 ----------------------------------------------- -This note describes how to build YASM for AMD64 and -EM64T systems using Microsoft Visual Studio 2005. +This note describes how to build YASM using Microsoft Visual Studio 2005. 1. The Compiler --------------- -If you want to build the 64-bit version of YASM you -will need to install the Visual Studio .NET 64-bit -native or cross compiler tools (these tools are not -installed by default). +If you want to build the 64-bit version of YASM you will need to install +the Visual Studio 2005 64-bit tools, which are not installed by default. 2. YASM Download ---------------- -The following files are not built on VC++ and are not -contained in the YASM subversion repository (but they -are included in the nightly YASM snapshots): +The following files are not built on VC++ and are not contained in the +YASM subversion repository (but they are included in the nightly YASM +snapshots): gas-bison.c gas-bison.h @@ -27,88 +24,95 @@ are included in the nightly YASM snapshots): re2c-parser.c re2c-parser.h -If you wish to build from the latest files in the -subversion repository, you will need to add these files -from the latest snapshot to the repository files. +If you wish to build from the latest files in the subversion repository, +you will need to add these files from the latest snapshot to the repository +files. They should be placed in the YASM root directory. 3. Building YASM with Microsoft VC8 ----------------------------------- -First YASM needs to be downloaded and the files placed -within a suitable directory, which will be called -here but can be named and located as you wish. If the -Visual Studio 2005 project files have been obtained -seperately the subdirectory 'vc8' and its subdirectories -and files need to be placed in the 'Mkfiles' subdirectory -within the YASM root directory. - -If building from the subversion repository, obtain the -additional files discussed above and place them in the -YASM root directory. - -Now locate and double click on the yasm.sln solution file in -the 'Mkfiles/vc8' subdirectory to open the build project in -the Visual Studio 2005 IDE and then select: +First YASM needs to be downloaded and the files placed within a suitable +directory, which will be called here but can be named and located +as you wish. If the Visual Studio 2005 project files have been obtained +seperately the subdirectory 'vc8' and its subdirectories and files need to +be placed in the 'Mkfiles' subdirectory within the YASM root directory. + +If building from the subversion repository, obtain the additional files +discussed above and place them in the YASM root directory. + +Now locate and double click on the yasm.sln solution file in the 'Mkfiles/vc8' +subdirectory to open the build project in the Visual Studio 2005 IDE and then +select: win32 or x64 build release or debug build - -as appropriate to build the YASM binaries that you need. -4. Using YASM with Visual C++ version 8 ---------------------------------------- +as appropriate to build the YASM binaries that you need. + +4. Using YASM with Visual Sudio 2005 and VC++ version 8 +------------------------------------------------------- + +1. Firstly you need to locate the directory (or directories) where the VC++ +compiler binaries are located and put copies of the appropriate yasm.exe +binary in these directories. -1. Firstly you need to locate the directory (or directories) -where the VC++ compiler binaries are located and put copies of -the yasm.exe binary in these directories. +On a win32 system you will use the win32 version of YASM. On an x64 system +you can use either the 32 or the 64 bit versions. The win32 YASM binary +should be placed in the 32-bit VC++ binary directory, which is typically +located at: -On a win32 system you will use the win32 version of YASM. On -an x64 system you will need to put the win32 YASM binary in the -32-bit VC++ binary directory, which is typically located at: + Program Files (x86)\Microsoft Visual Studio 8\VC\bin - Program Files (x86)\Microsoft Visual Studio 8\VC\bin +If needed the 64-bit YASM binary should be places in the 64-bit tools +binary directory, which is typically at: -and the 64-bit YASM binary in in the 64-bit tools binary -directory, which is typically: + Program Files\Microsoft Visual Studio 8\VC\bin - Program Files\Microsoft Visual Studio 8\VC\bin +2. To use the new custom tools facility in Visual Studio 2005, you need to +place a copy of the yasm.rules file in the Visual Studio 2005 VC project +defaults directory, which is typically located at: -2. To use the new custom tools facility in VC++ .NET 2005 you need -to place copies of the yasm32.rules and yasm32.rules files in the -vc8 directory in the VC++ 'VCProjectDefaults' directory that is -typically: + Program Files (x86)\Microsoft Visual Studio 8\VC\VCProjectDefaults - Program Files (x86)\Microsoft Visual Studio 8\VC\VCProjectDefaults +This allows you to configure YASM as an assembler within the VC++ IDE. To +use YASM in a project, right click on the project in the Solution Explorer +and select 'Custom Build Rules..'. This will give you a dialog box that +allows you to select YASM as an assembler (note that your assembler files +need to have the extension '.asm'). -This allows you to configure YASM as an assembler within the VC++ -IDE. To use YASM in a project, right click on the project in the -Solution Explorer and select 'Custom Build Rules..'. This will give -you a dialog box that allows you to select YASM as a 32 or 64 bit -assembler (your assembler files need to have the extension '.asm'). +To assemble a file with YASM, select the Property Page for the file and the +select 'Yasm Assembler' in the Tool dialog entry. Then click 'Apply' and an +additional property page entry will appear and enable YASM settings to be +established. -To assemble a file with YASM, select the Property Page for the file -and the select 'Yasm Assembler' in the Tool dialog entry and set the -appropriate properties. +As alternative to placing the yasm.rules files as described above is to set +the rules file path in the Visual Studio 2005 settings dialogue. + +It is also important to note that the rules file passes the symbols 'Win32' +or 'x64' to YASM by using the Visual Studio 2005 $(PlatformName) macro in +order to obtain either a 32 or a 64 bit assembler mode. This is a recent +enhancement to YASM so you will need to be sure that your YASM files are at +revision r1331 or higher to use this facility. 5. A Linker Issue ----------------- -There appears to be a linker bug in the VC++ v8 linker that prevents -symbols with absolute addresses being linked in DLL builds. This -means, for example, that LEA instructions of the general form: +There appears to be a linker bug in the VC++ v8 linker that prevents symbols +with absolute addresses being linked in DLL builds. This means, for example, +that LEA instructions of the general form: lea, rax,[rax+symbol] - -cannot be used for DLL builds. The following general form has to be -used instead: + +cannot be used for DLL builds. The following general form has to be used +instead: lea rcx,[symbol wrt rip] lea rax,[rax+rcx] - -This limitation may also cause problems with other instruction that -use absolute addresses. -I am most grateful for the fantastic support that Peter Johnson, YASM's +This limitation may also cause problems with other instruction that use +absolute addresses. + +I am most grateful for the fantastic support that Peter Johnson, YASM's creator, has given me in tracking down this issue. - Brian Gladman, 22nd December 2005 + Brian Gladman, 16th January 2006 diff --git a/Mkfiles/vc8/yasm32.rules b/Mkfiles/vc8/yasm.rules similarity index 68% rename from Mkfiles/vc8/yasm32.rules rename to Mkfiles/vc8/yasm.rules index 32bb2677..2e5f901f 100644 --- a/Mkfiles/vc8/yasm32.rules +++ b/Mkfiles/vc8/yasm.rules @@ -1,13 +1,13 @@  @@ -33,24 +33,25 @@ Name="UnDefines" DisplayName="Remove Preprocessor Definitions" Description="Undefine" - Switch="-u[value]" + Switch="-u [value]" Delimited="true" Inheritable="true" /> diff --git a/Mkfiles/vc8/yasm.vcproj b/Mkfiles/vc8/yasm.vcproj index 3f32b314..66233bb2 100644 --- a/Mkfiles/vc8/yasm.vcproj +++ b/Mkfiles/vc8/yasm.vcproj @@ -22,7 +22,6 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2" @@ -52,10 +51,10 @@ BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" - PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/yasm.pch" - AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/" - ObjectFile="$(PlatformName)\$(ConfigurationName)/" - ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/" + PrecompiledHeaderFile="" + AssemblerListingLocation="$(IntDir)\" + ObjectFile="$(IntDir)\" + ProgramDataBaseFileName="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="4" @@ -74,11 +73,11 @@ /> @@ -143,10 +142,10 @@ BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" - PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/yasm.pch" - AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/" - ObjectFile="$(PlatformName)\$(ConfigurationName)/" - ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/" + PrecompiledHeaderFile="" + AssemblerListingLocation="$(IntDir)\" + ObjectFile="$(IntDir)\" + ProgramDataBaseFileName="$(IntDir)\" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" @@ -169,7 +168,7 @@ LinkIncremental="1" SuppressStartupBanner="true" GenerateDebugInformation="true" - ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/yasm.pdb" + ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb" SubSystem="1" TargetMachine="17" /> @@ -203,7 +202,6 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2" @@ -227,18 +225,19 @@ /> @@ -318,7 +318,7 @@ /> diff --git a/Mkfiles/vc8/yasm64.rules b/Mkfiles/vc8/yasm64.rules deleted file mode 100644 index 394ecb81..00000000 --- a/Mkfiles/vc8/yasm64.rules +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - -