Kaydet (Commit) 6398cf9f authored tarafından Peter Foley's avatar Peter Foley Kaydeden (comit) Andras Timar

do not require cygwin gcc

Change-Id: I29de91f2eeb5c9317271aecf861f64a3c8eff73f
Reviewed-on: https://gerrit.libreoffice.org/2521Reviewed-by: 's avatarMichael Meeks <michael.meeks@suse.com>
Reviewed-by: 's avatarAndras Timar <atimar@suse.com>
Tested-by: 's avatarAndras Timar <atimar@suse.com>
üst 52db5038
...@@ -2158,20 +2158,6 @@ else ...@@ -2158,20 +2158,6 @@ else
SOLARVER=${BUILDDIR}/solver SOLARVER=${BUILDDIR}/solver
fi fi
dnl ===================================================================
dnl Extra check for Windows. Cygwin builds need gcc to build concat-deps
dnl although MSVC is used to build other build-time tools and
dnl LibreOffice itself.
dnl ===================================================================
if test "$build_os" = "cygwin"; then
AC_MSG_CHECKING([for Cygwin gcc/g++])
if which gcc > /dev/null && which g++ > /dev/null; then
AC_MSG_RESULT([found])
else
AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.])
fi
fi
# remenber SYSBASE value # remenber SYSBASE value
AC_SUBST(SYSBASE) AC_SUBST(SYSBASE)
...@@ -2242,32 +2228,34 @@ dnl =================================================================== ...@@ -2242,32 +2228,34 @@ dnl ===================================================================
dnl Checks for C compiler, dnl Checks for C compiler,
dnl The check for the C++ compiler is later on. dnl The check for the C++ compiler is later on.
dnl =================================================================== dnl ===================================================================
GCC_HOME_SET="true" if test "$_os" != "WINNT" -a "$WITH_MINGW" != "yes"; then
AC_MSG_CHECKING([gcc home]) GCC_HOME_SET="true"
if test -z "$with_gcc_home"; then AC_MSG_CHECKING([gcc home])
if test "$enable_icecream" = "yes"; then if test -z "$with_gcc_home"; then
if test -d "/usr/lib/icecc/bin"; then if test "$enable_icecream" = "yes"; then
GCC_HOME="/usr/lib/icecc/" if test -d "/usr/lib/icecc/bin"; then
else GCC_HOME="/usr/lib/icecc/"
GCC_HOME="/opt/icecream/" else
fi GCC_HOME="/opt/icecream/"
else fi
GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` else
GCC_HOME_SET="false" GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
fi GCC_HOME_SET="false"
else fi
GCC_HOME="$with_gcc_home" else
fi GCC_HOME="$with_gcc_home"
AC_MSG_RESULT($GCC_HOME) fi
AC_SUBST(GCC_HOME) AC_MSG_RESULT($GCC_HOME)
AC_SUBST(GCC_HOME)
if test "$GCC_HOME_SET" = "true"; then
if test -z "$CC"; then if test "$GCC_HOME_SET" = "true"; then
CC="$GCC_HOME/bin/gcc" if test -z "$CC"; then
fi CC="$GCC_HOME/bin/gcc"
if test -z "$CXX"; then fi
CXX="$GCC_HOME/bin/g++" if test -z "$CXX"; then
fi CXX="$GCC_HOME/bin/g++"
fi
fi
fi fi
dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
......
...@@ -8,11 +8,9 @@ ...@@ -8,11 +8,9 @@
# #
$(eval $(call gb_ExternalPackage_ExternalPackage,langtag,langtag)) $(eval $(call gb_ExternalPackage_ExternalPackage,langtag,langtag))
$(eval $(call gb_ExternalPackage_use_external_project,langtag,langtag)) $(eval $(call gb_ExternalPackage_use_external_project,langtag,langtag))
ifeq ($(OS)$(COM),WNTMSC)
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/langtag.lib,liblangtag/.libs/langtag.lib))
else
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag.a,liblangtag/.libs/liblangtag.a)) $(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag.a,liblangtag/.libs/liblangtag.a))
endif
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
...@@ -18,16 +18,10 @@ $(eval $(call gb_ExternalProject_register_targets,langtag,\ ...@@ -18,16 +18,10 @@ $(eval $(call gb_ExternalProject_register_targets,langtag,\
$(call gb_ExternalProject_get_state_target,langtag,build): $(call gb_ExternalProject_get_state_target,langtag,build):
$(call gb_ExternalProject_run,build,\ $(call gb_ExternalProject_run,build,\
$(if $(filter MSC,$(COM)), \
export LIB="$(ILIB)" \
CC="$(CC) -MD -nologo \
$(if $(filter TRUE,$(ENABLE_DEBUG)),-Zi) \
$(SOLARINC)" && ) \
./configure --disable-modules --disable-test --disable-introspection --disable-shared --enable-static --with-pic \ ./configure --disable-modules --disable-test --disable-introspection --disable-shared --enable-static --with-pic \
$(if $(filter TRUE,$(HAVE_GCC_BUILTIN_ATOMIC)),"lt_cv_has_atomic=yes","lt_cv_has_atomic=no") \ $(if $(filter TRUE,$(HAVE_GCC_BUILTIN_ATOMIC)),"lt_cv_has_atomic=yes","lt_cv_has_atomic=no") \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter NO,$(SYSTEM_LIBXML)),LIBXML2_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,xml2)/include" \ $(if $(filter NO,$(SYSTEM_LIBXML)),LIBXML2_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,xml2)/include",\
$(if $(filter MSC,$(COM)),LIBXML2_LIBS="$(OUTDIR)/lib/libxml2.lib",LIBXML2_LIBS="-L$(OUTDIR)/lib -lxml2"),\
$(if $(filter MACOSX,$(OS)),LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" LIBXML2_LIBS="$(LIBXML_LIBS)")) \ $(if $(filter MACOSX,$(OS)),LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" LIBXML2_LIBS="$(LIBXML_LIBS)")) \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
$(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath,\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib) \ $(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath,\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib) \
......
...@@ -11,13 +11,23 @@ $(eval $(call gb_Module_Module,liblangtag)) ...@@ -11,13 +11,23 @@ $(eval $(call gb_Module_Module,liblangtag))
ifeq ($(ENABLE_LIBLANGTAG),YES) ifeq ($(ENABLE_LIBLANGTAG),YES)
ifeq ($(SYSTEM_LIBLANGTAG),NO) ifeq ($(SYSTEM_LIBLANGTAG),NO)
$(eval $(call gb_Module_add_targets,liblangtag,\ $(eval $(call gb_Module_add_targets,liblangtag,\
UnpackedTarball_langtag \ UnpackedTarball_langtag \
ExternalPackage_langtag \
ExternalPackage_langtag_data \ ExternalPackage_langtag_data \
ExternalProject_langtag \
Zip_liblangtag_data \ Zip_liblangtag_data \
)) ))
ifeq ($(COM),MSC)
$(eval $(call gb_Module_add_targets,liblangtag,\
StaticLibrary_langtag \
))
else
$(eval $(call gb_Module_add_targets,liblangtag,\
ExternalPackage_langtag \
ExternalProject_langtag \
))
endif
endif endif
endif endif
......
From [http://tagoh.bitbucket.org/liblangtag/]. An interface for BCP47 language tags. From [http://tagoh.bitbucket.org/liblangtag/]. An interface for BCP47 language tags.
Note that (as far a I recall) liblangtag is the only "bundled"
(3rd-party) library we have that we configure and build also for MSVC
using an autotools+libtool based mechanism. That is rather fragile and
works maybe mostly by accident. So be careful not to break it.
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_StaticLibrary_StaticLibrary,langtag))
$(eval $(call gb_StaticLibrary_set_warnings_not_errors,langtag))
$(eval $(call gb_StaticLibrary_use_unpacked,langtag,langtag))
$(eval $(call gb_StaticLibrary_use_external,langtag,libxml2))
$(eval $(call gb_StaticLibrary_set_include,langtag,\
$$(INCLUDE) \
-I$(call gb_UnpackedTarball_get_dir,langtag) \
-I$(call gb_UnpackedTarball_get_dir,langtag)/liblangtag \
))
# Hardcoded for MSVC
$(eval $(call gb_StaticLibrary_add_defs,langtag,\
-D__LANGTAG_COMPILATION \
-DREGDATADIR \
-DLT_HAVE___INLINE \
-DLT_CAN_INLINE \
-DALIGNOF_VOID_P=4 \
))
$(eval $(call gb_StaticLibrary_add_generated_cobjects,langtag,\
UnpackedTarball/langtag/liblangtag/lt-database \
UnpackedTarball/langtag/liblangtag/lt-error \
UnpackedTarball/langtag/liblangtag/lt-ext-module \
UnpackedTarball/langtag/liblangtag/lt-ext-module-data \
UnpackedTarball/langtag/liblangtag/lt-extension \
UnpackedTarball/langtag/liblangtag/lt-extlang \
UnpackedTarball/langtag/liblangtag/lt-extlang-db \
UnpackedTarball/langtag/liblangtag/lt-grandfathered \
UnpackedTarball/langtag/liblangtag/lt-grandfathered-db \
UnpackedTarball/langtag/liblangtag/lt-lang \
UnpackedTarball/langtag/liblangtag/lt-lang-db \
UnpackedTarball/langtag/liblangtag/lt-list \
UnpackedTarball/langtag/liblangtag/lt-mem \
UnpackedTarball/langtag/liblangtag/lt-messages \
UnpackedTarball/langtag/liblangtag/lt-redundant \
UnpackedTarball/langtag/liblangtag/lt-redundant-db \
UnpackedTarball/langtag/liblangtag/lt-region \
UnpackedTarball/langtag/liblangtag/lt-region-db \
UnpackedTarball/langtag/liblangtag/lt-script \
UnpackedTarball/langtag/liblangtag/lt-script-db \
UnpackedTarball/langtag/liblangtag/lt-string \
UnpackedTarball/langtag/liblangtag/lt-tag \
UnpackedTarball/langtag/liblangtag/lt-trie \
UnpackedTarball/langtag/liblangtag/lt-utils \
UnpackedTarball/langtag/liblangtag/lt-variant \
UnpackedTarball/langtag/liblangtag/lt-variant-db \
UnpackedTarball/langtag/liblangtag/lt-xml \
))
$(eval $(call gb_StaticLibrary_add_generated_cobjects,langtag,\
UnpackedTarball/langtag/extensions/lt-ext-ldml-t \
, -DLT_MODULE_PREFIX=lt_module_ext_t \
))
$(eval $(call gb_StaticLibrary_add_generated_cobjects,langtag,\
UnpackedTarball/langtag/extensions/lt-ext-ldml-u \
, -DLT_MODULE_PREFIX=lt_module_ext_u \
))
# vim: set noet sw=4 ts=4:
...@@ -9,16 +9,15 @@ ...@@ -9,16 +9,15 @@
$(eval $(call gb_CustomTarget_CustomTarget,solenv/concat-deps)) $(eval $(call gb_CustomTarget_CustomTarget,solenv/concat-deps))
$(call gb_CustomTarget_get_target,solenv/concat-deps) : \ $(eval $(call gb_CustomTarget_register_targets,solenv/concat-deps,\
$(call gb_CustomTarget_get_workdir,solenv/concat-deps)/concat-deps concat-deps$(gb_Executable_EXT_for_build) \
))
$(call gb_CustomTarget_get_workdir,solenv/concat-deps)/concat-deps : \ $(call gb_CustomTarget_get_workdir,solenv/concat-deps)/concat-deps$(gb_Executable_EXT_for_build) : \
$(SRCDIR)/solenv/bin/concat-deps.c \ $(SRCDIR)/solenv/bin/concat-deps.c
| $(call gb_CustomTarget_get_workdir,solenv/concat-deps)/.dir $(call gb_Output_announce,solenv/concat-deps,$(true),C,1)
$(call gb_Output_announce,solenv/concat-deps,$(true),GCC,1)
ifeq ($(COM_FOR_BUILD),MSC) ifeq ($(COM_FOR_BUILD),MSC)
# on cygwin force the use of gcc LIB="$(ILIB)" $(CC_FOR_BUILD) -nologo $(SOLARINC) -O2 $< -Fo$(dir $@) -Fe$(dir $@)
gcc -O2 $< -o $@
else else
$(CC_FOR_BUILD) -O2 $< -o $@ $(CC_FOR_BUILD) -O2 $< -o $@
endif endif
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
$(eval $(call gb_Package_Package,solenv_concat-deps,$(call gb_CustomTarget_get_workdir,solenv/concat-deps))) $(eval $(call gb_Package_Package,solenv_concat-deps,$(call gb_CustomTarget_get_workdir,solenv/concat-deps)))
$(eval $(call gb_Package_add_file,solenv_concat-deps,bin/concat-deps,concat-deps)) $(eval $(call gb_Package_add_file,solenv_concat-deps,bin/concat-deps$(gb_Executable_EXT_for_build),concat-deps$(gb_Executable_EXT_for_build)))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
#define USE_MEMORY_ALIGNMENT 4 #define USE_MEMORY_ALIGNMENT 4
#endif /* Def _AIX */ #endif /* Def _AIX */
#ifdef __CYGWIN__ #ifdef _MSC_VER
#define __windows #define __windows
#define CORE_BIG_ENDIAN 0 #define CORE_BIG_ENDIAN 0
#define CORE_LITTLE_ENDIAN 1 #define CORE_LITTLE_ENDIAN 1
#define USE_MEMORY_ALIGNMENT 64 /* big value -> no alignment */ #define USE_MEMORY_ALIGNMENT 64 /* big value -> no alignment */
#endif /* Def __CYGWIN__ */ #endif /* Def _MSC_VER */
#if defined(__linux) || defined(__OpenBSD__) || \ #if defined(__linux) || defined(__OpenBSD__) || \
defined(__FreeBSD__) || defined(__NetBSD__) || \ defined(__FreeBSD__) || defined(__NetBSD__) || \
...@@ -97,7 +97,10 @@ ...@@ -97,7 +97,10 @@
#ifdef __windows #ifdef __windows
#define FILE_O_RDONLY _O_RDONLY #define FILE_O_RDONLY _O_RDONLY
#define FILE_O_BINARY _O_BINARY #define FILE_O_BINARY _O_BINARY
#define PATHNCMP strncasecmp /* MSVC converts paths to lower-case sometimes? */ #define PATHNCMP _strnicmp /* MSVC converts paths to lower-case sometimes? */
#define inline __inline
#define ssize_t long
#define S_ISREG(mode) (((mode) & _S_IFMT) == (_S_IFREG)) /* MSVC does not have this macro */
#else /* not windaube */ #else /* not windaube */
#define FILE_O_RDONLY O_RDONLY #define FILE_O_RDONLY O_RDONLY
#define FILE_O_BINARY 0 #define FILE_O_BINARY 0
...@@ -775,10 +778,17 @@ static void emit_unpacked_target(char const*const token, char const*const end) ...@@ -775,10 +778,17 @@ static void emit_unpacked_target(char const*const token, char const*const end)
{ {
/* is there some obvious way to printf N characters that i'm missing? */ /* is there some obvious way to printf N characters that i'm missing? */
size_t size = end - token + 1; size_t size = end - token + 1;
char tmp[size]; char* tmp=(char *)malloc(size*sizeof(char));
#ifdef _MSC_VER
// MSVC _snprintf doesn't null terminate strings
_snprintf(tmp, size, "%s", token);
tmp[size-1]='\0';
#else
snprintf(tmp, size, "%s", token); snprintf(tmp, size, "%s", token);
#endif
fputs(tmp, stdout); fputs(tmp, stdout);
fputs(".done ", stdout); fputs(".done ", stdout);
free(tmp);
} }
/* prefix paths to absolute */ /* prefix paths to absolute */
...@@ -787,6 +797,7 @@ static inline void print_fullpaths(char* line) ...@@ -787,6 +797,7 @@ static inline void print_fullpaths(char* line)
char* token; char* token;
char* end; char* end;
int boost_count = 0; int boost_count = 0;
int token_len;
const char * unpacked_end = 0; /* end of UnpackedTarget match (if any) */ const char * unpacked_end = 0; /* end of UnpackedTarget match (if any) */
/* for UnpackedTarget the target is GenC{,xx}Object, dont mangle! */ /* for UnpackedTarget the target is GenC{,xx}Object, dont mangle! */
int target_seen = 0; int target_seen = 0;
...@@ -805,7 +816,7 @@ static inline void print_fullpaths(char* line) ...@@ -805,7 +816,7 @@ static inline void print_fullpaths(char* line)
while (*end && (' ' != *end) && ('\t' != *end) && (':' != *end)) { while (*end && (' ' != *end) && ('\t' != *end) && (':' != *end)) {
++end; ++end;
} }
int token_len = end - token; token_len = end - token;
if (target_seen && if (target_seen &&
elide_dependency(token, token_len, &unpacked_end)) elide_dependency(token, token_len, &unpacked_end))
{ {
...@@ -855,8 +866,9 @@ static inline void print_fullpaths(char* line) ...@@ -855,8 +866,9 @@ static inline void print_fullpaths(char* line)
static inline char * eat_space_at_end(char * end) static inline char * eat_space_at_end(char * end)
{ {
char * real_end;
assert('\0' == *end); assert('\0' == *end);
char * real_end = end - 1; real_end = end - 1;
while (' ' == *real_end || '\t' == *real_end || '\n' == *real_end while (' ' == *real_end || '\t' == *real_end || '\n' == *real_end
|| ':' == *real_end) || ':' == *real_end)
{ /* eat colon and whitespace at end */ { /* eat colon and whitespace at end */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment