[Libreoffice-commits] core.git: Branch 'aoo/trunk' - set_soenv.in solenv/gbuild solenv/inc
Don Lewis
truckman at apache.org
Fri Mar 9 05:09:37 UTC 2018
set_soenv.in | 33 +++-----
solenv/gbuild/platform/freebsd.mk | 2
solenv/gbuild/platform/linux.mk | 2
solenv/gbuild/platform/macosx.mk | 2
solenv/gbuild/platform/os2.mk | 2
solenv/gbuild/platform/solaris.mk | 2
solenv/gbuild/platform/windows.mk | 2
solenv/gbuild/platform/winmingw.mk | 2
solenv/inc/settings.mk | 7 -
solenv/inc/tg_compv.mk | 138 -------------------------------------
10 files changed, 20 insertions(+), 172 deletions(-)
New commits:
commit ad3dba5fa877fab937d474bf18e63b0a010637de
Author: Don Lewis <truckman at apache.org>
Date: Fri Mar 9 04:22:18 2018 +0000
#127664# $CCNUMVER from dmake to configure
Move the calculation of $CCNUMVER and some other variables from
main/solenv/inc/tg_compv.mk, where it is only usable by dmake, to
configure, where it can be used by both dmake and gbuild. This is
a requirement to upstream some compiler bug workaround patches from
the FreeBSD port.
A bit of logic from set_soenv is also moved into configure. A bunch
more should probably be moved so that the configuration logic is
not spread across so many different places, but that can wait.
Something else to consider is that it would be nice to use a different
value of $COM for Apple's clang, maybe "ACLANG" or "APPLECLANG"
since it has a different version numbering scheme that the open-source
version of clang and having a unique identifier would simplify
version checking when applying compiler bug workarounds.
Note: I think the old value of $CCNUMVER on the Mac is wrong. It
should look something like 000800010000 or 000700030000, depending
on the installed version.
Change -DCPPU_ENV on the Mac from $(COMID) to $(COMNAME) for
consistency with the dmake side. It shouldn't make a difference
in practice since both have the same value on the Mac.
diff --git a/set_soenv.in b/set_soenv.in
index b894a6935279..1ee2026213ed 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -74,7 +74,7 @@ my ( $CALL_CDECL, $COMMON_OUTDIR, $BMP_WRITES_FLAG,
$BUILD_SOSL_RELEASE, $RSC_ONCE );
#
# Platform dependent constant values.
-my ( $BIG_SVX, $COM, $ARCH, $CPU, $CPUNAME, $CVER, $GLIBC, $GUI, $GUIBASE,
+my ( $BIG_SVX, $ARCH, $CPU, $CPUNAME, $CVER, $GLIBC, $GUI, $GUIBASE,
$GVER, $OS, $OSVERSION, $OUTPATH, $INPATH, $PATH_SEPERATOR,
$DYNAMIC_CRT, $SET_EXCEPTIONS, $use_shl_versions, $CDPATHx, $JRELIBDIR,
$JRETOOLKITDIR, $JRETHREADDIR,
@@ -248,10 +248,8 @@ if ( $platform =~ m/solaris/ )
}
if ( $CC =~ "gcc") {
- $COM = "GCC";
$CVER = "C300";
} else {
- $COM = "C52";
$CVER = "C52";
$COMEX = 4;
}
@@ -306,7 +304,6 @@ elsif ( $platform =~ m/netbsd/ )
$OUTPATH = $OUTPATH."2";
# General NetBSD settings:
$BIG_SVX = "TRUE";
- $COM = "GCC";
$COMPATH = '@COMPATH@';
$GUI = "UNX";
$GUIBASE = "unx";
@@ -320,7 +317,6 @@ elsif ( $platform =~ m/kfreebsd/ )
# General GNU/kFreeBSD settings:
$CVER = "C341";
$BIG_SVX = "TRUE";
- $COM = "GCC";
$COMPATH = '@COMPATH@';
$GLIBC = "2REDHAT60";
$GUI = "UNX";
@@ -358,7 +354,6 @@ elsif ( $platform =~ m/kfreebsd/ )
}
elsif ( $platform =~ m/freebsd/ )
{ $BIG_SVX = "TRUE";
- $COM = "@COM_IS@";
$COMPATH = '@COMPATH@';
$CVER = "C300";
$GUI = "UNX";
@@ -442,7 +437,6 @@ elsif ( $platform =~ m/linux/ )
# General Linux settings:
$CVER = "C341";
$BIG_SVX = "TRUE";
- $COM = "@COM_IS@";
$COMPATH = '@COMPATH@';
$GLIBC = "2REDHAT60";
$GUI = "UNX";
@@ -661,7 +655,6 @@ elsif ( $platform =~ m/osf1/ )
{ print "Setting Tru64 specific values... ";
$outfile = "Tru64AlphaEnv.Set";
$BIG_SVX = "TRUE";
- $COM = "CXX";
$COMPATH = '@COMPATH@';
$CPU = "A";
$CPUNAME = "ALPHA_";
@@ -705,7 +698,6 @@ elsif ( $platform =~ m/cygwin/ )
$outfile = "winmingw.set";
$COMPATH = PathFormat('@COMPATH@/bin');
$COMPATH =~ s/\/bin$//i;
- $COM = "GCC";
$CVER = "C341";
$OUTPATH = "wntgcci";
$INPATH = $OUTPATH.$PROEXT;
@@ -717,7 +709,6 @@ elsif ( $platform =~ m/cygwin/ )
$CXX_X64_BINARY = PathFormat('@COMPATH@/bin/amd64/cl.exe');
$LINK_X64_BINARY = PathFormat('@COMPATH@/bin/amd64/link.exe');
$LIBMGR_X64_BINARY = PathFormat('@COMPATH@/bin/amd64/lib.exe');
- $COM = "MSC";
$OUTPATH = "wntmsci at COMEX@";
$INPATH = $OUTPATH.$PROEXT;
$COMEX = '@COMEX@';
@@ -759,7 +750,6 @@ elsif ( $platform =~ m/os2/ )
{
print "Setting OS/2 gcc 3.3.5 specific values... \n";
$outfile = "os2env.set";
- $COM = "GCC";
$CVER = "C300";
$OUTPATH = "os2gcci";
$INPATH = $OUTPATH.$PROEXT;
@@ -783,7 +773,6 @@ elsif ( $platform =~ m/darwin/ )
if( $CC =~ "gcc" )
{
print "Setting values for MacOSX/Darwin for Xcode<=3";
- $COM = "GCC";
$outfile = "MacOSXX86Env.Set";
$CPU = "I";
$CPUNAME = "INTEL";
@@ -792,7 +781,6 @@ elsif ( $platform =~ m/darwin/ )
elsif ($platform =~ m/^i[3456]86/)
{
print "Setting values for MacOSX/Darwin on x86_32... ";
- $COM = "CLANG";
$outfile = "MacOSXX32Env.Set";
$CPU = "I";
$CPUNAME = "INTEL";
@@ -801,7 +789,6 @@ elsif ( $platform =~ m/darwin/ )
elsif ($platform =~ m/^x86_64/)
{
print "Setting values for MacOSX/Darwin on x86_64... ";
- $COM = "CLANG";
$outfile = "MacOSXX64Env.Set";
$CPU = "X";
$CPUNAME = "X86_64";
@@ -836,7 +823,6 @@ elsif ( $platform =~ m/aix/ )
$JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."classic";
$JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."ppc".$ds."native_threads";
$BIG_SVX = "TRUE";
- $COM = "GCC";
$CVER = "C300";
$COMPATH = '@COMPATH@';
$GUI = "UNX";
@@ -1073,7 +1059,7 @@ if ($platform =~ m/cygwin|os2/)
$ILIB = $cur_dir;
# Mingw is different
- if ( $COM eq "MSC" )
+ if ( "@COM@" eq "MSC" )
{ $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB.
$wps.$JAVA_HOME.$LIB.
$wps.$PSDK_HOME.$LIB.
@@ -1094,7 +1080,7 @@ if ($platform =~ m/cygwin|os2/)
# ILIB needs to use '\' directory seperators;
$ILIB = WinPath( $ILIB, ";" );
}
- elsif ( $COM eq "GCC" )
+ elsif ( "@COM@" eq "GCC" )
{ $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB.
$wps.$SOLARVER.$ds.$INPATH.$BIN.
$wps.$JAVA_HOME.$LIB;
@@ -1172,7 +1158,7 @@ elsif ($platform =~ m/cygwin/)
$tmppath =~ s/^\/\//\//;
$PATH .= $ps.$tmppath;
- if ( $COM eq "MSC" ) {
+ if ( "@COM@" eq "MSC" ) {
$tmppath = CygFormat($MSPDB_PATH);
# for .NET to find mspdb71.dll (needed by CL.EXE C/C++ Compiler)
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
@@ -1443,7 +1429,7 @@ elsif ($platform =~ m/cygwin/)
{ $SOLARINC .= $I.'$JAVA_HOME'.$ds."include".$ds."win32".
$I.'$JAVA_HOME'.$ds."include";
# Mingw is different
- if ( $COM eq "MSC" )
+ if ( "@COM@" eq "MSC" )
{ $SOLARINC .= $I.'$PSDK_HOME'.$INCLUDE.
$I.'$COMPATH'.$ds."include";
if ( '@ENABLE_DIRECTX@' ne "" ) {
@@ -1455,7 +1441,7 @@ elsif ($platform =~ m/cygwin/)
}
}
}
- elsif ( $COM eq "GCC" )
+ elsif ( "@COM@" eq "GCC" )
{ $SOLARINC .= $I.'$SOLARVER'.$ds.'$INPATH'.$INC.$ds."external".$ds."mingw".$ds."include";
if ( $USE_MINGW eq "cygwin" )
{ $SOLARINC .= $I.PathFormat($USR.$ds."include".$ds."mingw").
@@ -1697,9 +1683,14 @@ ToFile( "ENABLE_ONLINE_UPDATE", "@ENABLE_ONLINE_UPDATE@", "e" );
ToFile( "Platform dependent constant values.", $empty, "c" );
ToFile( "SOLAR_JAVA", $SOLAR_JAVA, "e" );
ToFile( "BIG_SVX", $BIG_SVX, "e" );
-ToFile( "COM", $COM, "e" );
+ToFile( "COM", "@COM@", "e" );
ToFile( "COMPATH", $COMPATH, "e" );
ToFile( "CC_PATH", "@CC_PATH@", "e" );
+ToFile( "COMNAME", "@COMNAME@", "e" );
+ToFile( "COMID", "@COMID@", "e" );
+ToFile( "CCNUMVER", "@CCNUMVER@", "e" );
+ToFile( "CCVER", "@CCVER@", "e" );
+
ToFile( "CXX_X64_BINARY", $CXX_X64_BINARY, "e" );
ToFile( "LINK_X64_BINARY", $LINK_X64_BINARY, "e" );
ToFile( "LIBMGR_X64_BINARY", $LIBMGR_X64_BINARY, "e" );
diff --git a/solenv/gbuild/platform/freebsd.mk b/solenv/gbuild/platform/freebsd.mk
index 26ecec2c29b5..367ea97f7558 100644
--- a/solenv/gbuild/platform/freebsd.mk
+++ b/solenv/gbuild/platform/freebsd.mk
@@ -59,7 +59,7 @@ gb_OSDEFS := \
gb_COMPILERDEFS := \
-D$(COM) \
-DHAVE_GCC_VISIBILITY_FEATURE \
- -DCPPU_ENV=gcc3 \
+ -DCPPU_ENV=$(COMNAME) \
ifeq ($(CPUNAME),X86_64)
gb_CPUDEFS := -D$(CPUNAME)
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 2cd94ef471fd..ea54db3168a3 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -56,7 +56,7 @@ gb_OSDEFS := \
gb_COMPILERDEFS := \
-D$(COM) \
-DHAVE_GCC_VISIBILITY_FEATURE \
- -DCPPU_ENV=gcc3 \
+ -DCPPU_ENV=$(COMNAME) \
ifeq ($(CPUNAME),X86_64)
gb_CPUDEFS := -D$(CPUNAME)
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 03e693b0211f..a57f7347628c 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -59,7 +59,7 @@ gb_OSDEFS := \
gb_COMPILERDEFS := \
-D$(COM) \
-DHAVE_GCC_VISIBILITY_FEATURE \
- -DCPPU_ENV=$(COMID) \
+ -DCPPU_ENV=$(COMNAME) \
ifeq ($(CPUNAME),POWERPC)
gb_CPUDEFS := -DPOWERPC -DPPC
diff --git a/solenv/gbuild/platform/os2.mk b/solenv/gbuild/platform/os2.mk
index 41dc3e70c5f9..cccbdc90ef29 100644
--- a/solenv/gbuild/platform/os2.mk
+++ b/solenv/gbuild/platform/os2.mk
@@ -58,7 +58,7 @@ gb_OSDEFS := \
gb_COMPILERDEFS := \
-D$(COM) \
-DHAVE_GCC_VISIBILITY_FEATURE \
- -DCPPU_ENV=gcc3 \
+ -DCPPU_ENV=$(COMNAME) \
gb_CPUDEFS := -DINTEL -D_X86_=1 -DX86
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 4a03d777f51c..765bc054c6e3 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -55,7 +55,7 @@ gb_OSDEFS := \
gb_COMPILERDEFS := \
-D$(COM) \
- -DCPPU_ENV=sunpro5 \
+ -DCPPU_ENV=$(COMNAME) \
gb_CPUDEFS := -D$(CPUNAME)
ifeq ($(CPUNAME),SPARC)
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 0214539b2fa0..771a7a73ce20 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -59,7 +59,7 @@ gb_COMPILERDEFS := \
-D_MT \
-D_DLL \
-DBOOST_MEM_FN_ENABLE_CDECL \
- -DCPPU_ENV=msci \
+ -DCPPU_ENV=$(COMNAME) \
-DFULL_DESK \
-DM1500 \
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index cc185152f01f..a684b12e535e 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -77,7 +77,7 @@ gb_COMPILERDEFS := \
-D$(CVER) \
-DCVER=$(CVER) \
-DGLIBC=2 \
- -DCPPU_ENV=gcc3 \
+ -DCPPU_ENV=$(COMNAME) \
-D_MT \
-D_NATIVE_WCHAR_T_DEFINED \
-D_MSC_EXTENSIONS \
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index bd72205295a2..4a7ac377af2d 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -878,7 +878,7 @@ UNOIDLDEPFLAGS=-Mdepend=$(SOLARVER)
UNOIDLINC+=-I. -I.. -I$(PRJ) -I$(PRJ)/inc -I$(PRJ)/$(INPATH)/idl -I$(OUT)/inc -I$(SOLARIDLDIR) -I$(SOLARINCDIR)
-CDEFS= -D$(OS) -D$(GUI) -D$(GVER) -D$(COM) -D$(CVER) -D$(CPUNAME)
+CDEFS= -D$(OS) -D$(GUI) -D$(GVER) -D$(COM) -D$(CVER) -D$(CPUNAME) -DCPPU_ENV=$(COMNAME)
.IF "$(USE_STLP_DEBUG)" != "" && "$(GUI)"!="OS2"
CDEFS+=-D_STLP_DEBUG
@@ -1068,11 +1068,6 @@ SCPLINK=$(PERL) $(SOLARENV)/bin/par2script.pl
LZIP*=lzip
CPPLCC*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cpplcc
-.IF "$(DISABLE_ENHANCED_COMID)"==""
-.INCLUDE : tg_compv.mk
-.ELSE # "$(DISABLE_ENHANCED_COMID)"==""
-COMID=$(COM)
-.ENDIF # "$(DISABLE_ENHANCED_COMID)"==""
.IF "$(SOLAR_JAVA)"=="TRUE"
.IF "$(USE_JAVAVER)"!=""
.INCLUDE : tg_javav.mk
diff --git a/solenv/inc/tg_compv.mk b/solenv/inc/tg_compv.mk
deleted file mode 100644
index 4041201c961a..000000000000
--- a/solenv/inc/tg_compv.mk
+++ /dev/null
@@ -1,138 +0,0 @@
-#**************************************************************
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#**************************************************************
-
-
-
-COMPVERMK:=$(SOLARINCDIR)/comp_ver.mk
-
-.INCLUDE .IGNORE : $(COMPVERMK)
-
-.IF "$(COMNAME)"=="" || "$(COMPATH:s!\!/!)"!="$(COMPATH_STORED)"
-.IF "$(L10N_framework)"==""
-
-COMNAME:=
-
-.IF "$(COM)"=="GCC"
-CFLAGSVERSION=-dumpversion
-CFLAGSVERSION_CMD=-dumpversion
-CFLAGSNUMVERSION_CMD=-dumpversion $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
-#CFLAGSNUMVERSION_CMD=-dumpversion | 2>&1 $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
-.ELIF "$(COM)"=="CLANG"
-CFLAGSVERSION=--version
-CFLAGSVERSION_CMD=--version | head -n1 | sed -e"s/.*version //" -e"s/ .*//"
-.IF "$(OS)"="FREEBSD"
-CFLAGSNUMVERSION_CMD=${CFLAGSVERSION_CMD} | $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
-.ELSE
-CFLAGSNUMVERSION_CMD=${CFLAGSVERSION_CMD} | sed -e"s/\.//"
-.ENDIF
-.ELIF "$(COM)"=="MSC"
-CFLAGSVERSION=
-CFLAGSVERSION_CMD= $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk
-CFLAGSNUMVERSION_CMD= $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
-.ENDIF
-
-.IF "$(COM)"=="C55" || "$(COM)"=="C54" || "$(COM)"=="C52" || "$(COM)"=="C40" || "$(COM)"=="sunpro"
-CFLAGSVERSION= -V
-CFLAGSVERSION_CMD= -V $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk
-CFLAGSNUMVERSION_CMD= -V $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
-.ENDIF
-
-.IF "$(COM)"=="C730"
-CFLAGSVERSION= -version
-CFLAGSVERSION_CMD= -version |& cut -d" " -f4-
-CFLAGSNUMVERSION_CMD= -version |& cut -d" " -f4-
-.ENDIF
-
-# that's the version known by the specific
-# compiler
-CCVER:=$(shell @-$(CXX) $(CFLAGSVERSION_CMD))
-
-# and a computed integer for comparing
-# each point separated token blown up to 4 digits
-CCNUMVER:=$(shell @-$(CXX) $(CFLAGSNUMVERSION_CMD))
-
-.IF "$(COM)"=="MSC"
-.IF "$(CCNUMVER)">="001200000000"
-COMID=MSC
-COMNAME=msci
-.ENDIF
-.ENDIF
-
-.IF "$(COM)"=="GCC"
-
-.IF "$(CCNUMVER)">="000200910000"
-COMID=GCC
-COMNAME=gcc2
-.ENDIF
-
-.IF "$(CCNUMVER)">="000300000001"
-
-COMID=gcc3
-COMNAME=gcc3
-
-.ENDIF
-.ENDIF
-
-.IF "$(COM)"=="C55" || "$(COM)" == "C54" || "$(COM)"=="C52" || "$(COM)"=="C40" || "$(COM)"=="sunpro"
-.IF "$(CCNUMVER)">="00050002"
-COMID=C52
-COMNAME=sunpro5
-.ENDIF
-.ENDIF
-
-.IF "$(COM)"=="C730"
-COMID=C730
-COMNAME=MipsPro
-.ENDIF
-
-.IF "$(COM)"=="CLANG"
-.IF "$(OS)" == "FREEBSD" || "$(OS)" == "LINUX"
-COMID=gcc3
-COMNAME=gcc3
-.ELSE
-COMID=s5abi
-COMNAME=s5abi
-.ENDIF
-.ENDIF
-
-.IF "$(COMNAME)"==""
-
-# "EXCEPTIONSFILES" get compiled before this, but shouldn't
-# appear in the first n modules.
-
-compiler_version_error:
- @echo ++++++++++++++++++++++++++++++++++++
- @echo ERROR!
- @echo Could not detect compiler version!
- @echo Please extend tg_compv.mk in
- @echo "solenv/inc".
- @echo ++++++++++++++++++++++++++++++++++++
- @echo "$(CXX) $(CFLAGSVERSION)" returns
- @$(CXX) $(CFLAGSVERSION)
- @echo ++++++++++++++++++++++++++++++++++++
- force_dmake_to_error
-
-.ENDIF # "$(COMNAME)"==""
-
-CDEFS+=-DCPPU_ENV=$(COMNAME)
-
-.ENDIF # "$(L10N_framework)"==""
-.ENDIF # "$(COMNAME)"==""
More information about the Libreoffice-commits
mailing list