Author: dreimer
Date: Mon Oct 6 20:14:09 2008
New Revision: 36671
URL:
http://svn.reactos.org/svn/reactos?rev=36671&view=rev
Log:
- Finally the one and only splitup of GCC Host and Target in different folders and a fix
for the Header Usage Problem in one. This cures the MESS in our GCC Folder and simplifies
the inclusion of new Arches, too. Great work, done By Samuel Serapion
- Updated charch and chdefgcc to support the new way of accessing the different GCCs and
some cleanup by me. chdefgcc got a new Param to choose if the Host of Target GCC will be
edited.
- Fixed MingW.cmd to use Host GCC again.
- Sorta updated the install script for the 64 bit GCC Addon.
Modified:
trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd
trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Bui…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] Mon Oct 6 20:14:09 2008
@@ -111,6 +111,11 @@
set CCACHE_DIR=%APPDATA%\RosBE\.ccache
set HOST_CC=ccache gcc
set HOST_CPP=ccache g++
+
+ ::
+ ::Target defaults to host(i386)
+ ::
+
set TARGET_CC=ccache gcc
set TARGET_CPP=ccache g++
if .%ROS_ARCH%. == .arm. (
@@ -128,6 +133,11 @@
) else (
set HOST_CC=gcc
set HOST_CPP=g++
+
+ ::
+ ::Target defaults to host(i386)
+ ::
+
set TARGET_CC=gcc
set TARGET_CPP=g++
if .%ROS_ARCH%. == .arm. (
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Hel…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] Mon Oct 6 20:14:09 2008
@@ -38,7 +38,7 @@
)
if exist "%_ROSBE_BASEDIR%\chdefgcc.cmd" (
- echo chdefgcc [PATH] - Change the MinGW/GCC directory for the
+ echo chdefgcc [OPTIONS] - Change the MinGW/GCC directory for the
echo current RosBE session.
)
@@ -125,9 +125,11 @@
)
if exist "%_ROSBE_BASEDIR%\chdefgcc.cmd" (
if /i "%1" == "chdefgcc" (
- echo Usage: chdefgcc [PATH]
- echo Change the MinGW/GCC directory for the current RosBE session.
- echo.
+ echo Usage: chdefgcc [OPTIONS]
+ echo Change the MinGW/GCC Target/Host directory for the current RosBE session.
+ echo.
+ echo Path - Path to set the Host of Target GCC to.
+ echo Type - Set it to "target" or "host"
goto :EOC
)
)
Modified: trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Min…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd [iso-8859-1] Mon Oct 6 20:14:09 2008
@@ -25,7 +25,8 @@
set _ROSBE_BASEDIR=%_ROSBE_BASEDIR:~0,-1%
set _ROSBE_MODE=MinGW
set _ROSBE_ORIGINALPATH=%PATH%
-set _ROSBE_MINGWPATH=%_ROSBE_BASEDIR%\4.1.3
+set _ROSBE_HOST_MINGWPATH=%_ROSBE_BASEDIR%\4.1.3
+set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\4.1.3
echo.
echo.
Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] Mon Oct 6 20:14:09 2008
@@ -33,7 +33,8 @@
set _ROSBE_STRIP=0
set _ROSBE_NOSTRIP=0
set _ROSBE_MODULES=0
-set _ROSBE_MINGWPATH=%_ROSBE_BASEDIR%\4.1.3
+set _ROSBE_HOST_MINGWPATH=%_ROSBE_BASEDIR%\4.1.3
+set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\4.1.3
set _ROSBE_LOGDIR=%CD%\RosBE-Logs
set _ROSBE_OBJPATH=
set _ROSBE_OUTPATH=
Modified: trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/cha…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] Mon Oct 6 20:14:09 2008
@@ -15,9 +15,7 @@
::
:: Parse the command line arguments.
-:: ROS_ARCH: Default is i386, can be set to amd64, ppc or arm.
-:: ROS_PREFIX: Default is mingw32. ppc could be ppc-pc-mingw32,
-:: arm arm-pc-mingw32, x64 x86_64-pc-mingw32.
+:: ROSBE_ARCH: Default is i386, can be set to amd64, ppc or arm.
::
if "%1" == "" (
@@ -26,29 +24,32 @@
set _1=%1
)
if /i "%_1%" == "i386" (
- set ROS_ARCH=
- set ROS_PREFIX=
- goto :EOC
+ set _ROSBE_ARCH=
+ goto :EOA
)
if /i "%_1%" == "arm" (
- set ROS_ARCH=arm
- set ROS_PREFIX=arm-pc-mingw32
- goto :EOC
+ set _ROSBE_ARCH=1
+ goto :EOA
)
if /i "%_1%" == "ppc" (
- set ROS_ARCH=ppc
- set ROS_PREFIX=ppc-pc-mingw32
- goto :EOC
+ set _ROSBE_ARCH=2
+ goto :EOA
)
if /i "%_1%" == "amd64" (
- set ROS_ARCH=amd64
- set ROS_PREFIX=x86_64-pc-mingw32
- goto :EOC
+ set _ROSBE_ARCH=3
+ goto :EOA
)
if not "%_1%" == "" (
echo Unknown parameter specified. Try 'help [COMMAND]'.
goto :EOC
)
+
+:EOA
+
+::
+:: Refresh all needed Params by recalling the main Path setting CMD File.
+::
+call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
goto :EOC
::
Modified: trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/chd…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] Mon Oct 6 20:14:09
2008
@@ -13,14 +13,18 @@
)
if "%_ROSBE_MODE%" == "RosBE" (
- title Change the current MinGW/GCC directory...
+ title Change the current MinGW/GCC Host/Target directory...
)
::
:: Parse the command line arguments.
::
for /f "usebackq tokens=*" %%i in
(`""%_ROSBE_BASEDIR%\Tools\rquote.exe" %1"`) do set _1=%%i
+set _2=%2
if "%_1%" == "" (
+ call :INTERACTIVE
+)
+if "%_2%" == "" (
call :INTERACTIVE
)
@@ -31,21 +35,38 @@
goto :EOC
)
-if not exist "%_1%\bin\gcc.exe" (
+if not exist "%_1%\bin\*gcc.exe" (
echo ERROR: No MinGW/GCC found in the specified path.
goto :EOC
)
-set _ROSBE_MINGWPATH=%_1%
-echo Location: %_ROSBE_MINGWPATH%
-call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
+if /i "%_2%" == "target" (
+ set _ROSBE_TARGET_MINGWPATH=%_1%
+ echo Target Location: %_ROSBE_TARGET_MINGWPATH%
+ goto :EOA
+)
+if /i "%_2%" == "host" (
+ set _ROSBE_HOST_MINGWPATH=%_1%
+ echo Host Location: %_ROSBE_HOST_MINGWPATH%
+ goto :EOA
+) else (
+ echo ERROR: You specified wrong parameters.
+ goto :EOC
+)
+:EOA
+call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd" chdefgcc
goto :EOC
:INTERACTIVE
set /p _1="Please enter a MinGW/GCC directory (don't use quotes): "
if "%_1%" == "" (
echo ERROR: You must enter a MinGW/GCC directory.
+ goto :EOC
+ )
+ set /p _2="Please specify, if this will be the Target or Host GCC: "
+ if "%_2%" == "" (
+ echo ERROR: You must enter "target" or "host".
goto :EOC
)
goto :EOF
@@ -59,3 +80,4 @@
:: Unload all used Vars.
::
set _1=
+set _2=
Modified: trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] Mon Oct 6
20:14:09 2008
@@ -17,9 +17,9 @@
:: Check if we are running within the RosBE, and if not
:: initialize GCC for the current directory.
::
-if not defined _ROSBE_MINGWPATH (
+if not defined _ROSBE_HOST_MINGWPATH (
set _ROSBE_MODE=MinGW
- set _ROSBE_MINGWPATH=%CD%
+ set _ROSBE_HOST_MINGWPATH=%CD%
set _ROSBE_ORIGINALPATH=%PATH%
)
@@ -30,49 +30,66 @@
set ROS_ARCH=
set ROS_PREFIX=
+if "%1" == "chdefgcc" (
+ goto :main
+)
+
if .%_ROSBE_ARCH%. == .1. (
set ROS_ARCH=arm
set ROS_PREFIX=arm-pc-mingw32
+ REM set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\4.4.0
)
if .%_ROSBE_ARCH%. == .2. (
set ROS_ARCH=ppc
set ROS_PREFIX=ppc-pc-mingw32
+ REM set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\4.4.0
)
if .%_ROSBE_ARCH%. == .3. (
set ROS_ARCH=amd64
set ROS_PREFIX=x86_64-pc-mingw32
+ set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\4.4.0
)
+
+:main
::
:: Set up the GCC 4.x.x build environment.
::
-set PATH=%_ROSBE_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%
-set _ROSBE_GCCVERSION=
-set _ROSBE_GCCTARGET=
+set PATH=%_ROSBE_HOST_MINGWPATH%\bin;%_ROSBE_TARGET_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%
+set _ROSBE_MINGWMAKE=%_ROSBE_HOST_MINGWPATH%\bin\mingw32-make.exe
+
+if not .%ROS_ARCH%. == .. (
+for /f "usebackq tokens=3" %%i in (`"%ROS_PREFIX%-gcc -v 2>&1 |
find "gcc version""`) do set _ROSBE_GCCVERSION=%%i
+for /f "usebackq tokens=2" %%i in (`"%ROS_PREFIX%-gcc -v 2>&1 |
find "Target""`) do set _ROSBE_GCCTARGET=%%i
+) else (
for /f "usebackq tokens=3" %%i in (`"gcc -v 2>&1 | find "gcc
version""`) do set _ROSBE_GCCVERSION=%%i
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
+)
+
+for /f "usebackq tokens=3" %%i in (`"gcc -v 2>&1 | find "gcc
version""`) do set _ROSBE_HOST_GCCVERSION=%%i
+for /f "usebackq tokens=2" %%i in (`"gcc -v 2>&1 | find
"Target""`) do set _ROSBE_HOST_GCCTARGET=%%i
+
if "%_ROSBE_MODE%" == "MinGW" (
- 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
+ set
C_INCLUDE_PATH=%_ROSBE_HOST_MINGWPATH%\include;%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
+ set
CPLUS_INCLUDE_PATH=%_ROSBE_HOST_MINGWPATH%\include;%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%;%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\%_ROSBE_GCCTARGET%;%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
) else (
- 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 HOST_CFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include"
-I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
+ set HOST_CPPFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include"
-I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%"
-I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%\%_ROSBE_HOST_GCCTARGET%"
-I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
+ set TARGET_CFLAGS=-I"%_ROSBE_TARGET_MINGWPATH%\include"
-I"%_ROSBE_TARGET_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include"
+ set TARGET_CPPFLAGS=-I"%_ROSBE_TARGET_MINGWPATH%\include"
-I"%_ROSBE_TARGET_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%"
-I"%_ROSBE_TARGET_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\%_ROSBE_GCCTARGET%"
-I"%_ROSBE_TARGET_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include"
)
-set
LIBRARY_PATH=%_ROSBE_MINGWPATH%\lib;%_ROSBE_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%
::
:: Display the current version of GCC, NASM, ld and make.
::
if not .%ROS_ARCH%. == .. (
- %ROS_PREFIX%-gcc -v 2>&1 | find "gcc version"
+ "%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%-gcc" -v 2>&1 | find
"gcc version"
if .%ROS_PREFIX%. == .. (
echo gcc target^: %_ROSBE_GCCTARGET%
) else (
echo gcc target^: %ROS_PREFIX:~0,-11%
)
- %ROS_PREFIX%-ld -v
+ "%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%-ld" -v
) else (
gcc -v 2>&1 | find "gcc version"
if .%ROS_PREFIX%. == .. (
@@ -83,10 +100,10 @@
ld -v
)
-if exist "%_ROSBE_MINGWPATH%\bin\nasm.exe" (
+if exist "%_ROSBE_HOST_MINGWPATH%\bin\nasm.exe" (
nasm -v
) else (
- if exist "%_ROSBE_MINGWPATH%\bin\yasm.exe" (
+ if exist "%_ROSBE_HOST_MINGWPATH%\bin\yasm.exe" (
yasm --version | find "yasm 0"
) else (
if "%_ROSBE_MODE%" == "RosBE" (
@@ -94,14 +111,14 @@
)
)
)
-if exist "%_ROSBE_MINGWPATH%\bin\bison.exe" (
+if exist "%_ROSBE_HOST_MINGWPATH%\bin\bison.exe" (
bison --version | find "GNU Bison"
) else (
if "%_ROSBE_MODE%" == "RosBE" (
echo WARNING: Bison will soon be required to build ReactOS, none found in the
current MinGW/GCC.
)
)
-if exist "%_ROSBE_MINGWPATH%\bin\flex.exe" (
+if exist "%_ROSBE_HOST_MINGWPATH%\bin\flex.exe" (
flex --version
) else (
if "%_ROSBE_MODE%" == "RosBE" (
Modified: trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE64.…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi [iso-8859-1] Mon Oct 6 20:14:09 2008
@@ -116,7 +116,7 @@
SectionEnd
Section -MinGWGCCNASM SEC02
- SetOutPath "$INSTDIR\4.1.3"
+ SetOutPath "$INSTDIR\4.4.0"
SetOverwrite try
File /r Components\4.4.0\*.*
SectionEnd
@@ -185,7 +185,7 @@
;;
;; Clean up installed files.
;;
- RMDir /r /REBOOTOK "$INSTDIR\4.1.3"
+ RMDir /r /REBOOTOK "$INSTDIR\4.4.0"
Delete /REBOOTOK "$INSTDIR\charch.cmd"
Delete /REBOOTOK "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe"
;; Whoever dares to change this back into: RMDir /r /REBOOTOK "$INSTDIR"
will be KILLED!!!