diff options
-rwxr-xr-x | configure | 153 | ||||
-rw-r--r-- | configure.in | 84 | ||||
-rw-r--r-- | scp2/source/ooo/common_brand.scp | 28 | ||||
-rw-r--r-- | scp2/source/ooo/file_library_ooo.scp | 109 | ||||
-rw-r--r-- | scp2/source/ooo/makefile.mk | 8 | ||||
-rw-r--r-- | scp2/source/ooo/module_hidden_ooo.scp | 3 | ||||
-rw-r--r-- | scp2/source/ooo/scpaction_ooo.scp | 12 | ||||
-rwxr-xr-x | scp2/source/ooo/ure.scp | 28 | ||||
-rw-r--r-- | set_soenv.in | 11 | ||||
-rw-r--r-- | solenv/inc/_tg_app.mk | 60 | ||||
-rw-r--r-- | solenv/inc/_tg_def.mk | 20 | ||||
-rw-r--r-- | solenv/inc/_tg_shl.mk | 190 | ||||
-rw-r--r-- | solenv/inc/extension_post.mk | 6 | ||||
-rw-r--r-- | solenv/inc/tg_app.mk | 6 | ||||
-rw-r--r-- | solenv/inc/tg_def.mk | 2 | ||||
-rw-r--r-- | solenv/inc/tg_shl.mk | 19 | ||||
-rw-r--r-- | solenv/inc/wntgcci6.mk | 33 |
17 files changed, 606 insertions, 166 deletions
diff --git a/configure b/configure index 575c6158a4e6..28516ec77d9c 100755 --- a/configure +++ b/configure @@ -892,6 +892,14 @@ HAVE_GCC_VISIBILITY_FEATURE USE_SYSTEM_STL STLPORT_VER STLPORT4 +EXCEPTIONS +MINGW_GXXDLL +MINGW_GCCDLL +MINGW_SHARED_GXXLIB +MINGW_GCCLIB_EH +MINGW_SHARED_GCCLIB +MINGW_CLIB_DIR +MINGW_BACKWARD_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH GXX_INCLUDE_PATH CRYPT_LINK @@ -10798,7 +10806,75 @@ $as_echo "no mingwin runtime includes" >&6; } { $as_echo "$as_me:$LINENO: result: $_mingw_lib_include_path" >&5 $as_echo "$_mingw_lib_include_path" >&6; } fi -MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" + MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" + + { $as_echo "$as_me:$LINENO: checking for mingwin c++ backward include path" >&5 +$as_echo_n "checking for mingwin c++ backward include path... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +#include <hash_set> +_ACEOF + _mingw_backward_include_path=`$CXX -E -xc++ -Wno-deprecated conftest.$ac_ext 2>&5| $SED -n -e '/.*1*"\(.*\)\/hash_set".*/s//\1/p' | sort -u | xargs echo` + rm conftest.$ac_ext + if test -n "$_mingw_backward_include_path"; then + _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` + _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` + { $as_echo "$as_me:$LINENO: result: $_mingw_backward_include_path" >&5 +$as_echo "$_mingw_backward_include_path" >&6; } + else + _mingw_backward_include_path="NO_BACKWARD_INCLUDE" + { $as_echo "$as_me:$LINENO: result: no mingwin c++ backward includes" >&5 +$as_echo "no mingwin c++ backward includes" >&6; } + fi + MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" + + mingw_crtbegin=`$CC -print-file-name=crtbegin.o` + MINGW_CLIB_DIR=`dirname $mingw_crtbegin` + { $as_echo "$as_me:$LINENO: checking whether to use dynamic libgcc" >&5 +$as_echo_n "checking whether to use dynamic libgcc... " >&6; } + if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then + { $as_echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 +$as_echo_n "checking dynamic libgcc name... " >&6; } + MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'` + MINGW_GCCDLL=`cd $COMPATH && ls $MINGW_GCCDLL_pattern 2>/dev/null` + if test -n "$MINGW_GCCDLL"; then + MINGW_SHARED_GCCLIB=YES + { $as_echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 +$as_echo "use $MINGW_GCCDLL" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then + MINGW_GCCLIB_EH=YES + fi + { $as_echo "$as_me:$LINENO: checking whether to use dynamic libstdc++" >&5 +$as_echo_n "checking whether to use dynamic libstdc++... " >&6; } + if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then + { $as_echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 +$as_echo_n "checking dynamic libstdc++ name... " >&6; } + MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` + MINGW_GXXDLL=`cd $COMPATH && ls $MINGW_GXXDLL_pattern 2>/dev/null` + if test -n "$MINGW_GXXDLL"; then + MINGW_SHARED_GXXLIB=YES + { $as_echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 +$as_echo "use $MINGW_GXXDLL" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` + + + + fi @@ -10859,6 +10935,81 @@ $as_echo "checked" >&6; } fi fi +{ $as_echo "$as_me:$LINENO: checking exception type" >&5 +$as_echo_n "checking exception type... " >&6; } +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test "$WITH_MINGWIN" = "yes"; then + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <iostream> + +extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); + + +int +main () +{ +_Unwind_SjLj_RaiseException() + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + exceptions_type="sjlj" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + exceptions_type="dwarf2" + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + +{ $as_echo "$as_me:$LINENO: result: $exceptions_type" >&5 +$as_echo "$exceptions_type" >&6; } +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +EXCEPTIONS="$exceptions_type" + + if test "$_os" = "SunOS"; then _temp=`showrev -p | $AWK -F" " '{ print $2 }'` if test "$_os_release" = "7"; then diff --git a/configure.in b/configure.in index 5cb5c0f61097..d447e30f2fcf 100644 --- a/configure.in +++ b/configure.in @@ -2179,8 +2179,65 @@ _ACEOF else AC_MSG_RESULT([$_mingw_lib_include_path]) fi -MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" -AC_SUBST(MINGW_LIB_INCLUDE_PATH) + MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" + AC_SUBST(MINGW_LIB_INCLUDE_PATH) +dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map + AC_MSG_CHECKING([for mingwin c++ backward include path]) + cat >conftest.$ac_ext <<_ACEOF +#include <hash_set> +_ACEOF + _mingw_backward_include_path=`$CXX -E -xc++ -Wno-deprecated conftest.$ac_ext 2>&5| $SED -n -e '/.*1*"\(.*\)\/hash_set".*/s//\1/p' | sort -u | xargs echo` + rm conftest.$ac_ext + if test -n "$_mingw_backward_include_path"; then + _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` + _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` + AC_MSG_RESULT([$_mingw_backward_include_path]) + else + _mingw_backward_include_path="NO_BACKWARD_INCLUDE" + AC_MSG_RESULT([no mingwin c++ backward includes]) + fi + MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" + AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH) + mingw_crtbegin=`$CC -print-file-name=crtbegin.o` + MINGW_CLIB_DIR=`dirname $mingw_crtbegin` + AC_MSG_CHECKING([whether to use dynamic libgcc]) + if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then + AC_MSG_CHECKING([dynamic libgcc name]) + MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'` + MINGW_GCCDLL=`cd $COMPATH && ls $MINGW_GCCDLL_pattern 2>/dev/null` + if test -n "$MINGW_GCCDLL"; then + MINGW_SHARED_GCCLIB=YES + AC_MSG_RESULT([use $MINGW_GCCDLL]) + else + AC_MSG_RESULT([no]) + fi + else + AC_MSG_RESULT([no]) + fi + if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then + MINGW_GCCLIB_EH=YES + fi + AC_MSG_CHECKING([whether to use dynamic libstdc++]) + if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then + AC_MSG_CHECKING([dynamic libstdc++ name]) + MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` + MINGW_GXXDLL=`cd $COMPATH && ls $MINGW_GXXDLL_pattern 2>/dev/null` + if test -n "$MINGW_GXXDLL"; then + MINGW_SHARED_GXXLIB=YES + AC_MSG_RESULT([use $MINGW_GXXDLL]) + else + AC_MSG_RESULT([no]) + fi + else + AC_MSG_RESULT([no]) + fi + MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` + AC_SUBST(MINGW_CLIB_DIR) + AC_SUBST(MINGW_SHARED_GCCLIB) + AC_SUBST(MINGW_GCCLIB_EH) + AC_SUBST(MINGW_SHARED_GXXLIB) + AC_SUBST(MINGW_GCCDLL) + AC_SUBST(MINGW_GXXDLL) fi dnl =================================================================== @@ -2245,6 +2302,29 @@ if test "$_os" = "OSF1"; then fi fi +dnl ************************************************************* +dnl Testing for exception handling - dwarf2 or sjlj exceptions... +dnl ************************************************************* +AC_MSG_CHECKING([exception type]) +AC_LANG_PUSH([C++]) +if test "$WITH_MINGWIN" = "yes"; then + AC_TRY_LINK( + [#include <iostream> + +extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); + + ], + [_Unwind_SjLj_RaiseException() ], + [exceptions_type="sjlj"], + [exceptions_type="dwarf2"] + ) +fi + +AC_MSG_RESULT($exceptions_type) +AC_LANG_POP([C++]) +EXCEPTIONS="$exceptions_type" +AC_SUBST(EXCEPTIONS) + dnl ************************************************************** dnl Testing for required Solaris and SunStudio compiler patches... dnl ************************************************************** diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index 60ba10716480..8a3b0b4443f1 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -91,6 +91,8 @@ Module gid_Module_Root_Brand gid_Brand_File_Html_Thirdpartylicensereadme, gid_Brand_File_Images_Brand_Zip, gid_Brand_File_Lib_Dbghelp, + gid_Brand_File_Lib_Mingw_GccS, + gid_Brand_File_Lib_Mingw_Stdcpp, gid_Brand_File_Lib_Mingwm10, gid_Brand_File_Lib_Msvcr80, gid_Brand_File_Lib_Msvcp80, @@ -710,6 +712,32 @@ End #endif #endif +#if defined(WNT) && defined( _gcc3 ) + +#if defined(MINGW_GCCDLL) + +File gid_Brand_File_Lib_Mingw_GccS + TXT_FILE_BODY; + Dir = gid_Brand_Dir_Program; + Name = MINGW_GCCDLL; + Styles = (PACKED); +End + +#endif + +#if defined(MINGW_GXXDLL) + +File gid_Brand_File_Lib_Mingw_Stdcpp + TXT_FILE_BODY; + Dir = gid_Brand_Dir_Program; + Name = MINGW_GXXDLL; + Styles = (PACKED); +End + +#endif + +#endif + #if defined(WNT) #if defined(M1400) #if defined(PROF_EDITION) diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 6c81b0f14928..ceb6c8b38e7b 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -1013,6 +1013,113 @@ STD_UNO_LIB_FILE(gid_File_Lib_T602Filter,t602filter) STD_UNO_LIB_FILE(gid_File_Lib_Writerfilter,writerfilter) +#ifdef WNT +#if defined(_gcc3) + +File gid_File_Lib_Mingwm10 + BIN_FILE_BODY; + Styles = (PACKED); + Dir = gid_Dir_Program; + Name = "mingwm10.dll"; +End + +#endif +#endif + +#if defined(WNT) +#if defined(M1400) +#if defined(PROF_EDITION) +File gid_File_Lib_Msvcr80 + BIN_FILE_BODY; + Styles = (PACKED); + Dir = gid_Dir_Program; +#ifndef _STLP_DEBUG + Name = "msvcr80.dll"; +#else + Name = "msvcr80d.dll"; +#endif +End +#endif +#endif +#endif + +#if defined(WNT) +#if defined(M1400) +#if defined(PROF_EDITION) +File gid_File_Lib_Msvcp80 + BIN_FILE_BODY; + Styles = (PACKED); + Dir = gid_Dir_Program; +#ifndef _STLP_DEBUG + Name = "msvcp80.dll"; +#else + Name = "msvcp80d.dll"; +#endif +End +#endif +#endif +#endif + +#if defined(WNT) +#if defined(M1400) +#if defined(PROF_EDITION) +File gid_File_Lib_Msvcm80 + BIN_FILE_BODY; + Styles = (PACKED); + Dir = gid_Dir_Program; +#ifndef _STLP_DEBUG + Name = "msvcm80.dll"; +#else + Name = "msvcm80d.dll"; +#endif +End +#endif +#endif +#endif + +#if defined(WNT) && defined( _gcc3 ) + +#if defined(MINGW_GCCDLL) + +File gid_File_Lib_Mingw_GccS + TXT_FILE_BODY; + Dir = gid_Dir_Program; + Name = MINGW_GCCDLL; + Styles = (PACKED, PATCH); +End + +#endif + +#if defined(MINGW_GXXDLL) + +File gid_File_Lib_Mingw_Stdcpp + TXT_FILE_BODY; + Dir = gid_Dir_Program; + Name = MINGW_GXXDLL; + Styles = (PACKED, PATCH); +End + +#endif + +#endif + +#if defined(WNT) +#if defined(M1400) +#if defined(PROF_EDITION) +File gid_File_Msvcm80crt_Manifest + BIN_FILE_BODY; + Styles = (PACKED); + Dir = gid_Dir_Program; +#ifndef _STLP_DEBUG + Name = "Microsoft.VC80.CRT.manifest"; +#else + Name = "Microsoft.VC80.DebugCRT.manifest"; +#endif +End +#endif +#endif +#endif + STD_UNO_LIB_FILE(gid_File_Lib_Mysql,mysql) File gid_File_Oo_Office_Dataaccess_Mysql_Xcu TXT_FILE_BODY; @@ -1726,7 +1833,7 @@ End STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Oooimprovecore , oooimprovecore) -#if defined WNT && !defined SYSTEM_MOZILLA && !defined WITHOUT_MOZILLA && \ +#if defined WNT && !defined _gcc3 && !defined SYSTEM_MOZILLA && !defined WITHOUT_MOZILLA && \ !(defined M1400 && defined PROF_EDITION && !defined _STLP_DEBUG) // see common_brand.scp gid_Brand_File_Lib_Msvcp80 and // gid_Brand_File_Lib_Msvcr80 diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk index 646196ec336a..0d85cc529b63 100644 --- a/scp2/source/ooo/makefile.mk +++ b/scp2/source/ooo/makefile.mk @@ -241,6 +241,14 @@ SCPDEFS+=-DENABLE_SVCTAGS SCPDEFS+=-DWITH_VC_REDIST .ENDIF +.IF "$(MINGW_GCCDLL)"!="" +SCPDEFS+=-DMINGW_GCCDLL=\""$(MINGW_GCCDLL)"\" +.ENDIF + +.IF "$(MINGW_GXXDLL)"!="" +SCPDEFS+=-DMINGW_GXXDLL=\""$(MINGW_GXXDLL)"\" +.ENDIF + SCP_PRODUCT_TYPE=osl ICUVERSION_DEPENDENT_FILES= \ diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp index 9f4506b80d8a..1d7e0f297148 100644 --- a/scp2/source/ooo/module_hidden_ooo.scp +++ b/scp2/source/ooo/module_hidden_ooo.scp @@ -401,6 +401,9 @@ Module gid_Module_Root_Files_5 gid_File_Lib_sn_tools, gid_File_Lib_relnotes, GID_FILE_LIB_WPD, + gid_File_Lib_Mingw_GccS, + gid_File_Lib_Mingw_Stdcpp, + gid_File_Lib_Mingwm10, gid_File_Lib_Msvcp70, gid_File_Lib_Msvcr70, gid_File_Lib_Ole, diff --git a/scp2/source/ooo/scpaction_ooo.scp b/scp2/source/ooo/scpaction_ooo.scp index 190fd50cf166..76ea41ed06bb 100644 --- a/scp2/source/ooo/scpaction_ooo.scp +++ b/scp2/source/ooo/scpaction_ooo.scp @@ -107,6 +107,18 @@ ScpAction SCP_COPY_MINGWM10 Copy = "mingwm10.dll"; Name = "mingwm10.dll"; End +#if defined(MINGW_GCCDLL) +ScpAction SCP_COPY_MINGW_GCCS + Copy = MINGW_GCCDLL; + Name = MINGW_GCCDLL; +End +#endif +#if defined(MINGW_GXXDLL) +ScpAction SCP_COPY_MINGW_STDCPP + Copy = MINGW_GXXDLL; + Name = MINGW_GXXDLL; +End +#endif #endif ScpAction scp_Copy_Xpd_Javaloader diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp index bc9629b6ee0b..61887e197530 100755 --- a/scp2/source/ooo/ure.scp +++ b/scp2/source/ooo/ure.scp @@ -910,6 +910,32 @@ File gid_File_Lib_Mingwm10_Ure End #endif +#if defined(WNT) && defined( _gcc3 ) + +#if defined(MINGW_GCCDLL) + +File gid_File_Lib_Mingw_GccS_Ure + TXT_FILE_BODY; + Dir = SCP2_URE_DL_DIR; + Name = MINGW_GCCDLL; + Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); +End + +#endif + +#if defined(MINGW_GXXDLL) + +File gid_File_Lib_Mingw_Stdcpp_Ure + TXT_FILE_BODY; + Dir = SCP2_URE_DL_DIR; + Name = MINGW_GXXDLL; + Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); +End + +#endif + +#endif + #ifdef WNT #if defined(M1310) File gid_File_Dl_Msvcr71 @@ -1146,6 +1172,8 @@ Module gid_Module_Root_Ure_Hidden gid_File_Dl_Stlport, gid_File_Dl_GccS, gid_File_Dl_Stdcpp, + gid_File_Lib_Mingw_GccS_Ure, + gid_File_Lib_Mingw_Stdcpp_Ure, gid_File_Lib_Mingwm10_Ure, gid_File_Dl_Msvcr71, gid_File_Dl_Msvcp71, diff --git a/set_soenv.in b/set_soenv.in index 22b0a5707f4d..39f4db5eb023 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1108,7 +1108,8 @@ if ($platform =~ m/cygwin|os2/) else { $ILIB .= $wps.$COMPATH.$LIB; } - $ILIB .= $wps.$PSDK_HOME.$LIB; + $ILIB .= $wps.PathFormat("@MINGW_CLIB_DIR@"). + $wps.$PSDK_HOME.$LIB; if ( '@ENABLE_DIRETX@' ) { $ILIB .= $wps.PathFormat("@DIRECTXSDK_LIB@"); } @@ -1485,6 +1486,7 @@ elsif ($platform =~ m/cygwin/) else { $SOLARINC .= $I.'$COMPATH'.$ds."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.$ds."include" && $mingw_lib_include_path ne "" ) @@ -1963,8 +1965,15 @@ 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_GCCDLL", "@MINGW_GCCDLL@", "e" ); + ToFile( "MINGW_GXXDLL", "@MINGW_GXXDLL@", "e" ); } ToFile( "GREP", $WIN_GREP, "e" ); ToFile( "FIND", $WIN_FIND, "e" ); diff --git a/solenv/inc/_tg_app.mk b/solenv/inc/_tg_app.mk index e07999541823..318bb1e19917 100644 --- a/solenv/inc/_tg_app.mk +++ b/solenv/inc/_tg_app.mk @@ -144,11 +144,13 @@ $(APP1TARGETN): $(APP1OBJS) $(APP1LIBS) \ @cat $(APP1LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP1RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP1RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP1BASEX) $(APP1STACKN) -o $@ $(APP1OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP1RESO) \ `$(TYPE) /dev/null $(APP1LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP1LIBSALCPPRT) $(APP1STDLIBS) $(APP1STDLIB) $(STDLIB1) > $(MISC)$/$(TARGET).$(@:b)_1.cmd + $(APP_LINKTYPE) $(APP1LIBSALCPPRT) \ + -Wl,--start-group $(APP1STDLIBS) -Wl,--end-group $(APP1STDLIB) \ + $(STDLIB1) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_1.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_1.cmd @+source $(MISC)$/$(TARGET).$(@:b)_1.cmd @ls -l $@ @@ -428,11 +430,13 @@ $(APP2TARGETN): $(APP2OBJS) $(APP2LIBS) \ @cat $(APP2LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP2RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP2RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP2BASEX) $(APP2STACKN) -o $@ $(APP2OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP2RESO) \ `$(TYPE) /dev/null $(APP2LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP2LIBSALCPPRT) $(APP2STDLIBS) $(APP2STDLIB) $(STDLIB2) > $(MISC)$/$(TARGET).$(@:b)_2.cmd + $(APP_LINKTYPE) $(APP2LIBSALCPPRT) \ + -Wl,--start-group $(APP2STDLIBS) -Wl,--end-group $(APP2STDLIB) \ + $(STDLIB2) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_2.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_2.cmd @+source $(MISC)$/$(TARGET).$(@:b)_2.cmd @ls -l $@ @@ -712,11 +716,13 @@ $(APP3TARGETN): $(APP3OBJS) $(APP3LIBS) \ @cat $(APP3LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP3RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP3RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP3BASEX) $(APP3STACKN) -o $@ $(APP3OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP3RESO) \ `$(TYPE) /dev/null $(APP3LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP3LIBSALCPPRT) $(APP3STDLIBS) $(APP3STDLIB) $(STDLIB3) > $(MISC)$/$(TARGET).$(@:b)_3.cmd + $(APP_LINKTYPE) $(APP3LIBSALCPPRT) \ + -Wl,--start-group $(APP3STDLIBS) -Wl,--end-group $(APP3STDLIB) \ + $(STDLIB3) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_3.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_3.cmd @+source $(MISC)$/$(TARGET).$(@:b)_3.cmd @ls -l $@ @@ -996,11 +1002,13 @@ $(APP4TARGETN): $(APP4OBJS) $(APP4LIBS) \ @cat $(APP4LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP4RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP4RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP4BASEX) $(APP4STACKN) -o $@ $(APP4OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP4RESO) \ `$(TYPE) /dev/null $(APP4LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP4LIBSALCPPRT) $(APP4STDLIBS) $(APP4STDLIB) $(STDLIB4) > $(MISC)$/$(TARGET).$(@:b)_4.cmd + $(APP_LINKTYPE) $(APP4LIBSALCPPRT) \ + -Wl,--start-group $(APP4STDLIBS) -Wl,--end-group $(APP4STDLIB) \ + $(STDLIB4) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_4.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_4.cmd @+source $(MISC)$/$(TARGET).$(@:b)_4.cmd @ls -l $@ @@ -1280,11 +1288,13 @@ $(APP5TARGETN): $(APP5OBJS) $(APP5LIBS) \ @cat $(APP5LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP5RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP5RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP5BASEX) $(APP5STACKN) -o $@ $(APP5OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP5RESO) \ `$(TYPE) /dev/null $(APP5LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP5LIBSALCPPRT) $(APP5STDLIBS) $(APP5STDLIB) $(STDLIB5) > $(MISC)$/$(TARGET).$(@:b)_5.cmd + $(APP_LINKTYPE) $(APP5LIBSALCPPRT) \ + -Wl,--start-group $(APP5STDLIBS) -Wl,--end-group $(APP5STDLIB) \ + $(STDLIB5) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_5.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_5.cmd @+source $(MISC)$/$(TARGET).$(@:b)_5.cmd @ls -l $@ @@ -1564,11 +1574,13 @@ $(APP6TARGETN): $(APP6OBJS) $(APP6LIBS) \ @cat $(APP6LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP6RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP6RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP6BASEX) $(APP6STACKN) -o $@ $(APP6OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP6RESO) \ `$(TYPE) /dev/null $(APP6LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP6LIBSALCPPRT) $(APP6STDLIBS) $(APP6STDLIB) $(STDLIB6) > $(MISC)$/$(TARGET).$(@:b)_6.cmd + $(APP_LINKTYPE) $(APP6LIBSALCPPRT) \ + -Wl,--start-group $(APP6STDLIBS) -Wl,--end-group $(APP6STDLIB) \ + $(STDLIB6) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_6.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_6.cmd @+source $(MISC)$/$(TARGET).$(@:b)_6.cmd @ls -l $@ @@ -1848,11 +1860,13 @@ $(APP7TARGETN): $(APP7OBJS) $(APP7LIBS) \ @cat $(APP7LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP7RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP7RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP7BASEX) $(APP7STACKN) -o $@ $(APP7OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP7RESO) \ `$(TYPE) /dev/null $(APP7LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP7LIBSALCPPRT) $(APP7STDLIBS) $(APP7STDLIB) $(STDLIB7) > $(MISC)$/$(TARGET).$(@:b)_7.cmd + $(APP_LINKTYPE) $(APP7LIBSALCPPRT) \ + -Wl,--start-group $(APP7STDLIBS) -Wl,--end-group $(APP7STDLIB) \ + $(STDLIB7) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_7.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_7.cmd @+source $(MISC)$/$(TARGET).$(@:b)_7.cmd @ls -l $@ @@ -2132,11 +2146,13 @@ $(APP8TARGETN): $(APP8OBJS) $(APP8LIBS) \ @cat $(APP8LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP8RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP8RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP8BASEX) $(APP8STACKN) -o $@ $(APP8OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP8RESO) \ `$(TYPE) /dev/null $(APP8LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP8LIBSALCPPRT) $(APP8STDLIBS) $(APP8STDLIB) $(STDLIB8) > $(MISC)$/$(TARGET).$(@:b)_8.cmd + $(APP_LINKTYPE) $(APP8LIBSALCPPRT) \ + -Wl,--start-group $(APP8STDLIBS) -Wl,--end-group $(APP8STDLIB) \ + $(STDLIB8) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_8.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_8.cmd @+source $(MISC)$/$(TARGET).$(@:b)_8.cmd @ls -l $@ @@ -2416,11 +2432,13 @@ $(APP9TARGETN): $(APP9OBJS) $(APP9LIBS) \ @cat $(APP9LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP9RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP9RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP9BASEX) $(APP9STACKN) -o $@ $(APP9OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP9RESO) \ `$(TYPE) /dev/null $(APP9LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP9LIBSALCPPRT) $(APP9STDLIBS) $(APP9STDLIB) $(STDLIB9) > $(MISC)$/$(TARGET).$(@:b)_9.cmd + $(APP_LINKTYPE) $(APP9LIBSALCPPRT) \ + -Wl,--start-group $(APP9STDLIBS) -Wl,--end-group $(APP9STDLIB) \ + $(STDLIB9) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_9.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_9.cmd @+source $(MISC)$/$(TARGET).$(@:b)_9.cmd @ls -l $@ @@ -2700,11 +2718,13 @@ $(APP10TARGETN): $(APP10OBJS) $(APP10LIBS) \ @cat $(APP10LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP10RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP10RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP10BASEX) $(APP10STACKN) -o $@ $(APP10OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP10RESO) \ `$(TYPE) /dev/null $(APP10LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP10LIBSALCPPRT) $(APP10STDLIBS) $(APP10STDLIB) $(STDLIB10) > $(MISC)$/$(TARGET).$(@:b)_10.cmd + $(APP_LINKTYPE) $(APP10LIBSALCPPRT) \ + -Wl,--start-group $(APP10STDLIBS) -Wl,--end-group $(APP10STDLIB) \ + $(STDLIB10) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_10.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_10.cmd @+source $(MISC)$/$(TARGET).$(@:b)_10.cmd @ls -l $@ diff --git a/solenv/inc/_tg_def.mk b/solenv/inc/_tg_def.mk index 1b293d4f252a..06d4174200ba 100644 --- a/solenv/inc/_tg_def.mk +++ b/solenv/inc/_tg_def.mk @@ -28,7 +28,7 @@ $(DEF1EXPORTFILE) : $(SHL1VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL1OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL1LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -311,7 +311,7 @@ $(DEF2EXPORTFILE) : $(SHL2VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL2OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL2LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -594,7 +594,7 @@ $(DEF3EXPORTFILE) : $(SHL3VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL3OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL3LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -877,7 +877,7 @@ $(DEF4EXPORTFILE) : $(SHL4VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL4OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL4LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -1160,7 +1160,7 @@ $(DEF5EXPORTFILE) : $(SHL5VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL5OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL5LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -1443,7 +1443,7 @@ $(DEF6EXPORTFILE) : $(SHL6VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL6OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL6LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -1726,7 +1726,7 @@ $(DEF7EXPORTFILE) : $(SHL7VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL7OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL7LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -2009,7 +2009,7 @@ $(DEF8EXPORTFILE) : $(SHL8VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL8OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL8LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -2292,7 +2292,7 @@ $(DEF9EXPORTFILE) : $(SHL9VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL9OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL9LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ @@ -2575,7 +2575,7 @@ $(DEF10EXPORTFILE) : $(SHL10VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL10OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL10LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ diff --git a/solenv/inc/_tg_shl.mk b/solenv/inc/_tg_shl.mk index 596ecf8eac17..213cdbcbe414 100644 --- a/solenv/inc/_tg_shl.mk +++ b/solenv/inc/_tg_shl.mk @@ -296,24 +296,21 @@ $(SHL1TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL1ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB1NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL1DEF) \ --dllname $(SHL1TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_1.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_1.cmd +.IF "$(DEFLIB1NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_1.cmd .ELSE # "$(DEFLIB1NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL1DEF) \ - --dllname $(SHL1TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL1OBJS) $(SHL1LINKRESO) \ - `$(TYPE) /dev/null $(SHL1LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_1.cmd + `$(TYPE) /dev/null $(SHL1LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_1.cmd .ENDIF # "$(DEFLIB1NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL1VERSIONOBJ) $(SHL1DESCRIPTIONOBJ) $(SHL1OBJS) $(SHL1LINKRESO) \ `$(TYPE) /dev/null $(SHL1LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL1STDLIBS) $(SHL1STDSHL) $(STDSHL1) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL1STDLIBS) -Wl,--end-group \ + $(SHL1STDSHL) $(STDSHL1) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_1.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_1.cmd @+source $(MISC)$/$(TARGET).$(@:b)_1.cmd @@ -844,24 +841,21 @@ $(SHL2TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL2ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB2NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL2DEF) \ --dllname $(SHL2TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_2.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_2.cmd +.IF "$(DEFLIB2NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_2.cmd .ELSE # "$(DEFLIB2NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL2DEF) \ - --dllname $(SHL2TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL2OBJS) $(SHL2LINKRESO) \ - `$(TYPE) /dev/null $(SHL2LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_2.cmd + `$(TYPE) /dev/null $(SHL2LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_2.cmd .ENDIF # "$(DEFLIB2NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL2VERSIONOBJ) $(SHL2DESCRIPTIONOBJ) $(SHL2OBJS) $(SHL2LINKRESO) \ `$(TYPE) /dev/null $(SHL2LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL2STDLIBS) $(SHL2STDSHL) $(STDSHL2) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL2STDLIBS) -Wl,--end-group \ + $(SHL2STDSHL) $(STDSHL2) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_2.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_2.cmd @+source $(MISC)$/$(TARGET).$(@:b)_2.cmd @@ -1392,24 +1386,21 @@ $(SHL3TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL3ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB3NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL3DEF) \ --dllname $(SHL3TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_3.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_3.cmd +.IF "$(DEFLIB3NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_3.cmd .ELSE # "$(DEFLIB3NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL3DEF) \ - --dllname $(SHL3TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL3OBJS) $(SHL3LINKRESO) \ - `$(TYPE) /dev/null $(SHL3LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_3.cmd + `$(TYPE) /dev/null $(SHL3LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_3.cmd .ENDIF # "$(DEFLIB3NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL3VERSIONOBJ) $(SHL3DESCRIPTIONOBJ) $(SHL3OBJS) $(SHL3LINKRESO) \ `$(TYPE) /dev/null $(SHL3LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL3STDLIBS) $(SHL3STDSHL) $(STDSHL3) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL3STDLIBS) -Wl,--end-group \ + $(SHL3STDSHL) $(STDSHL3) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_3.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_3.cmd @+source $(MISC)$/$(TARGET).$(@:b)_3.cmd @@ -1940,24 +1931,21 @@ $(SHL4TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL4ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB4NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL4DEF) \ --dllname $(SHL4TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_4.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_4.cmd +.IF "$(DEFLIB4NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_4.cmd .ELSE # "$(DEFLIB4NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL4DEF) \ - --dllname $(SHL4TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL4OBJS) $(SHL4LINKRESO) \ - `$(TYPE) /dev/null $(SHL4LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_4.cmd + `$(TYPE) /dev/null $(SHL4LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_4.cmd .ENDIF # "$(DEFLIB4NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL4VERSIONOBJ) $(SHL4DESCRIPTIONOBJ) $(SHL4OBJS) $(SHL4LINKRESO) \ `$(TYPE) /dev/null $(SHL4LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL4STDLIBS) $(SHL4STDSHL) $(STDSHL4) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL4STDLIBS) -Wl,--end-group \ + $(SHL4STDSHL) $(STDSHL4) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_4.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_4.cmd @+source $(MISC)$/$(TARGET).$(@:b)_4.cmd @@ -2488,24 +2476,21 @@ $(SHL5TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL5ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB5NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL5DEF) \ --dllname $(SHL5TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_5.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_5.cmd +.IF "$(DEFLIB5NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_5.cmd .ELSE # "$(DEFLIB5NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL5DEF) \ - --dllname $(SHL5TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL5OBJS) $(SHL5LINKRESO) \ - `$(TYPE) /dev/null $(SHL5LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_5.cmd + `$(TYPE) /dev/null $(SHL5LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_5.cmd .ENDIF # "$(DEFLIB5NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL5VERSIONOBJ) $(SHL5DESCRIPTIONOBJ) $(SHL5OBJS) $(SHL5LINKRESO) \ `$(TYPE) /dev/null $(SHL5LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL5STDLIBS) $(SHL5STDSHL) $(STDSHL5) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL5STDLIBS) -Wl,--end-group \ + $(SHL5STDSHL) $(STDSHL5) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_5.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_5.cmd @+source $(MISC)$/$(TARGET).$(@:b)_5.cmd @@ -3036,24 +3021,21 @@ $(SHL6TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL6ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB6NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL6DEF) \ --dllname $(SHL6TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_6.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_6.cmd +.IF "$(DEFLIB6NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_6.cmd .ELSE # "$(DEFLIB6NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL6DEF) \ - --dllname $(SHL6TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL6OBJS) $(SHL6LINKRESO) \ - `$(TYPE) /dev/null $(SHL6LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_6.cmd + `$(TYPE) /dev/null $(SHL6LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_6.cmd .ENDIF # "$(DEFLIB6NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL6VERSIONOBJ) $(SHL6DESCRIPTIONOBJ) $(SHL6OBJS) $(SHL6LINKRESO) \ `$(TYPE) /dev/null $(SHL6LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL6STDLIBS) $(SHL6STDSHL) $(STDSHL6) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL6STDLIBS) -Wl,--end-group \ + $(SHL6STDSHL) $(STDSHL6) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_6.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_6.cmd @+source $(MISC)$/$(TARGET).$(@:b)_6.cmd @@ -3584,24 +3566,21 @@ $(SHL7TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL7ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB7NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL7DEF) \ --dllname $(SHL7TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_7.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_7.cmd +.IF "$(DEFLIB7NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_7.cmd .ELSE # "$(DEFLIB7NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL7DEF) \ - --dllname $(SHL7TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL7OBJS) $(SHL7LINKRESO) \ - `$(TYPE) /dev/null $(SHL7LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_7.cmd + `$(TYPE) /dev/null $(SHL7LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_7.cmd .ENDIF # "$(DEFLIB7NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL7VERSIONOBJ) $(SHL7DESCRIPTIONOBJ) $(SHL7OBJS) $(SHL7LINKRESO) \ `$(TYPE) /dev/null $(SHL7LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL7STDLIBS) $(SHL7STDSHL) $(STDSHL7) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL7STDLIBS) -Wl,--end-group \ + $(SHL7STDSHL) $(STDSHL7) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_7.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_7.cmd @+source $(MISC)$/$(TARGET).$(@:b)_7.cmd @@ -4132,24 +4111,21 @@ $(SHL8TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL8ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB8NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL8DEF) \ --dllname $(SHL8TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_8.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_8.cmd +.IF "$(DEFLIB8NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_8.cmd .ELSE # "$(DEFLIB8NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL8DEF) \ - --dllname $(SHL8TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL8OBJS) $(SHL8LINKRESO) \ - `$(TYPE) /dev/null $(SHL8LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_8.cmd + `$(TYPE) /dev/null $(SHL8LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_8.cmd .ENDIF # "$(DEFLIB8NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL8VERSIONOBJ) $(SHL8DESCRIPTIONOBJ) $(SHL8OBJS) $(SHL8LINKRESO) \ `$(TYPE) /dev/null $(SHL8LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL8STDLIBS) $(SHL8STDSHL) $(STDSHL8) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL8STDLIBS) -Wl,--end-group \ + $(SHL8STDSHL) $(STDSHL8) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_8.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_8.cmd @+source $(MISC)$/$(TARGET).$(@:b)_8.cmd @@ -4680,24 +4656,21 @@ $(SHL9TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL9ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB9NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL9DEF) \ --dllname $(SHL9TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_9.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_9.cmd +.IF "$(DEFLIB9NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_9.cmd .ELSE # "$(DEFLIB9NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL9DEF) \ - --dllname $(SHL9TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL9OBJS) $(SHL9LINKRESO) \ - `$(TYPE) /dev/null $(SHL9LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_9.cmd + `$(TYPE) /dev/null $(SHL9LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_9.cmd .ENDIF # "$(DEFLIB9NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL9VERSIONOBJ) $(SHL9DESCRIPTIONOBJ) $(SHL9OBJS) $(SHL9LINKRESO) \ `$(TYPE) /dev/null $(SHL9LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL9STDLIBS) $(SHL9STDSHL) $(STDSHL9) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL9STDLIBS) -Wl,--end-group \ + $(SHL9STDSHL) $(STDSHL9) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_9.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_9.cmd @+source $(MISC)$/$(TARGET).$(@:b)_9.cmd @@ -5228,24 +5201,21 @@ $(SHL10TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL10ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB10NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL10DEF) \ --dllname $(SHL10TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_10.cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_10.cmd +.IF "$(DEFLIB10NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_10.cmd .ELSE # "$(DEFLIB10NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL10DEF) \ - --dllname $(SHL10TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL10OBJS) $(SHL10LINKRESO) \ - `$(TYPE) /dev/null $(SHL10LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_10.cmd + `$(TYPE) /dev/null $(SHL10LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_10.cmd .ENDIF # "$(DEFLIB10NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL10VERSIONOBJ) $(SHL10DESCRIPTIONOBJ) $(SHL10OBJS) $(SHL10LINKRESO) \ `$(TYPE) /dev/null $(SHL10LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL10STDLIBS) $(SHL10STDSHL) $(STDSHL10) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL10STDLIBS) -Wl,--end-group \ + $(SHL10STDSHL) $(STDSHL10) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_10.cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_10.cmd @+source $(MISC)$/$(TARGET).$(@:b)_10.cmd diff --git a/solenv/inc/extension_post.mk b/solenv/inc/extension_post.mk index 1888a6dddc71..dc4771420a7c 100644 --- a/solenv/inc/extension_post.mk +++ b/solenv/inc/extension_post.mk @@ -74,6 +74,12 @@ $(COMPONENT_LIBRARIES) : $(DLLDEST)$/$$(@:f) .IF "$(OS)$(CPU)"=="WNTI" .IF "$(COM)"=="GCC" $(GNUCOPY) $(SOLARBINDIR)$/mingwm10.dll $(EXTENSIONDIR) + .IF "$(MINGW_GCCDLL)"!="" + $(GNUCOPY) $(SOLARBINDIR)$/$(MINGW_GCCDLL) $(EXTENSIONDIR) + .ENDIF + .IF "$(MINGW_GXXDLL)"!="" + $(GNUCOPY) $(SOLARBINDIR)$/$(MINGW_GXXDLL) $(EXTENSIONDIR) + .ENDIF .ELSE .IF "$(PACKMS)"!="" .IF "$(CCNUMVER)" <= "001399999999" diff --git a/solenv/inc/tg_app.mk b/solenv/inc/tg_app.mk index d6846a0410d8..efffc86156c3 100644 --- a/solenv/inc/tg_app.mk +++ b/solenv/inc/tg_app.mk @@ -177,11 +177,13 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ @cat $(APP$(TNR)LINKRES) $(subst,$/res$/,$/res{$(subst,$(BIN), $(@:d))} $(APP$(TNR)RES)) > $(MISC)$/$(@:b)_all.res windres $(MISC)$/$(@:b)_all.res $(APP$(TNR)RESO) .ENDIF - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ $(APP$(TNR)BASEX) $(APP$(TNR)STACKN) -o $@ $(APP$(TNR)OBJS) \ -Wl,-Map,$(MISC)$/$(@:b).map $(STDOBJ) $(APP$(TNR)RESO) \ `$(TYPE) /dev/null $(APP$(TNR)LIBS) | sed s#$(ROUT)#$(OUT)#g` \ - $(APP_LINKTYPE) $(APP$(TNR)LIBSALCPPRT) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd + $(APP_LINKTYPE) $(APP$(TNR)LIBSALCPPRT) \ + -Wl,--start-group $(APP$(TNR)STDLIBS) -Wl,--end-group $(APP$(TNR)STDLIB) \ + $(STDLIB$(TNR)) $(MINGWSSTDENDOBJ) > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd @+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd @ls -l $@ diff --git a/solenv/inc/tg_def.mk b/solenv/inc/tg_def.mk index 602dfcbf3d22..ff26f53271b2 100644 --- a/solenv/inc/tg_def.mk +++ b/solenv/inc/tg_def.mk @@ -61,7 +61,7 @@ $(DEF$(TNR)EXPORTFILE) : $(SHL$(TNR)VERSIONMAP) # Extract RTTI symbols from all the objects that will be used to build a shared library nm -gP $(SHL$(TNR)OBJS) \ `$(TYPE) /dev/null $(foreach,j,$(SHL$(TNR)LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp @.symbols-regexp.tmp >> $@.exported-symbols + | $(SOLARENV)$/bin$/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols # overwrite the map file generate into the local output tree with the generated # exported symbols list $(RENAME) $@.exported-symbols $@ diff --git a/solenv/inc/tg_shl.mk b/solenv/inc/tg_shl.mk index 327e205c22f8..3940f4e1311e 100644 --- a/solenv/inc/tg_shl.mk +++ b/solenv/inc/tg_shl.mk @@ -329,24 +329,21 @@ $(SHL$(TNR)TARGETN) : \ .ENDIF # "$(USE_SHELL)"=="4nt" .ENDIF # "$(SHL$(TNR)ALLRES)"!="" .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def -.IF "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs @echo dlltool --input-def $(SHL$(TNR)DEF) \ --dllname $(SHL$(TNR)TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd + --kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd +.IF "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs + @echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd .ELSE # "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs - @echo dlltool --input-def $(SHL$(TNR)DEF) \ - --dllname $(SHL$(TNR)TARGET)$(DLLPOST) \ - --kill-at \ - --output-exp $(MISC)$/$(@:b)_exp.o \ + @echo --output-exp $(MISC)$/$(@:b)_exp.o \ $(STDOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) \ - `$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd + `$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd .ENDIF # "$(DEFLIB$(TNR)NAME)"!="" - @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \ + @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ $(STDOBJ) $(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)DESCRIPTIONOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) \ `$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \ - -Wl,--exclude-libs,ALL $(SHL$(TNR)STDLIBS) $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \ - $(MISC)$/$(@:b)_exp.o \ + -Wl,--exclude-libs,ALL,--start-group $(SHL$(TNR)STDLIBS) -Wl,--end-group \ + $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ -Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd @$(TYPE) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd @+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd diff --git a/solenv/inc/wntgcci6.mk b/solenv/inc/wntgcci6.mk index 28c16561d89f..9186ea9cc826 100644 --- a/solenv/inc/wntgcci6.mk +++ b/solenv/inc/wntgcci6.mk @@ -81,7 +81,10 @@ CFLAGSNOOPT=-O0 # Compiler flags for describing the output path CFLAGSOUTOBJ=-o #plattform hart setzen -CDEFS+=-DWIN32 -DWINVER=0x500 -D_WIN32_IE=0x500 -D_DLL -D_M_IX86 -DSTLPORT_VERSION=450 -D_NATIVE_WCHAR_T_DEFINED +CDEFS+=-DWIN32 -DWINVER=0x500 -D_WIN32_IE=0x500 -D_M_IX86 -DSTLPORT_VERSION=450 -D_NATIVE_WCHAR_T_DEFINED +.IF "$(DYNAMIC_CRT)"!="" +CDEFS+=-D_DLL +.ENDIF # -Wshadow does not work for C with nested uses of pthread_cleanup_push: CFLAGSWARNCC=-Wall -Wextra -Wendif-labels @@ -117,6 +120,8 @@ MINGWLIBDIR=$(COMPATH)$/lib$/mingw .ELSE MINGWLIBDIR=$(COMPATH)$/lib .ENDIF +MINGWSSTDOBJ=$(MINGW_CLIB_DIR)$/crtbegin.o +MINGWSSTDENDOBJ=$(MINGW_CLIB_DIR)$/crtend.o LINKFLAGSAPPGUI=-mwindows $(MINGWLIBDIR)$/crt2.o LINKFLAGSSHLGUI=--warn-once -mwindows -shared $(MINGWLIBDIR)$/dllcrt2.o LINKFLAGSAPPCUI=-mconsole $(MINGWLIBDIR)$/crt2.o @@ -126,19 +131,33 @@ LINKFLAGSPROF= LINKFLAGSDEBUG=-g LINKFLAGSOPT= +.IF "$(MINGW_SHARED_GXXLIB)"=="YES" && "$(DYNAMIC_CRT)"!="" +STDLIBCPP=-lstdc++_s +.ELSE STDLIBCPP=-lstdc++ +.ENDIF UWINAPILIB*=$(DYNAMIC) -luwinapi +.IF "$(MINGW_SHARED_GCCLIB)"=="YES" && "$(DYNAMIC_CRT)"!="" +MINGW_LIBGCC=-lgcc_s -lgcc +LINKFLAGS+=-shared-libgcc +.ELSE +.IF "$(MINGW_GCCLIB_EH)"=="YES" +MINGW_LIBGCC=-lgcc_eh -lgcc +.ELSE +MINGW_LIBGCC=-lgcc +.ENDIF +.ENDIF STDOBJVCL=$(L)$/salmain.obj STDOBJGUI= STDSLOGUI= STDOBJCUI= STDSLOCUI= -STDLIBGUIMT=-Wl,--start-group CPPRUNTIME -lgcc -STDLIBCUIMT=-Wl,--start-group CPPRUNTIME -lgcc -STDSHLGUIMT=-Wl,--start-group CPPRUNTIME -lgcc -STDSHLCUIMT=-Wl,--start-group CPPRUNTIME -lgcc -.IF "$(MINGW_NODLL)"=="" +STDLIBGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) +STDLIBCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) +STDSHLGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) +STDSHLCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) +.IF "$(DYNAMIC_CRT)"!="" STDLIBGUIMT+=-lmingwthrd STDLIBCUIMT+=-lmingwthrd STDSHLGUIMT+=-lmingwthrd @@ -150,7 +169,7 @@ STDSHLGUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -l STDSHLCUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt LIBSTLPORT=-lstlport_gcc -LIBSTLPORTST=-lstlport_gcc_static +LIBSTLPORTST=-lstlport_gcc_static $(STDLIBCPP) LIBMGR=ar LIBFLAGS=-rsu |