[ros-diffs] [peterw] 31963: - Grab the GCC target dynamically as well as the version so chdefgcc will work with mingw64, etc... - Display the GCC target. - Change the Bison/Flex errors to warnings.
peterw at svn.reactos.org
peterw at svn.reactos.org
Wed Jan 23 18:54:11 CET 2008
Author: peterw
Date: Wed Jan 23 20:54:10 2008
New Revision: 31963
URL: http://svn.reactos.org/svn/reactos?rev=31963&view=rev
Log:
- Grab the GCC target dynamically as well as the version so chdefgcc will work with mingw64, etc...
- Display the GCC target.
- Change the Bison/Flex errors to warnings.
Modified:
trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
Modified: trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd?rev=31963&r1=31962&r2=31963&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd Wed Jan 23 20:54:10 2008
@@ -24,22 +24,26 @@
::
set PATH=%_ROSBE_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%
set _ROSBE_GCCVERSION=
+set _ROSBE_GCCTARGET=
for /f "usebackq tokens=3" %%i in (`"gcc -v 2>&1 | find "gcc version""`) do set _ROSBE_GCCVERSION=%%i
-set PATH=%_ROSBE_MINGWPATH%\bin;%_ROSBE_MINGWPATH%\libexec\gcc\mingw32\%_ROSBE_GCCVERSION%;%_ROSBE_ORIGINALPATH%
+for /f "usebackq tokens=2" %%i in (`"gcc -v 2>&1 | find "Target""`) do set _ROSBE_GCCTARGET=%%i
+set PATH=%_ROSBE_MINGWPATH%\bin;%_ROSBE_MINGWPATH%\libexec\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%;%_ROSBE_ORIGINALPATH%
set _ROSBE_MINGWMAKE=%_ROSBE_MINGWPATH%\bin\mingw32-make.exe
if "%_ROSBE_MODE%" == "MinGW" (
- set C_INCLUDE_PATH=%_ROSBE_MINGWPATH%\include;%_ROSBE_MINGWPATH%\lib\gcc\mingw32\%_ROSBE_GCCVERSION%\include
- set CPLUS_INCLUDE_PATH=%_ROSBE_MINGWPATH%\include;%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%;%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\mingw32;%_ROSBE_MINGWPATH%\lib\gcc\mingw32\%_ROSBE_GCCVERSION%\include
+ set C_INCLUDE_PATH=%_ROSBE_MINGWPATH%\include;%_ROSBE_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
+ set CPLUS_INCLUDE_PATH=%_ROSBE_MINGWPATH%\include;%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%;%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\%_ROSBE_GCCTARGET%;%_ROSBE_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
) else (
- set HOST_CFLAGS=-I"%_ROSBE_MINGWPATH%\include" -I"%_ROSBE_MINGWPATH%\lib\gcc\mingw32\%_ROSBE_GCCVERSION%\include"
- set HOST_CPPFLAGS=-I"%_ROSBE_MINGWPATH%\include" -I"%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%" -I"%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\mingw32" -I"%_ROSBE_MINGWPATH%\lib\gcc\mingw32\%_ROSBE_GCCVERSION%\include"
+ set HOST_CFLAGS=-I"%_ROSBE_MINGWPATH%\include" -I"%_ROSBE_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include"
+ set HOST_CPPFLAGS=-I"%_ROSBE_MINGWPATH%\include" -I"%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%" -I"%_ROSBE_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\%_ROSBE_GCCTARGET%" -I"%_ROSBE_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include"
)
-set LIBRARY_PATH=%_ROSBE_MINGWPATH%\lib;%_ROSBE_MINGWPATH%\lib\gcc\mingw32\%_ROSBE_GCCVERSION%
+set LIBRARY_PATH=%_ROSBE_MINGWPATH%\lib;%_ROSBE_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%
::
:: Display the current version of GCC, NASM, ld and make.
::
gcc -v 2>&1 | find "gcc version"
+echo gcc target^: %_ROSBE_GCCTARGET%
+ld -v
if exist "%_ROSBE_MINGWPATH%\bin\nasm.exe" (
nasm -v
) else (
@@ -51,15 +55,14 @@
bison --version | find "GNU Bison"
) else (
if "%_ROSBE_MODE%" == "RosBE" (
- echo ERROR: Bison is required to build ReactOS, none found in the current MinGW/GCC.
+ echo WARNING: Bison will soon be required to build ReactOS, none found in the current MinGW/GCC.
)
)
if exist "%_ROSBE_MINGWPATH%\bin\flex.exe" (
flex --version
) else (
if "%_ROSBE_MODE%" == "RosBE" (
- echo ERROR: Flex is required to build ReactOS, none found in the current MinGW/GCC.
+ echo WARNING: Flex will soon be required to build ReactOS, none found in the current MinGW/GCC.
)
)
-ld -v
mingw32-make -v | find "GNU Make"
More information about the Ros-diffs
mailing list