diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-08-26 20:49:29 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-08-26 20:54:59 +0300 |
commit | eefc25d1d2eccf04571b8204663d91e61cb5f7f0 (patch) | |
tree | d6fe0ed9445a4e059e831742d91f8115fab8663b /set_soenv.in | |
parent | 933d898b10f0c71fedc882ac2f2adb258d8b5994 (diff) |
Bin USE_MINGW
Its alternative values as used by OOo is irrelevant to us as we don't
intend to support building using MinGW on Windows itself. To us, MinGW
always means cross-compilation. For us it is enough to look at
$(OS)$(COM), and WNTGCC always implies cross-compilation.
(OOo on the other hand attempts to support use of the Cygwin gcc with
the -mno-cygwin option (which is practically considered an obsolete
option), the normal MinGW compiler (but still from Cygwin), but not
cros-compilation.)
Diffstat (limited to 'set_soenv.in')
-rwxr-xr-x | set_soenv.in | 170 |
1 files changed, 46 insertions, 124 deletions
diff --git a/set_soenv.in b/set_soenv.in index a54c351e0e7d..ab0df752604b 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -36,7 +36,7 @@ use File::Basename; my ( $oldoutfile, $outfile, $bootfile, $newline, $comment, $compiler, $ds, $ps, $wps, $cur_dir, $par_dir, $I, $L, $tmp, $MINGW, - $USE_MINGW, $platform, + $platform, $cygwinver, $empty, $no_ant, $no_gcc_include, $no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $exportvars, $win_format_var, $perl_os, @mingw_lib_include_paths, $mingw_lib_include_path); # @@ -55,8 +55,7 @@ my ( $CALL_CDECL, $COMMON_OUTDIR, my ( $COM, $ARCH, $CPU, $CPUNAME, $GLIBC, $GUI, $GUIBASE, $GVER, $OS, $OSVERSION, $OUTPATH, $INPATH, $PATH_SEPERATOR, $DYNAMIC_CRT, $use_shl_versions, $JRELIBDIR, - $JRETOOLKITDIR, $JRETHREADDIR, - $FLIPCMD ); + $JRETOOLKITDIR, $JRETHREADDIR ); # #------------------------------------------- # IIc. Declaring the environment variables. @@ -120,12 +119,10 @@ $SYSTEM_MOZILLA = '@SYSTEM_MOZILLA@'; $JDK = '@JDK@'; $JAVAFLAGS = '@JAVAFLAGS@'; $MINGW = '@WITH_MINGW@'; # use MinGW for Windows build -$USE_MINGW = '@USE_MINGW@'; # use MinGW in cygwin or pure-mingw $CC = '@CC@'; # C compiler $CXX = '@CXX@'; # C++ compiler $MOZILLA_VERSION = '@MOZILLA_VERSION@'; # mozilla version to use to build mozilla $MOZILLA_TOOLKIT = '@MOZILLA_TOOLKIT@'; # GUI toolkit to use to build mozilla -$FLIPCMD = ""; # Flip '/' to '\' wrapper (only for winnt) $GLIBC = ""; # Whether the platform uses glibc $PROEXT = "@PROEXT@"; $EPM_FLAGS = ""; @@ -650,14 +647,11 @@ elsif ( $platform =~ m/cygwin|mingw32/ ) $use_shl_versions = "TRUE"; $wps = ';' if '@build_os@' eq 'cygwin'; # Windows style path seperator if ( $MINGW eq "yes" ) - { print "Setting Windows (MinGW) specific values... "; - # At the moment this implies the use of tcsh - # WTF does that mean? + { print "Setting Windows (MinGW cross-compilation) specific values... "; - $FLIPCMD = "slfl.pl" if '@build_os@' eq 'cygwin'; + die 'For building natively on Windows we support only MSVC' if ('@build_os@' eq 'cygwin'); - $PATH_SEPERATOR = ';'; - $PATH_SEPERATOR = ':' if '@build_os@' ne 'cygwin'; + $PATH_SEPERATOR = ':'; $oldoutfile = "WindowsMinGWEnv.Set.sh"; $COMPATH = PathFormat('@COMPATH@/bin'); $COMPATH =~ s/\/bin$//i; @@ -665,7 +659,6 @@ elsif ( $platform =~ m/cygwin|mingw32/ ) $OUTPATH = "wntgcci"; $OUTPATH = "wntgccx" if $platform =~ m/^x86_64/; $INPATH = $OUTPATH.$PROEXT; - $ATL_INCLUDE = '$SOLARVER'.$ds.'$INPATH'.$ds."inc".$ds."external".$ds."mingw".$ds."include".$ds."atl". " ".'$WINDOWS_SDK_HOME'.$ds."include".$ds."atl"; } else # The MSVC section starts here { print "Setting Windows (MSVC) specific values... "; @@ -691,8 +684,6 @@ elsif ( $platform =~ m/cygwin|mingw32/ ) $ATL_LIB .= $ds."amd64"; $MFC_LIB .= $ds."amd64"; } - # No speacial treatment for CC an CXX anymore. - $FLIPCMD = "slfl.pl"; $PATH_SEPERATOR = ';'; } } @@ -1025,43 +1016,23 @@ if ($platform =~ m/cygwin/) $ILIB = $cur_dir; - # Mingw is different - if ( $COM eq "MSC" ) - { $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB; - if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" ) { - $ILIB .= $wps.$JAVA_HOME.$LIB; - } - if ( $CL_X64 ne "TRUE" ) { - $ILIB .= $wps.$COMPATH.$LIB. - $wps.$WINDOWS_SDK_HOME.$LIB; - } else { - $ILIB .= $wps.$COMPATH.$LIB.$ds."amd64". - $wps.$WINDOWS_SDK_HOME.$LIB64; - } - $ILIB .= $wps.$DOTNET_FRAMEWORK_HOME.$LIB; - if ( '@ENABLE_DIRECTX@' ne "" ) { - $ILIB .= $wps.$DIRECTXSDK_LIB; - } - # ILIB needs to use '\' directory seperators; - $ILIB = WinPath( $ILIB, ";" ); - } - elsif ( $COM eq "GCC" ) - { $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB. - $wps.$SOLARVER.$ds.$INPATH.$BIN. - $wps.$JAVA_HOME.$LIB; - if ( $USE_MINGW eq "cygwin" ) - { $ILIB .= $wps.PathFormat($USR.$LIB.$ds."mingw"). - $wps.PathFormat($USR.$LIB.$ds."w32api"); - } - else - { $ILIB .= $wps.$COMPATH.$LIB; - } - $ILIB .= $wps.PathFormat("@MINGW_CLIB_DIR@"). - $wps.$WINDOWS_SDK_HOME.$LIB; - if ( '@ENABLE_DIRECTX@' ) - { $ILIB .= $wps.PathFormat("@DIRECTXSDK_LIB@"); - } + $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB; + if ( $JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME" ) { + $ILIB .= $wps.$JAVA_HOME.$LIB; + } + if ( $CL_X64 ne "TRUE" ) { + $ILIB .= $wps.$COMPATH.$LIB. + $wps.$WINDOWS_SDK_HOME.$LIB; + } else { + $ILIB .= $wps.$COMPATH.$LIB.$ds."amd64". + $wps.$WINDOWS_SDK_HOME.$LIB64; + } + $ILIB .= $wps.$DOTNET_FRAMEWORK_HOME.$LIB; + if ( '@ENABLE_DIRECTX@' ne "" ) { + $ILIB .= $wps.$DIRECTXSDK_LIB; } + # ILIB needs to use '\' directory seperators; + $ILIB = WinPath( $ILIB, ";" ); $JAVAHOME = '$JAVA_HOME'; @@ -1126,34 +1097,26 @@ elsif ($platform =~ m/cygwin/) $tmppath =~ s/^\/\//\//; $PATH .= $ps.$tmppath; - if ( $COM eq "MSC" ) { - $tmppath = CygFormat($MSPDB_PATH); - # for MSVC to find mspdb71.dll - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { - $PATH .= $ps.$tmppath; - } - # need midl.exe - $tmppath = CygFormat($MIDL_PATH); - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { - $PATH .= $ps.$tmppath; - } - # needs csc.exe - $tmppath = CygFormat($CSC_PATH); - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { - $PATH .= $ps.$tmppath; - } - # Installer needs some files if the Windows Installer SDK - $tmppath = CygFormat($WINDOWS_SDK_HOME); - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) { - $PATH .= $ps.$tmppath.$BIN; - } - } else { # Mingw is different - # Native installer needs some files if the Windows Installer SDK - $tmppath = CygFormat($WINDOWS_SDK_HOME); - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) { - $PATH .= $ps.$tmppath.$BIN; - } - } + $tmppath = CygFormat($MSPDB_PATH); + # for MSVC to find mspdb71.dll + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { + $PATH .= $ps.$tmppath; + } + # need midl.exe + $tmppath = CygFormat($MIDL_PATH); + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { + $PATH .= $ps.$tmppath; + } + # needs csc.exe + $tmppath = CygFormat($CSC_PATH); + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { + $PATH .= $ps.$tmppath; + } + # Installer needs some files if the Windows Installer SDK + $tmppath = CygFormat($WINDOWS_SDK_HOME); + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) { + $PATH .= $ps.$tmppath.$BIN; + } if ( $ASM_PATH ne "ASM_IN_PATH" ) { $PATH .= $ps.CygFormat($ASM_PATH); @@ -1377,35 +1340,9 @@ elsif ($platform =~ m/cygwin/) { $SOLARINC .= $I.'$JAVA_HOME'.$INCLUDE.$ds."win32". $I.'$JAVA_HOME'.$INCLUDE; } - # Mingw is different - if ( $COM eq "MSC" ) - { $SOLARINC .= $I.'$WINDOWS_SDK_HOME'.$INCLUDE. - $I.'$COMPATH'.$INCLUDE; - if ( '@ENABLE_DIRECTX@' ne "" ) { - $SOLARINC .= $I.PathFormat('@DIRECTXSDK_HOME@').$INCLUDE; - } - } - elsif ( $COM eq "GCC" ) - { $SOLARINC .= $I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."external".$ds."mingw".$INCLUDE; - if ( $USE_MINGW eq "cygwin" ) - { $SOLARINC .= $I.PathFormat($USR.$INCLUDE.$ds."mingw"). - $I.PathFormat($USR.$INCLUDE.$ds."w32api"). - $I.PathFormat($USR.$INCLUDE); } - else - { $SOLARINC .= $I.'$COMPATH'.$INCLUDE; } - @mingw_lib_include_paths = split( / /, "@MINGW_LIB_INCLUDE_PATH@" ); - $SOLARINC .= $I.PathFormat("@MINGW_BACKWARD_INCLUDE_PATH@"); - foreach $mingw_lib_include_path (@mingw_lib_include_paths) - { chomp $mingw_lib_include_path; - if ( $mingw_lib_include_path ne $COMPATH.$INCLUDE && $mingw_lib_include_path ne "" ) - { - $SOLARINC .= $I.PathFormat($mingw_lib_include_path); - } - } - $SOLARINC .= $I.PathFormat("@GXX_INCLUDE_PATH@").$I.PathFormat("@GXX_INCLUDE_PATH@".$ds."mingw32"). - $I.'$WINDOWS_SDK_HOME'.$INCLUDE; - } - if ( $COM ne "MSC" && '@ENABLE_DIRECTX@' ne "" ) { + $SOLARINC .= $I.'$WINDOWS_SDK_HOME'.$INCLUDE. + $I.'$COMPATH'.$INCLUDE; + if ( '@ENABLE_DIRECTX@' ne "" ) { $SOLARINC .= $I.PathFormat('@DIRECTXSDK_HOME@').$INCLUDE; } } @@ -1640,7 +1577,7 @@ ToFile( "PATH_SEPERATOR", $PATH_SEPERATOR, "e" ); ToFile( "COMEX", $COMEX, "e" ); ToFile( "DYNAMIC_CRT", $DYNAMIC_CRT, "e" ); ToFile( "use_shl_versions", $use_shl_versions, "e" ); -ToFile( "FLIPCMD", $FLIPCMD, "e" ); + if ( $platform =~ m/darwin/ && $platform !~ m/^arm/) { # MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build, @@ -1664,9 +1601,7 @@ if ( $platform =~ m/cygwin/ ) ToFile( "DIRECTXSDK_LIB", $DIRECTXSDK_LIB, "e" ); ToFile( "USE_DIRECTX5", $USE_DIRECTX5, "e" ); ToFile( "ATL_LIB", $ATL_LIB, "e" ); - if ( $MINGW ne "yes" ) - { ToFile( "ATL_INCLUDE", $ATL_INCLUDE, "e" ); - } + ToFile( "ATL_INCLUDE", $ATL_INCLUDE, "e" ); ToFile( "MFC_LIB", $MFC_LIB, "e" ); ToFile( "MFC_INCLUDE", $MFC_INCLUDE, "e" ); ToFile( "NSIS_PATH", $NSIS_PATH, "e" ); @@ -2077,19 +2012,6 @@ ToFile( "gb_REPOS", $gb_REPOS, "e" ); if ( $platform =~ m/cygwin/ ) { ToFile( "ILIB", $ILIB, "e" ); - if ( $MINGW eq "yes" ) - { ToFile( "ATL_INCLUDE", $ATL_INCLUDE, "e" ); - ToFile( "EXCEPTIONS", "@EXCEPTIONS@", "e" ); - ToFile( "DIRECTXSDK_HOME", PathFormat("@DIRECTXSDK_HOME@"), "e" ); - ToFile( "USE_MINGW", $USE_MINGW, "e" ); - ToFile( "MINGW_CLIB_DIR", PathFormat("@MINGW_CLIB_DIR@"), "e" ); - ToFile( "MINGW_SHARED_GCCLIB", "@MINGW_SHARED_GCCLIB@", "e" ); - ToFile( "MINGW_GCCLIB_EH", "@MINGW_GCCLIB_EH@", "e" ); - ToFile( "MINGW_SHARED_GXXLIB", "@MINGW_SHARED_GXXLIB@", "e" ); - ToFile( "MINGW_SHARED_LIBSTDCPP", "@MINGW_SHARED_LIBSTDCPP@", "e" ); - ToFile( "MINGW_GCCDLL", "@MINGW_GCCDLL@", "e" ); - ToFile( "MINGW_GXXDLL", "@MINGW_GXXDLL@", "e" ); - } ToFile( "GREP", $WIN_GREP, "e" ); ToFile( "FIND", $WIN_FIND, "e" ); ToFile( "LS", $WIN_LS, "e" ); |