[ooo-build-commit] Branch 'ooo/master' - 12 commits - configure configure.in instsetoo_native/res instsetoo_native/util scp2/source set_soenv.in solenv/bin solenv/config solenv/inc soltools/cpp

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Aug 27 17:09:14 PDT 2009


 configure                                     |  206 +++++++++++++----
 configure.in                                  |  169 +++++++++++---
 instsetoo_native/res/DS_Store_Langpack        |binary
 instsetoo_native/util/makefile.mk             |    6 
 instsetoo_native/util/pack.lst                |    4 
 scp2/source/ooo/common_brand.scp              |   28 ++
 scp2/source/ooo/directory_ooo_macosx.scp      |    2 
 scp2/source/ooo/file_library_ooo.scp          |  110 +++++++++
 scp2/source/ooo/makefile.mk                   |    8 
 scp2/source/ooo/module_hidden_ooo.scp         |    3 
 scp2/source/ooo/scpaction_ooo.scp             |   16 +
 scp2/source/ooo/ure.scp                       |   38 +++
 set_soenv.in                                  |   16 +
 solenv/bin/cws.pl                             |  140 ++++++++----
 solenv/bin/macosx-change-install-names.pl     |    8 
 solenv/bin/make_installer.pl                  |   14 -
 solenv/bin/modules/Cws.pm                     |   53 ++++
 solenv/bin/modules/installer/globals.pm       |    2 
 solenv/bin/modules/installer/parameter.pm     |   11 
 solenv/bin/modules/installer/scriptitems.pm   |   60 +++++
 solenv/bin/modules/installer/simplepackage.pm |  301 +++++++++++++++++++++++++-
 solenv/bin/modules/macosxotoolhelper.pm       |    2 
 solenv/config/sdev300.ini                     |    4 
 solenv/config/ssolar.cmn                      |    1 
 solenv/inc/_tg_app.mk                         |   60 +++--
 solenv/inc/_tg_def.mk                         |   20 -
 solenv/inc/_tg_shl.mk                         |  190 ++++++----------
 solenv/inc/extension_post.mk                  |    6 
 solenv/inc/libs.mk                            |    6 
 solenv/inc/minor.mk                           |    6 
 solenv/inc/tg_app.mk                          |    6 
 solenv/inc/tg_def.mk                          |    2 
 solenv/inc/tg_ext.mk                          |    8 
 solenv/inc/tg_shl.mk                          |   19 -
 solenv/inc/unitools.mk                        |    7 
 solenv/inc/unxsoli4.mk                        |    2 
 solenv/inc/wntgcci6.mk                        |   33 ++
 soltools/cpp/_tokens.c                        |   10 
 soltools/cpp/cpp.h                            |    2 
 39 files changed, 1236 insertions(+), 343 deletions(-)

New commits:
commit 50ecbb230579abc37aba785ee842f76277ec806b
Author: Release Engineers <releng at openoffice.org>
Date:   Thu Aug 27 17:55:43 2009 +0000

    DEV300

diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index 3565d94..8ba46f8 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
 RSCVERSION=300
-RSCREVISION=300m56(Build:9419)
-BUILD=9419
-LAST_MINOR=m56
+RSCREVISION=300m57(Build:9422)
+BUILD=9422
+LAST_MINOR=m57
 SOURCEVERSION=DEV300
commit 1ba80306f610a5cbb862d1c7f1691d381a679877
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Thu Aug 27 15:58:22 2009 +0000

    CWS-TOOLING: integrate CWS sb114_DEV300
    2009-08-12 09:02:01 +0200 sb  r274880 : #i104149# missing PATCH flag
    2009-08-11 16:39:16 +0200 sb  r274864 : #i104149# merged in difference between <http://ftp.debian.org/debian/pool/main/libx/libxml2/libxml2_2.6.32.dfsg-5.diff.gz> and <http://security.debian.org/pool/updates/main/libx/libxml2/libxml2_2.6.32.dfsg-5+lenny1.diff.gz> (which appears to also apply cleanly to the libxml2 2.6.31 source base checked into OOo)

diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 6313fdd..1c260e2 100755
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -839,7 +839,7 @@ File gid_File_Dl_Libxml2
 #else
     Name = SCP2_URE_DL_VER("xml2", "2");
 #endif
-    Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
+    Styles = (PACKED, PATCH, VERSION_INDEPENDENT_COMP_ID);
     // CompID = "BE6FAD97-F84C-43E3-8392-6FE2CDA04D8E";
 End
 #endif
commit a942f7d1df6afc31e32bf315e61d5b3d9fa49f49
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Thu Aug 27 15:29:51 2009 +0000

    CWS-TOOLING: integrate CWS swapfix01_DEV300
    2009-08-17 16:40:04 +0200 cl  r275061 : #i104146# added patch flag for svx library
    2009-08-17 15:48:01 +0200 cl  r275059 : #i104146# force swap in of graphic to avoid getting the unique id from the preview graphic

diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index ceb6c8b..4508d30 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1485,7 +1485,6 @@ SPECIAL_UNO_COMPONENT_LIB_FILE( gid_File_Lib_Svtmisc, svtmisc.uno )
 STD_LIB_FILE_PATCH( gid_File_Lib_Svx_Core, svxcore)
 STD_LIB_FILE_PATCH( gid_File_Lib_Svx_Msfilter, svxmsfilter)
 STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Svx, svx)
-
 STD_UNO_LIB_FILE( gid_File_Lib_TextConversionDlgs, textconversiondlgs)
 
 STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sw , sw)
commit ddd76612f2ab4aa60a61f12296cdca3ede86c62a
Author: Release Engineers <releng at openoffice.org>
Date:   Thu Aug 27 14:47:51 2009 +0000

    CWS-TOOLING: integrate CWS hr65
    2009-08-26 Jens-Heiner Rechtien #i104521#: implement 'setcurrent'; document --hg option to 'create'
    2009-08-26 Jens-Heiner Rechtien #i104521#: SOAP method setSCMName() doesn't return a value
    2009-08-26 Jens-Heiner Rechtien #i104521#: implement [set|get]_scm()
    2009-08-26 Jens-Heiner Rechtien #i104521#: implement --hg switch to 'cws create'

diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl
index 611f9e9..be901f4 100644
--- a/solenv/bin/cws.pl
+++ b/solenv/bin/cws.pl
@@ -69,22 +69,24 @@ my @valid_commands = (
                         'task', 't',
                         'integrate',
                         'cdiff', 'cd',
-                        'eisclone'
+                        'eisclone',
+                        'setcurrent'
                      );
 
 # list the valid options to each command
 my %valid_options_hash = ( 
-                            'help'      => ['help'],
-                            'create'    => ['help', 'milestone', 'migration'],
-                            'fetch'     => ['help', 'switch', 'milestone', 'childworkspace','platforms','quiet',
+                            'help'       => ['help'],
+                            'create'     => ['help', 'milestone', 'migration', 'hg'],
+                            'fetch'      => ['help', 'switch', 'milestone', 'childworkspace','platforms','quiet',
                                             'onlysolver'],
-                            'rebase'    => ['help', 'milestone','commit'],
-                            'analyze'   => ['help'],
-                            'query'     => ['help', 'milestone','masterworkspace','childworkspace'],
-                            'task'      => ['help'],
-                            'integrate' => ['help', 'childworkspace'],
-                            'cdiff'     => ['help', 'childworkspace', 'masterworkspace', 'files', 'modules'],
-                            'eisclone'  => ['help']
+                            'rebase'     => ['help', 'milestone','commit'],
+                            'analyze'    => ['help'],
+                            'query'      => ['help', 'milestone','masterworkspace','childworkspace'],
+                            'task'       => ['help'],
+                            'integrate'  => ['help', 'childworkspace'],
+                            'cdiff'      => ['help', 'childworkspace', 'masterworkspace', 'files', 'modules'],
+                            'setcurrent' => ['help', 'milestone'],
+                            'eisclone'   => ['help']
                          );
 
 my %valid_commands_hash;
@@ -115,6 +117,7 @@ sub parse_command_line
     Getopt::Long::Configure ("no_auto_abbrev", "no_ignorecase");
     my $success = GetOptions(\%options_hash, 'milestone|m=s', 
                                              'masterworkspace|master|M=s', 
+                                             'hg',
                                              'migration',
                                              'childworkspace|child|c=s',
                                              'debug',
@@ -365,6 +368,7 @@ sub get_cws_by_name
 sub register_child_workspace
 {
     my $cws          = shift;
+    my $scm          = shift;
     my $is_promotion = shift;
 
     my $milestone = $cws->milestone();
@@ -387,9 +391,9 @@ sub register_child_workspace
     }
 
     if ( $is_promotion ) {
-        my $rc = $cws->set_subversion_flag(1);
+        my $rc = $cws->set_scm($scm);
         if ( !$rc ) {
-            print_error("Failed to set subversion flag on child workspace '$child'.\nContact EIS administrator!\n", 12);
+            print_error("Failed to set the SCM property '$scm' on child workspace '$child'.\nContact EIS administrator!\n", 12);
         }
 
         $rc = $cws->promote($vcsid, "");
@@ -410,9 +414,9 @@ sub register_child_workspace
             print_error("Failed to register child workspace '$child' for master '$master'.", 12);
         }
         else {
-            my $rc = $cws->set_subversion_flag(1);
+            my $rc = $cws->set_scm($scm);
             if ( !$rc ) {
-                print_error("Failed to set subversion flag on child workspace '$child'.\nContact EIS administrator!\n", 12);
+                print_error("Failed to set the SCM property '$scm' on child workspace '$child'.\nContact EIS administrator!\n", 12);
             }
             print "\n***** Successfully ***** registered child workspace '$child'\n";
             print "for master workspace '$master' (milestone '$milestone').\n";
@@ -435,7 +439,7 @@ sub query_cws
         print_error("Can't determine master workspace environment.\n", 30);
     }
     
-    if ( ($query_mode eq 'integratedinto' || $query_mode eq 'incompatible' || $query_mode eq 'taskids' || $query_mode eq 'state' || $query_mode eq 'current' || $query_mode eq 'owner' || $query_mode eq 'qarep' || $query_mode eq 'issubversion' || $query_mode eq 'ispublic' || $query_mode eq 'build') && !defined($childws) ) {
+    if ( ($query_mode eq 'integratedinto' || $query_mode eq 'incompatible' || $query_mode eq 'taskids' || $query_mode eq 'status' || $query_mode eq 'current' || $query_mode eq 'owner' || $query_mode eq 'qarep' || $query_mode eq 'issubversion' || $query_mode eq 'ispublic' || $query_mode eq 'build') && !defined($childws) ) {
         print_error("Can't determine child workspace environment.\n", 30);
     }
 
@@ -512,31 +516,21 @@ sub query_status
     return;
 }
 
-sub query_vcs
+sub query_scm
 {
     my $cws = shift;
     my $masterws = $cws->master();
     my $childws  = $cws->child();
 
     if ( is_valid_cws($cws) ) {
-        my $issvn = $cws->get_subversion_flag();
-        if ( !defined($issvn) ) {
-            print_error("Internal error: can't get isSubVersion flag.", 3);
+        my $scm = $cws->get_scm();
+        if ( !defined($scm) ) {
+            print_error("Internal error: can't retrieve scm info.", 3);
         } else {
-            if ( $issvn==1 ) {
-                print_message("Child workspace uses SubVersion");
-            } else {
-                print_message("Child workspace uses CVS");
-            }
+                print_message("Child workspace uses '$scm'.");
         }
     }
 
-    # check if we got a valid child workspace
-    my $id = $cws->eis_id();
-    if ( !$id ) {
-        print_error("Child workspace '$childws' for master workspace '$masterws' not found in EIS database.", 2);
-    }
-
     return;
 }
 
@@ -559,12 +553,6 @@ sub query_ispublic
         }
     }
 
-    # check if we got a valid child workspace
-    my $id = $cws->eis_id();
-    if ( !$id ) {
-        print_error("Child workspace '$childws' for master workspace '$masterws' not found in EIS database.", 2);
-    }
-
     return;
 }
 
@@ -1248,6 +1236,7 @@ sub do_help
         print STDERR "\tquery (q)\n";
         print STDERR "\ttask (t)\n";
         print STDERR "\tcdiff (cd)\n";
+        print STDERR "\tsetcurrent\n";
         print STDERR "\tintegrate *** release engineers only ***\n";
         print STDERR "\teisclone *** release engineers only ***\n";
     }
@@ -1260,10 +1249,11 @@ sub do_help
     }
     elsif ($arg eq 'create') {
         print STDERR "create: Create a new child workspace\n";
-        print STDERR "usage: create [-m milestone] <master workspace> <child workspace>\n";
+        print STDERR "usage: create [--hg] [-m milestone] <master workspace> <child workspace>\n";
         print STDERR "\t-m milestone:          Milestone to base the child workspace on. If ommitted the\n";
         print STDERR "\t                       last published milestone will be used.\n";
         print STDERR "\t--milestone milestone: Same as -m milestone.\n";
+        print STDERR "\t--hg:                  Create Mercurial (hg) based CWS.\n";
         print STDERR "\t--migration:           Used only for the migration of an exitisting CWS from CVS to SVN.\n";
         print STDERR "\t                       Disables existence check in EIS, creates CWS branch in SVN, sets SVN flag.\n";
     }
@@ -1274,7 +1264,7 @@ sub do_help
     elsif ($arg eq 'query') {
         print STDERR "query: Query child workspace for miscellaneous information\n";
         print STDERR "usage: query [-M master] [-c child] <current|integratedinto|incompatible|owner|qarep|status|taskids>\n";
-        print STDERR "       query [-M master] [-c child] <release|due|due_qa|help|ui|ispublic|vcs|build>\n";
+        print STDERR "       query [-M master] [-c child] <release|due|due_qa|help|ui|ispublic|scm|build>\n";
         print STDERR "       query [-M master] <latest|milestones|ispublicmaster>\n";
         print STDERR "       query  <masters>\n";
         print STDERR "       query [-M master] [-m milestone] <integrated|buildid>\n";
@@ -1308,7 +1298,7 @@ sub do_help
         print STDERR "\tnominated\tquery nominated CWSs\n";
         print STDERR "\tready\t\tquery CWSs ready for QA\n";
         print STDERR "\tispublic\tquery public flag of CWS\n";
-        print STDERR "\tvcs\t\tquery Version Control System used for CWS (either CVS or SubVersion)\n";
+        print STDERR "\tscm\t\tquery Source Control Management (SCM) system used for CWS\n";
         print STDERR "\tmasters\t\tquery available MWS\n";
         print STDERR "\tmilestones\tquery which milestones are know on the given MWS\n";
         print STDERR "\tispublicmaster\tquery public flag of MWS\n";
@@ -1367,6 +1357,14 @@ sub do_help
         print STDERR "\t--files:                Print only file names\n";
         print STDERR "\t--modules:              Print only top level directories aka modules\n"
     }
+    elsif ($arg eq 'setcurrent') {
+        print STDERR "setcurrent: Set the current milestone for the CWS (only hg based CWSs)\n";
+        print STDERR "usage: setcurrent [-m milestone]\n";
+        print STDERR "\t-m milestone:           Set milestone to <milestone> to workspace <workspace>\n";
+        print STDERR "\t                        Use 'latest' for the for lastest published milestone on the current master\n";
+        print STDERR "\t                        For cross master change use the form <MWS>:<milestone>\n";
+        print STDERR "\t--milestone milestone:  Same as -m milestone\n";
+    }
     else {
         print STDERR "'$arg': unknown subcommand\n";
         exit(1);
@@ -1389,6 +1387,11 @@ sub do_create
         $is_migration = 1;
     }
 
+    my $is_hg = 0;
+    if ( exists $options_ref->{'hg'} ) {
+        $is_hg = 1;
+    }
+
     my $master   = uc $args_ref->[0];
     my $cws_name = $args_ref->[1];
 
@@ -1449,6 +1452,11 @@ sub do_create
     # set milestone
     $cws->milestone($milestone);
 
+    # handle mercurial(hg) based CWSs
+    if ( $is_hg ) {
+        register_child_workspace($cws, 'hg', $is_promotion);
+        return;
+    }
 
     my $config = CwsConfig->new();
     my $ooo_svn_server = $config->get_ooo_svn_server();
@@ -1550,7 +1558,7 @@ sub do_create
         }
     }
     else {
-        register_child_workspace($cws, $is_promotion);
+        register_child_workspace($cws, 'svn', $is_promotion);
     }
     return;
 }
@@ -1605,7 +1613,7 @@ sub do_rebase
                 print_error("Can't determine latest milestone of '$old_masterws' available for rebase.", 22);
             }
             $new_masterws  = $old_masterws;
-            $new_milestone = $cws->get_current_milestone($old_masterws);
+            $new_milestone = $latest;
         }
         else {
             ($new_masterws, $new_milestone) =  verify_milestone($cws, $milestone);
@@ -1695,7 +1703,7 @@ sub do_rebase
                 
         }
 
-        print_message("... updating EIS database\n");
+        print_message("... updating EIS database");
         my $push_return = $cws->set_master_and_milestone($new_masterws, $new_milestone);
         # sanity check
         if ( $$push_return[1] ne $new_milestone) {
@@ -1987,7 +1995,7 @@ sub do_query
     my $options_ref = shift;
 
     # list of available query modes
-    my @query_modes = qw(integratedinto incompatible taskids status latest current owner qarep build buildid integrated approved nominated ready new planned release due due_qa help ui milestones masters vcs ispublic ispublicmaster);
+    my @query_modes = qw(integratedinto incompatible taskids status latest current owner qarep build buildid integrated approved nominated ready new planned release due due_qa help ui milestones masters scm ispublic ispublicmaster);
     my %query_modes_hash = ();
     foreach (@query_modes) {
         $query_modes_hash{$_}++;
@@ -2002,6 +2010,10 @@ sub do_query
     # with CVS etc. 'state' is still an alias for 'status'
     $mode = 'status' if $mode eq 'state';
 
+    # cwquery mode 'vcs' has been renamed to 'scm' to be more consistent
+    # with general use etc. 'vcs' is still an alias for 'scm'
+    $mode = 'scm' if $mode eq 'vcs';
+
     # there will be more query modes over time
     if ( !exists $query_modes_hash{$mode} ) {
         do_help(['query']);
@@ -2172,6 +2184,46 @@ sub do_cdiff
 
 }
 
+sub do_setcurrent
+{
+    my $args_ref    = shift;
+    my $options_ref = shift;
+
+    if ( exists $options_ref->{'help'} || @{$args_ref} != 0) {
+        do_help(['setcurrent']);
+    }
+
+    if ( !exists $options_ref->{'milestone'} ) {
+        do_help(['setcurrent']);
+    }
+
+    my $cws = get_cws_from_environment();
+    my $old_masterws = $cws->master();
+    my $new_masterws;
+    my $new_milestone;
+
+    my $milestone = $options_ref->{'milestone'};
+    if ( $milestone eq 'latest' ) {
+        my $latest = $cws->get_current_milestone($old_masterws);
+
+        if ( !$latest ) {
+            print_error("Can't determine latest milestone of '$old_masterws'.", 22);
+        }
+        $new_masterws  = $old_masterws;
+        $new_milestone = $latest;
+    }
+    else {
+        ($new_masterws, $new_milestone) =  verify_milestone($cws, $milestone);
+    }
+    
+    print_message("... updating EIS database");
+    my $push_return = $cws->set_master_and_milestone($new_masterws, $new_milestone);
+    # sanity check
+    if ( $$push_return[1] ne $new_milestone) {
+        print_error("Couldn't push new milestone '$new_milestone' to database", 0);
+    }
+}
+
 sub do_eisclone
 {
     my $args_ref    = shift;
diff --git a/solenv/bin/modules/Cws.pm b/solenv/bin/modules/Cws.pm
index 9dcfc0b..59eb2c9 100755
--- a/solenv/bin/modules/Cws.pm
+++ b/solenv/bin/modules/Cws.pm
@@ -493,6 +493,19 @@ sub set_subversion_flag {
     return $self->set_subversion_flag_in_eis($value);
 }
 
+sub get_scm {
+    my $self  = shift;
+
+    return $self->get_scm_from_eis();
+}
+
+sub set_scm {
+    my $self     = shift;
+    my $scm_name = shift;
+
+    return $self->set_scm_in_eis($scm_name);
+}
+
 
 # Check if milestone exists
 sub is_milestone
@@ -1790,6 +1803,46 @@ sub set_subversion_flag_in_eis
     return $result;
 }
 
+sub get_scm_from_eis
+{
+    my $self = shift;
+
+    # check if child workspace is valid
+    my $id = $self->eis_id();
+    if ( !$id ) {
+        carp("ERROR: Childworkspace not (yet) registered with EIS.\n");
+        return undef;
+    }
+
+    my $eis = Cws::eis();
+    my $result;
+    eval { $result = $eis->getSCMName($id) };
+    if ( $@ ) {
+        carp("ERROR: get_scm_from_eis(): EIS database transaction failed. Reason:\n$@\n");
+    }
+    return $result;
+}
+
+sub set_scm_in_eis
+{
+    my $self     = shift;
+    my $scm_name = shift;
+
+    # check if child workspace is valid
+    my $id = $self->eis_id();
+    if ( !$id ) {
+        carp("ERROR: Childworkspace not (yet) registered with EIS.\n");
+        return undef;
+    }
+
+    my $eis = Cws::eis();
+    eval { $eis->setSCMName($id, $scm_name) };
+    if ( $@ ) {
+        carp("ERROR: set_scm_in_eis(): EIS database transaction failed. Reason:\n$@\n");
+        return 0;
+    }
+    return 1;
+}
 
 sub is_uirelevant_from_eis
 {
commit 6f1f6e0d9b2cf9ba1bf4368d621fa3709c361e21
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Thu Aug 27 14:46:36 2009 +0000

    CWS-TOOLING: integrate CWS hr64_DEV300
    2009-07-21 13:24:57 +0200 hr  r274189 : #i99576#: re-enable optimization for tabcont.cxx
    2009-07-21 13:17:18 +0200 hr  r274188 : #i99592: disable -xspace optimization for Solaris x86 and SunStudio 12, due to some mis-optimzation in sc and elsewhere. SunStudio 12 update 1 is OK, but needs a few unrelated changes which will be implemented in DEV300 code line

diff --git a/solenv/inc/unxsoli4.mk b/solenv/inc/unxsoli4.mk
index 4567453..979a2c8 100644
--- a/solenv/inc/unxsoli4.mk
+++ b/solenv/inc/unxsoli4.mk
@@ -72,7 +72,7 @@ CFLAGSSLOCUIMT=-KPIC -mt
 CFLAGSPROF=-xpg
 CFLAGSDEBUG=-g
 CFLAGSDBGUTIL=
-CFLAGSOPT=-xarch=generic -xO3 -xspace
+CFLAGSOPT=-xarch=generic -xO3
 CFLAGSNOOPT=
 CFLAGSOUTOBJ=-o
 
commit 5505148e53dc439ce3892f74a010ad2e9b917f86
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Thu Aug 27 01:14:49 2009 +0000

    CWS-TOOLING: integrate CWS gpc100
    2009-08-07 20:21:15 +0200 ka  r274784 : CWS-TOOLING: rebase CWS gpc100 to trunk at 274622 (milestone: DEV300:m54)
    2009-08-07 14:11:35 +0200 ka  r274764 : #i75026#: removal of GPC dependency

diff --git a/configure b/configure
index 28516ec..cf1558b 100755
--- a/configure
+++ b/configure
@@ -722,7 +722,6 @@ GCONF_CFLAGS
 ENABLE_KDE4
 ENABLE_KDE
 ENABLE_GTK
-WITH_GPC
 ZIP_HOME
 UNZIP
 ZIP
@@ -1030,7 +1029,6 @@ enable_option_checking
 with_gnu_patch
 with_agg
 with_gnu_cp
-with_gpc
 enable_graphite
 with_system_graphite
 enable_ldap
@@ -2030,9 +2028,6 @@ Optional Packages:
 
   --with-gnu-cp           Specify location of GNU cp on Solaris or FreeBSD
 
-  --without-gpc           Use the internal polygon clipping code instead of
-                          the external GPC polygon clipping library.
-
   --with-system-graphite    use graphite library already installed on system
 
   --with-openldap         Enables the use of the OpenLDAP LDAP SDK instead
@@ -2873,14 +2868,6 @@ if test "${with_gnu_cp+set}" = set; then
   withval=$with_gnu_cp;
 fi
 
-
-# Check whether --with-gpc was given.
-if test "${with_gpc+set}" = set; then
-  withval=$with_gpc;
-else
-  if test ! -e ./external/gpc/gpc.c && test ! -e ./external/gpc/gpc.h; then without_gpc=yes; fi
-fi
-
 # Check whether --enable-graphite was given.
 if test "${enable_graphite+set}" = set; then
   enableval=$enable_graphite;
@@ -25227,46 +25214,6 @@ $as_echo "found and copied" >&6; }
 fi
 fi
 
-{ $as_echo "$as_me:$LINENO: checking which polygon clipping code to use" >&5
-$as_echo_n "checking which polygon clipping code to use... " >&6; }
-WITH_GPC=NO
-
-if test "$with_gpc" != "no" && test "$without_gpc" != "yes"; then
-  WITH_GPC=YES
-  { $as_echo "$as_me:$LINENO: result: GPC" >&5
-$as_echo "GPC" >&6; }
-
-  { $as_echo "$as_me:$LINENO: checking for GPC files" >&5
-$as_echo_n "checking for GPC files... " >&6; }
-  if test -f ./external/gpc/gpc.h; then
-	HAVE_GPC_H="yes"
-  else
-	HAVE_GPC_H="no"
-  fi
-  if test -f ./external/gpc/gpc.c; then
-	HAVE_GPC_C="yes"
-  else
-	HAVE_GPC_C="no"
-  fi
-
-  if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then
-	{ $as_echo "$as_me:$LINENO: result: GPC files found" >&5
-$as_echo "GPC files found" >&6; }
-  else
-	{ { $as_echo "$as_me:$LINENO: error: GPC files not found
-ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
-or use basegfx' implementation using --without-gpc" >&5
-$as_echo "$as_me: error: GPC files not found
-ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
-or use basegfx' implementation using --without-gpc" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  { $as_echo "$as_me:$LINENO: result: internal" >&5
-$as_echo "internal" >&6; }
-fi
-
-
 { $as_echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5
 $as_echo_n "checking which VCLplugs shall be built... " >&6; }
 ENABLE_GTK=""
diff --git a/configure.in b/configure.in
index b66be4e..8ebcc3d 100644
--- a/configure.in
+++ b/configure.in
@@ -25,10 +25,6 @@ AC_ARG_WITH(agg,
 AC_ARG_WITH(gnu-cp,
 [  --with-gnu-cp           Specify location of GNU cp on Solaris or FreeBSD
 ],,)
-AC_ARG_WITH(gpc,
-[  --without-gpc           Use the internal polygon clipping code instead of
-                          the external GPC polygon clipping library.
-],,if test ! -e ./external/gpc/gpc.c && test ! -e ./external/gpc/gpc.h; then without_gpc=yes; fi)
 AC_ARG_ENABLE(graphite,
 [  --enable-graphite       Enables the compilation of Graphite smart font rendering
 ],,)
@@ -5365,40 +5361,6 @@ fi
 fi
 
 dnl ===================================================================
-dnl Test for the presence of the right polygon clipping code
-dnl ===================================================================
-AC_MSG_CHECKING([which polygon clipping code to use])
-WITH_GPC=NO
-
-if test "$with_gpc" != "no" && test "$without_gpc" != "yes"; then
-  WITH_GPC=YES
-  AC_MSG_RESULT([GPC])
-
-  AC_MSG_CHECKING([for GPC files])
-  if test -f ./external/gpc/gpc.h; then
-	HAVE_GPC_H="yes"
-  else
-	HAVE_GPC_H="no"
-  fi
-  if test -f ./external/gpc/gpc.c; then
-	HAVE_GPC_C="yes"
-  else
-	HAVE_GPC_C="no"
-  fi
-
-  if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then
-	AC_MSG_RESULT([GPC files found])
-  else
-	AC_MSG_ERROR([GPC files not found
-ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
-or use basegfx' implementation using --without-gpc])
-  fi
-else
-  AC_MSG_RESULT([internal])
-fi
-AC_SUBST(WITH_GPC)
-
-dnl ===================================================================
 dnl Test which vclplugs have to be built.
 dnl ===================================================================
 AC_MSG_CHECKING([which VCLplugs shall be built])
diff --git a/set_soenv.in b/set_soenv.in
index 4fae3c1..ed9603d 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1828,7 +1828,6 @@ ToFile( "SYSTEM_GRAPHITE",   "@SYSTEM_GRAPHITE@",   "e");
 ToFile( "GRAPHITE_LIBS",     "@GRAPHITE_LIBS@",     "e");
 ToFile( "GRAPHITE_CFLAGS",   "@GRAPHITE_CFLAGS@",   "e");
 ToFile( "VC_STANDARD",       "@VC_STANDARD@",      "e" );
-ToFile( "WITH_GPC",          "@WITH_GPC@",         "e" );
 ToFile( "WITH_MYSPELL_DICTS","@WITH_MYSPELL_DICTS@","e");
 ToFile( "SYSTEM_DICTS",      "@SYSTEM_DICTS@",     "e");
 ToFile( "DICT_SYSTEM_DIR",   "@DICT_SYSTEM_DIR@",  "e");
diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk
index a0a3182..1ae4eeb 100644
--- a/solenv/inc/libs.mk
+++ b/solenv/inc/libs.mk
@@ -57,9 +57,6 @@ I18NUTILLIB=-li18nutil$(COMID)
 .INCLUDE .IGNORE : i18npool$/version.mk
 I18NISOLANGLIB=-li18nisolang$(ISOLANG_MAJOR)$(COMID)
 I18NPAPERLIB=-li18npaper$(DLLPOSTFIX)
-.IF "$(WITH_GPC)"!="NO"
-GPC3RDLIB=-lgpc
-.ENDIF
 .IF "$(GUI)$(COM)"=="WNTGCC"
 SALHELPERLIB=-lsalhelper$(UDK_MAJOR)$(COMID)
 .ELSE			# "$(GUI)$(COM)"=="WNTGCC"
@@ -357,9 +354,6 @@ ICUDATALIB=icudata.lib
 I18NUTILLIB=ii18nutil.lib
 I18NISOLANGLIB=ii18nisolang.lib
 I18NPAPERLIB=ii18npaper.lib
-.IF "$(WITH_GPC)"!="NO"
-GPC3RDLIB=gpc.lib
-.ENDIF
 SALHELPERLIB=isalhelper.lib
 XMLSCRIPTLIB=ixcr.lib
 COMPHELPERLIB=icomphelp.lib
commit c42f4782e68353fcf020e508a1ba6a7482c0e468
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Wed Aug 26 14:24:27 2009 +0000

    CWS-TOOLING: integrate CWS mh132
    2009-08-06 12:20:52 +0200 mh  r274712 : corrected error handling
    2009-08-05 13:41:20 +0200 mh  r274661 : #i93040# NetBSD compile issue
    2009-08-05 13:40:32 +0200 mh  r274660 : #i93040# NetBSD compile issue
    2009-08-05 13:38:46 +0200 mh  r274659 : #i93040# NetBSD compile issue
    2009-08-05 13:29:15 +0200 mh  r274658 : #i95193# increase includes limit
    2009-08-05 13:22:07 +0200 mh  r274657 : #i96811# honor return values of read calls
    2009-08-05 13:16:47 +0200 mh  r274654 : #i96802# honor return values of write calls
    2009-08-05 13:07:06 +0200 mh  r274653 : #i99835# do DestroyData
    2009-08-05 13:01:42 +0200 mh  r274651 : #i68557#: allow more dpi resolutions in scanner dialogue
    2009-07-24 14:46:04 +0200 mh  r274307 : #i103770# missing fclose added

diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index adf05e6..be71371 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -473,11 +473,13 @@ void
 
         if (wbp >= &wbuf[OBS])
         {
-            write(1, wbuf, OBS);
+            if ( write(1, wbuf, OBS) != -1 ) {
             if (wbp > &wbuf[OBS])
                 memcpy(wbuf, wbuf + OBS, wbp - &wbuf[OBS]);
             wbp -= OBS;
         }
+        else exit(1);
+        }
     }
     trp->tp = tp;
     if (cursource->fd == 0)
@@ -489,8 +491,10 @@ void
 {
     if (wbp > wbuf)
     {
-        write(1, wbuf, wbp - wbuf);
-        wbp = wbuf;
+        if ( write(1, wbuf, wbp - wbuf) != -1)
+            wbp = wbuf;
+    else 
+        exit(1);
     }
 }
 
diff --git a/soltools/cpp/cpp.h b/soltools/cpp/cpp.h
index be25a78..5742b69 100644
--- a/soltools/cpp/cpp.h
+++ b/soltools/cpp/cpp.h
@@ -3,7 +3,7 @@
 #define	INS			32768	/* input buffer								*/
 #define	OBS			8092    /* outbut buffer							*/
 #define	NARG		32      /* Max number arguments to a macro			*/
-#define	NINCLUDE	32      /* Max number of include directories (-I)	*/
+#define	NINCLUDE	48      /* Max number of include directories (-I)	*/
 #define	NIF			64		/* depth of nesting of #if					*/
 #define	NINC		32		/* depth of nesting of #include				*/
 
commit bc23e21042b11148e8193c7e8d9e2bd6caaa018a
Author: Oliver Bolte <obo at openoffice.org>
Date:   Wed Aug 26 13:41:26 2009 +0000

    #i10000# Buildtype GRAPHITE added

diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index f12d91b..44cc579 100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
@@ -13,7 +13,7 @@ common
 			BMP_WRITES_FLAG TRUE
 			BTARGET 1
 			BUILD_SPECIAL TRUE
-			BUILD_TYPE SO OOo EXT BINFILTER BITSTREAM_VERA_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM QADEVOOO ODK MSFONTEXTRACT MATHMLDTD BOOST EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N
+			BUILD_TYPE SO OOo EXT BINFILTER BITSTREAM_VERA_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM QADEVOOO ODK MSFONTEXTRACT MATHMLDTD BOOST EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N GRAPHITE
 			common_build TRUE
 			COMMON_OUTDIR common
 			CONFIG_PROJECT config_office
commit b93ea48e0a243cfdc8f96d2669cdbe50cab653dc
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Wed Aug 26 10:09:17 2009 +0000

    CWS-TOOLING: integrate CWS dba32e
    2009-08-10 13:16:25 +0200 fs  r274805 : #i84390# typo corrected
    2009-08-10 13:04:28 +0200 fs  r274804 : #i103741# properly terminate the last token in a string with a 0 byte
    2009-07-24 08:54:05 +0200 msc  r274286 : #103219# changed long name
    2009-07-24 08:42:28 +0200 msc  r274285 : #i79649# changed behaviour of the wizard
    2009-07-22 14:17:49 +0200 oj  r274238 : GrabFocus
    2009-07-22 13:38:01 +0200 oj  r274232 : #i102934# mixed up
    2009-07-22 13:37:16 +0200 oj  r274231 : #i102934# mixed up
    2009-07-21 12:30:36 +0200 oj  r274176 : crash when using distinct
    2009-07-21 10:03:44 +0200 oj  r274163 : set last char to 0
    2009-07-21 09:31:22 +0200 oj  r274161 : mediatype corrected
    2009-07-20 11:45:33 +0200 fs  r274118 : typo in formatting string
    2009-07-20 11:40:39 +0200 fs  r274117 : removed unused include
    2009-07-20 11:40:01 +0200 fs  r274116 : class name corrected
    2009-07-16 13:41:45 +0200 oj  r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path
    2009-07-16 13:12:05 +0200 tbo  r274044 : #i103219# adjust declarion to new hid.lst
    2009-07-16 12:43:48 +0200 oj  r274041 : #i102497# check also fot longvarchar
    2009-07-16 12:15:41 +0200 oj  r274039 : #i103030# handle type description and exceptions as well
    2009-07-16 11:14:26 +0200 fs  r274035 : let SVN ignore output paths
    2009-07-16 09:23:43 +0200 fs  r274030 : TransforFormComponentProperties: no need to check for attribute equality
    2009-07-10 14:16:23 +0200 oj  r273892 : CWS-TOOLING: rebase CWS dba32e to trunk at 273858 (milestone: DEV300:m52)
    2009-07-01 21:41:50 +0200 fs  r273614 : #i10000#
    2009-07-01 15:01:10 +0200 fs  r273589 : Input required doesn't make sense at all in XML form documents
    2009-07-01 12:10:31 +0200 fs  r273562 : updated
    2009-07-01 11:46:12 +0200 fs  r273560 : #i103219# add about 100 missing long names
    2009-07-01 10:11:41 +0200 fs  r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays
    2009-07-01 09:50:03 +0200 fs  r273549 : removed obsolete (empty) folder
    2009-07-01 09:47:35 +0200 fs  r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb
    2009-06-30 10:07:47 +0200 fs  r273493 : merging latest changes from CWS dba32d
    2009-06-29 20:46:31 +0200 fs  r273482 : #i103138# Rectangle conversions
    2009-06-29 10:01:13 +0200 fs  r273453 : #i103138#
    refactored the code for positioning/zooming the control
    Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
    take an additional ViewTransformation parameter, describing the transformation to obtain the actual
    control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
    This has become necessary since during painting, the device which we created our control for might not necessarily
    have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
    this would lead to wrong results.
    Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
    to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
    time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
    Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
    I consider it broken, since:
    - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
    - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
      fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
      It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
      one has no possibility to obtain the current zoom by other means.
    Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
    have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
    which means the controls have a zoom of "1:1" set, which is wrong here.
    2009-06-29 09:52:13 +0200 fs  r273452 : during #i103138#: belongsToDevice is unused nowadays
    2009-06-24 12:40:06 +0200 fs  r273329 : #i102888# #i102899#
    2009-06-24 12:10:29 +0200 oj  r273327 : #i103030# some code changes
    2009-06-24 09:44:14 +0200 oj  r273311 : #i103030# some code changes
    2009-06-24 09:24:42 +0200 oj  r273309 : #i103030# add log
    2009-06-24 09:03:29 +0200 fs  r273308 : if a col's table name is schema.table, properly quote all parts
    2009-06-24 08:56:06 +0200 oj  r273307 : #i102691# changed string
    2009-06-23 13:31:43 +0200 oj  r273280 : #i102479# fix date, time and datetime
    2009-06-23 12:51:28 +0200 oj  r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata
    2009-06-23 12:17:16 +0200 oj  r273275 : #i103030# add LogBridge
    2009-06-23 11:53:10 +0200 oj  r273272 : shawdowed var resolved
    2009-06-23 11:48:49 +0200 oj  r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set
    2009-06-23 11:47:47 +0200 oj  r273269 : #i103030# add LogBridge
    2009-06-23 11:47:11 +0200 oj  r273268 : #i103030# add LogBridge
    2009-06-23 08:05:08 +0200 oj  r273253 : #i102934# add key for collapsing
    2009-06-22 13:21:33 +0200 fs  r273225 : merging latest changes from CWS dba32d
    2009-06-22 13:15:22 +0200 fs  r273221 : why restrict to 12 entries?
    2009-06-22 08:12:21 +0200 oj  r273196 : #i102655# choosen > chosen typo fixed
    2009-06-22 08:08:04 +0200 oj  r273195 : #i102657# typo fix
    2009-06-22 08:06:28 +0200 oj  r273194 : #i102934# expanding and collasping of section
    2009-06-22 08:05:52 +0200 oj  r273193 : #i102930# set focus in treelistbox
    2009-06-22 08:04:56 +0200 oj  r273192 : #i102929# enable tabstop
    2009-06-19 13:18:26 +0200 oj  r273157 : remove unused param
    2009-06-19 10:07:05 +0200 oj  r273149 : CWS-TOOLING: rebase CWS dba32e to trunk at 272827 (milestone: DEV300:m50)
    2009-06-19 07:32:40 +0200 oj  r273146 : merge from dba32d to dba32e
    2009-06-19 07:22:56 +0200 oj  r273145 : merge from dba32d to dba32e
    2009-06-19 07:22:33 +0200 oj  r273144 : merge from dba32d to dba32e
    2009-06-18 14:09:34 +0200 fs  r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50
    2009-06-18 08:50:35 +0200 oj  r273098 : #i102894# fix for new line in text
    2009-06-18 08:28:48 +0200 oj  r273097 : #i102892# check any
    2009-06-18 08:21:34 +0200 oj  r273096 : check if error is valid
    2009-06-16 13:49:28 +0200 fs  r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ...
    2009-06-10 09:53:20 +0200 oj  r272797 : add lic text
    2009-06-10 09:48:55 +0200 oj  r272796 : test added for i101618
    2009-06-09 14:57:39 +0200 oj  r272771 : #i101618# access database document only when script container is needed
    2009-06-09 12:42:25 +0200 oj  r272765 : #i102497# check type property
    2009-06-09 12:32:49 +0200 oj  r272764 : adjust test cases
    2009-06-09 12:31:58 +0200 oj  r272763 : adjust test cases
    2009-06-09 12:31:22 +0200 oj  r272762 : adjust test cases
    2009-06-09 11:35:42 +0200 oj  r272761 : check if error is valid
    2009-06-09 11:29:42 +0200 oj  r272760 : #i102497# longvarchar was missing
    2009-06-08 14:52:49 +0200 fs  r272733 : #i102564# when setting a new field, also set m_nFieldType
    2009-06-08 13:51:20 +0200 oj  r272730 : add tests
    2009-06-05 14:38:01 +0200 oj  r272686 : add dep
    2009-06-05 14:35:00 +0200 oj  r272684 : add new tests
    2009-06-05 13:41:18 +0200 oj  r272681 : code clean ups
    2009-06-05 12:40:51 +0200 oj  r272678 : code cleanup
    2009-06-05 12:02:57 +0200 oj  r272677 : code cleanup
    2009-06-05 10:42:38 +0200 oj  r272670 : #i49320# impl export of single rows and as RTF and HTML
    2009-06-03 14:30:37 +0200 oj  r272576 : #i79649# check if file matches filter wildcard
    2009-06-03 13:41:57 +0200 oj  r272560 : #i102470# impl not b like 'c'

diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 61887e1..6313fdd 100755
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -410,6 +410,13 @@ File gid_File_Dl_AffineUnoUno
     // CompID = "CF542EC3-7A51-4EAA-8480-65D5E8906D05";
 End
 
+File gid_File_Dl_LogUnoUno
+    TXT_FILE_BODY;
+    Dir = SCP2_URE_DL_DIR;
+    Name = SCP2_URE_DL_NORMAL("log_uno_uno");
+    Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
+End
+
 #if defined WNT && defined _MSC
 File gid_File_Dl_Cli_Uno
     TXT_FILE_BODY;
@@ -1147,6 +1154,7 @@ Module gid_Module_Root_Ure_Hidden
             gid_File_Dl_UrpUno,
             gid_File_Dl_UnsafeUnoUno,
             gid_File_Dl_AffineUnoUno,
+            gid_File_Dl_LogUnoUno,
             gid_File_Dl_Jpipe,
             gid_File_Dl_Juh,
             gid_File_Dl_Juhx,
commit 7a69309ab3beca12e3f37a579c474f68f8511ff1
Author: Release Engineers <releng at openoffice.org>
Date:   Wed Aug 26 08:22:01 2009 +0000

    CWS-TOOLING: integrate CWS jl127
    2009-07-30 10:12:10 +0200 jl  r274470 : #i100873# switch on checking for symbol definitions. It works with the current xpcom lib.
    2009-07-29 09:48:29 +0200 jl  r274443 : #i100873#
    2009-07-29 09:47:36 +0200 jl  r274442 : #i100873# changes after resync with DEV300m53 which contains the seamonkey update
    2009-07-28 10:00:03 +0200 jl  r274389 : #100873# Patches from tono
    2009-07-27 16:59:39 +0200 jl  r274372 : CWS-TOOLING: rebase CWS jl127 to trunk at 274203 (milestone: DEV300:m53)
    2009-07-07 09:08:53 +0200 jl  r273768 : #100873#
    2009-07-06 17:16:10 +0200 jl  r273754 : #100873#
    2009-07-01 13:58:09 +0200 jl  r273576 : #100873# added to readme
    2009-07-01 13:15:02 +0200 jl  r273573 : #100873# deliver lib files when building with MS compiler
    2009-06-30 11:22:06 +0200 jl  r273498 : #i100873# accidentally commented out patch_files
    2009-06-30 09:01:10 +0200 jl  r273489 : #100873# make rc.exe work in ooo windows build
    2009-06-29 09:47:56 +0200 jl  r273451 : #i100873# applied mingw patch from tono
    2009-06-24 12:52:14 +0200 jl  r273332 : #100873# reapplying the configure.in patch on version 273150
    2009-06-24 12:51:12 +0200 jl  r273331 : #100873# reapplying the patch on version 273150
    2009-06-23 17:17:36 +0200 jl  r273299 : #100873# manually modified patch from tono
    2009-06-22 17:05:41 +0200 jl  r273243 : #100873# applying mingw patch from tono
    2009-06-22 17:02:30 +0200 jl  r273242 : #100873# applying mingw patch from tono
    2009-06-22 12:49:57 +0200 jl  r273216 : #100873# dependency to stlport
    2009-06-19 11:56:16 +0200 jl  r273155 : #100873# undoing a previous change, instset_native complained about missing libjpipe.jnilib (jurt)
    2009-06-19 10:13:03 +0200 jl  r273150 : #100873# ooo builds shall also use the new nss by default
    2009-06-18 14:32:07 +0200 jl  r273117 : #110873# more debug output when verifying a certificate
    2009-06-16 11:23:50 +0200 jl  r273012 : #i10873#
    2009-06-16 10:57:41 +0200 jl  r273011 : #100873# wrong parameter definition in nsscrypto_initialize
    2009-06-16 10:56:45 +0200 jl  r273010 : #100873# wrong parameter definition in nsscrypto_initialize
    2009-06-15 16:20:42 +0200 jl  r272996 : #100873# initialization of NSS is now threadsafe
    2009-06-10 12:50:46 +0200 jl  r272804 : #100873# rename in foreach fails in 4nt
    2009-06-09 13:43:00 +0200 jl  r272768 : #i100873# deliver only .h from inc/nss otherwise we get a warning when nss/nssck.api is delivered
    2009-06-08 16:15:44 +0200 jl  r272739 : #i100873#
    2009-06-08 16:04:54 +0200 jl  r272738 : #i100873#
    2009-06-08 15:45:52 +0200 jl  r272736 : #i100873#
    2009-06-08 15:44:15 +0200 jl  r272735 : #i100873# unzipping of nss.tar.z not working with 4nt
    2009-06-08 09:45:46 +0200 jl  r272720 : #i100873#
    2009-06-03 13:53:52 +0200 jl  r272562 : #i100873#  MOZILLABUILD not correct
    2009-06-03 13:17:54 +0200 jl  r272557 : #i100873#  readme and makefile changes from cws jl125, support of new nss module
    2009-06-03 09:57:40 +0200 jl  r272544 : #i100873#  added readme
    2009-06-02 16:47:47 +0200 jl  r272512 : #i100873#  removed no longer needed stuff regarding jnilibs
    2009-06-02 15:54:42 +0200 jl  r272510 : #i100873# added NSS to BUILD_TYPE
    2009-06-02 15:20:18 +0200 jl  r272508 : #i100873# DEREFERENCE option for copy command
    2009-06-02 13:00:12 +0200 jl  r272496 : #i100873# PATCH_FILE_NAMES is now PATCH_FILES
    2009-06-02 12:23:39 +0200 jl  r272494 : #i100873# build dependency to nss
    2009-05-29 16:21:40 +0200 jl  r272470 : #i100873# seting ENABLE_NSS_MODULE==YES and includeing mozilla-build-1.3 folder in environment
    2009-05-29 16:03:23 +0200 jl  r272468 : #i100873# use intermediate certificates when validating a certificate
    2009-05-29 15:57:16 +0200 jl  r272466 : #i100873# use intermediate certificates when validating a certificate
    2009-05-29 15:49:58 +0200 jl  r272464 : #i100873# using ENABLE_NSS_MODULE
    2009-05-29 15:33:14 +0200 jl  r272463 : #i100873# using ENABLE_NSS_MODULE
    2009-05-29 15:28:39 +0200 jl  r272461 : #i100873# build dependency to nss module
    2009-05-29 15:24:57 +0200 jl  r272460 : #i100873# pass additional certificates into verifyCertificate function
    2009-05-29 14:49:40 +0200 jl  r272458 : #i100873# new NSS module
    2009-05-29 14:43:44 +0200 jl  r272457 : #i100873# new NSS module

diff --git a/configure.in b/configure.in
index d447e30..b66be4e 100644
--- a/configure.in
+++ b/configure.in
@@ -258,6 +258,9 @@ AC_ARG_WITH(mozilla-toolkit,
 [  --with-mozilla-toolkit  Choose which GUI toolkit to use while building mozilla
                           components. Default: gtk2
 ],,)
+AC_ARG_ENABLE(nss_module,
+[  --disable-nss-module    Whether to use provided NSS module     
+],,enable_nss_module=yes)
 AC_ARG_ENABLE(kde,
 [  --enable-kde            Determines whether to use Qt/KDE vclplug on platforms
                           where Qt and KDE are available.
@@ -652,6 +655,12 @@ AC_ARG_WITH(directx-home,
  
                           Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>
 ],,)
+AC_ARG_WITH(mozilla-build,
+[  --with-mozilla-build   For Windows users, please supply the path to the
+                          mozilla build tools.
+ 
+                          Usage: --with-mozilla-build=<absolute path to mozilla build tools>
+],[MOZILLABUILD=$withval],)
 AC_ARG_WITH(local-solenv,
 [  --with-local-solenv     If you have solenv in a location other than ./solenv,
                           please supply the path here.
@@ -4071,6 +4080,7 @@ AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components
 if test "$enable_mozilla" = "no"; then
    AC_MSG_RESULT([no])
    WITH_MOZILLA=NO
+   ENABLE_NSS_MODULE=NO
 else
    AC_MSG_RESULT([yes])
    WITH_MOZILLA=YES
@@ -4140,6 +4150,8 @@ AC_MSG_CHECKING([which mozilla to use])
 if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
     AC_MSG_RESULT([external])
     SYSTEM_MOZILLA=YES
+    ENABLE_NSS_MODULE=NO
+    enable_nss_module=no
     AC_MSG_CHECKING([which Mozilla flavour to use])
     if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
       MOZ_FLAVOUR=libxul
@@ -4226,6 +4238,8 @@ Please recompile $tmp with --enable-ldap or use --with-openldap.])
 elif test "$enable_mozilla" = "no"; then
     AC_MSG_RESULT([none])
     WITH_MOZILLA=NO
+    ENABLE_NSS_MODULE=NO
+    enable_nss_module=no
 else
     AC_MSG_RESULT([internal])
     SYSTEM_MOZILLA=NO
@@ -4281,6 +4295,37 @@ else
    AC_MSG_RESULT([no])
 fi
 
+AC_MSG_CHECKING([whether to build provided NSS module])
+if test "$enable_nss_module" != "no"; then
+   ENABLE_NSS_MODULE="YES"
+   BUILD_TYPE="$BUILD_TYPE NSS"
+   AC_MSG_RESULT([yes])
+   if test "$_os" = "WINNT"; then
+      AC_MSG_CHECKING([for Mozilla build tooling])
+      if test -z "$MOZILLABUILD" ; then
+AC_MSG_ERROR([Mozilla build tooling not found. Use --with-mozilla-build=<absolut path to mozilla build tooling (mozilla-build)>])
+      else
+         if test \( "$WITH_MINGWIN" = "yes" \) ; then
+            if test ! -d "$MOZILLABUILD" ; then
+AC_MSG_ERROR([Mozilla build tooling incomplete!])
+            else
+               AC_MSG_RESULT([ok])
+            fi
+         else
+            if test ! -d "$MOZILLABUILD/moztools" \
+               -o ! -d "$MOZILLABUILD/msys" ; then
+AC_MSG_ERROR([Mozilla build tooling incomplete!])
+            else
+               AC_MSG_RESULT([ok])
+            fi
+         fi
+      fi
+   fi
+else
+   ENABLE_NSS_MODULE="NO"
+   AC_MSG_RESULT([no])
+fi
+
 if test "$BUILD_MOZAB" = "TRUE"; then
   if test "$_os" = "WINNT"; then
     if test "$WITH_MINGWIN" != "yes"; then
@@ -4359,6 +4404,8 @@ fi
 AC_SUBST(BUILD_MOZAB)
 
 fi
+AC_SUBST(ENABLE_NSS_MODULE)
+AC_SUBST(MOZILLABUILD)
 AC_SUBST(SYSTEM_MOZILLA)
 AC_SUBST(MOZ_FLAVOUR)
 AC_SUBST(MOZ_INC)
diff --git a/set_soenv.in b/set_soenv.in
index 39f4db5..4fae3c1 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -88,7 +88,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $SHELL,
      $COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, $FRAME_HOME, 
      $USE_DIRECTX5, $ATL_LIB, $ATL_INCLUDE, $MFC_LIB, $MFC_INCLUDE, $NO_HIDS, $TMPDIR,
      $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
-     $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB,
+     $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB, $MOZILLABUILD,
 	 $PROEXT,
      $SYSTEM_PYTHON, $PYTHONPATH, $SYSTEM_MOZILLA, $EPM_FLAGS);
 #
@@ -1646,6 +1646,8 @@ ToFile( "BUILD_MOZAB",       "@BUILD_MOZAB@",    "e" );
 ToFile( "PREBUILD_MOZAB",    $PREBUILD_MOZAB,    "e" );
 ToFile( "MOZILLA_VERSION",   $MOZILLA_VERSION,   "e" );
 ToFile( "DEFAULT_MOZILLA_TOOLKIT", $MOZILLA_TOOLKIT, "e" );
+ToFile( "ENABLE_NSS_MODULE",  "@ENABLE_NSS_MODULE@", "e" );
+ToFile( "MOZILLABUILD",  "@MOZILLABUILD@", "e" );
 ToFile( "BUILD_VER_STRING",  "@BUILD_VER_STRING@", "e" );
 ToFile( "ENABLE_VBA",  "@ENABLE_VBA@", "e" );
 ToFile( "VBA_EXTENSION",  "@VBA_EXTENSION@", "e" );
diff --git a/solenv/bin/macosx-change-install-names.pl b/solenv/bin/macosx-change-install-names.pl
index 9981705..d10ff2e 100644
--- a/solenv/bin/macosx-change-install-names.pl
+++ b/solenv/bin/macosx-change-install-names.pl
@@ -61,16 +61,18 @@ if ($type eq "extshl")
 {
     $type = "shl";
     my $change = "";
+    my %inames;
     foreach $file (@ARGV)
     {
-        otoolD($file) =~ m'^(.*?([^/]+))\n$' or
+        my $iname = otoolD($file);
+        (defined $iname ? $iname : $file . "\n") =~ m'^(.*?([^/]+))\n$' or
             die "unexpected otool -D output";
         $change .= " -change $1 " . action($type, $loc, $loc) . "/$2";
-        $iname{$file} = $2;
+        $inames{$file} = $2;
     }
     foreach $file (@ARGV)
     {
-        my $call = "install_name_tool$change -id \@__________________________________________________$loc/$iname{$file} $file";
+        my $call = "install_name_tool$change -id \@__________________________________________________$loc/$inames{$file} $file";
         system($call) == 0 or die "cannot $call";
     }
 }
diff --git a/solenv/bin/modules/macosxotoolhelper.pm b/solenv/bin/modules/macosxotoolhelper.pm
index d507277..cd24e5e 100644
--- a/solenv/bin/modules/macosxotoolhelper.pm
+++ b/solenv/bin/modules/macosxotoolhelper.pm
@@ -41,7 +41,7 @@ sub otoolD($) {
     my $line = <IN>;
     $line =~ /^$file:\n$/ or
         die "unexpected otool -D output (\"$line\", expecting \"$file:\")";
-    $line = <IN> or die "unexpected otool -D output";
+    $line = <IN>;
     <IN> == undef or die "unexpected otool -D output";
     close(IN);
     return $line;
diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index 133646e..f12d91b 100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
@@ -13,7 +13,7 @@ common
 			BMP_WRITES_FLAG TRUE
 			BTARGET 1
 			BUILD_SPECIAL TRUE
-			BUILD_TYPE SO OOo EXT BINFILTER BITSTREAM_VERA_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM QADEVOOO ODK MSFONTEXTRACT MATHMLDTD BOOST EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX L10N
+			BUILD_TYPE SO OOo EXT BINFILTER BITSTREAM_VERA_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM QADEVOOO ODK MSFONTEXTRACT MATHMLDTD BOOST EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS L10N
 			common_build TRUE
 			COMMON_OUTDIR common
 			CONFIG_PROJECT config_office
@@ -28,6 +28,7 @@ common
 			ENABLE_GTK TRUE
 			ENABLE_MEDIAWIKI YES
 			ENABLE_MINIMIZER YES
+			ENABLE_NSS_MODULE YES
 			ENABLE_RANDR TRUE
 			ENABLE_REPORTBUILDER YES
 			ENABLE_SVCTAGS YES
@@ -3544,6 +3545,7 @@ wntmsci12
 			GUIBASE WIN
 			GVER NT351
 			INPATH wntmsci12%PROEXT%
+			MOZILLABUILD %SOLARROOT%/mozilla-build-1.3
 			OS WNT
 			OUTPATH wntmsci12
 			PACKMS %SO_PACK%$/wntmsci12$/MS
diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn
index aa1442c..2e7e8fb 100644
--- a/solenv/config/ssolar.cmn
+++ b/solenv/config/ssolar.cmn
@@ -84,6 +84,7 @@ common
         ENABLE_KDE
         ENABLE_MEDIAWIKI
 		ENABLE_MINIMIZER
+		ENABLE_NSS_MODULE
         ENABLE_PASF
         ENABLE_RANDR
         ENABLE_REPORTBUILDER
diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index 058dfad..ced838d 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -134,13 +134,13 @@ $(MISC)$/%.unpack : $(PRJ)$/download$/%.tar.Z
 
 $(MISC)$/%.unpack : $(PRJ)$/download$/%.tar.gz
     @-$(RM) $@
-    @noop $(assign UNPACKCMD := gzip -d -c $(BACK_PATH)$(fake_back)download$/$(TARFILE_NAME).tar.gz $(TARFILE_FILTER) | $(TAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
+    @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(BACK_PATH)$(fake_back)download$/$(TARFILE_NAME).tar.gz) $(TARFILE_FILTER) | $(TAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
     @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
     @$(RENAME) $@.$(INPATH) $@
 
 $(MISC)$/%.unpack : $(PRJ)$/download$/%.tgz
     @-$(RM) $@
-    @noop $(assign UNPACKCMD := gzip -d -c $(BACK_PATH)$(fake_back)download$/$(TARFILE_NAME).tgz $(TARFILE_FILTER) | $(TAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
+    @noop $(assign UNPACKCMD := gzip -d -c $(subst,\,/ $(BACK_PATH)$(fake_back)download$/$(TARFILE_NAME).tgz) $(TARFILE_FILTER) | $(TAR) $(TAR_EXCLUDE_SWITCH) -x$(tar_verbose_switch)f - )
     @$(TYPE) $(mktmp $(UNPACKCMD)) > $@.$(INPATH)
     @$(RENAME) $@.$(INPATH) $@
 
@@ -171,7 +171,7 @@ $(PACKAGE_DIR)$/$(UNTAR_FLAG_FILE) : $(PRJ)$/$(ROUT)$/misc$/$(TARFILE_NAME).unpa
     $(IFEXIST) $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR) $(THEN) $(RENAME:s/+//) $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR) $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)_removeme $(FI)
     -rm -rf $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)_removeme
     @-$(MKDIRHIER) $(PACKAGE_DIR)$(fake_root_dir)
-    cd $(PACKAGE_DIR)$(fake_root_dir) && ( $(shell @$(TYPE) $(PRJ)$/$(ROUT)$/misc$/$(TARFILE_NAME).unpack)) && $(TOUCH) $(UNTAR_FLAG_FILE)
+    cd $(PACKAGE_DIR)$(fake_root_dir) && ( $(shell $(TYPE) $(PRJ)$/$(ROUT)$/misc$/$(TARFILE_NAME).unpack)) && $(TOUCH) $(UNTAR_FLAG_FILE)
     @echo make writeable...
 .IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
     @cd $(PACKAGE_DIR) && chmod -R +rw $(TARFILE_ROOTDIR) && $(TOUCH) $(UNTAR_FLAG_FILE)
@@ -293,7 +293,7 @@ $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE) : $(PACKAGE_DIR)$/$(INSTALL_FLAG_FILE)
     @-$(MKDIR) $(foreach,i,$(OUTDIR2INC) $(INCCOM)$/$(i:b))
     @echo copied $(foreach,i,$(OUTDIR2INC) $(shell @$(COPY) $(COPYRECURSE) $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/$i$/* $(INCCOM)$/$(i:b) >& $(NULLDEV) && echo $i))
 .ELSE			# "$(USE_SHELL)"=="4nt"
-    $(COPY) $(COPYRECURSE) $(foreach,i,$(OUTDIR2INC) $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/$i) $(INCCOM)
+    $(COPY) $(DEREFERENCE) $(COPYRECURSE) $(foreach,i,$(OUTDIR2INC) $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/$i) $(INCCOM)
 .ENDIF			# "$(USE_SHELL)"=="4nt"
 .ENDIF			# "$(OUTDIR2INC)"!=""
 .IF "$(OUT2BIN)"!=""
diff --git a/solenv/inc/unitools.mk b/solenv/inc/unitools.mk
index 052e4c7..1a68433 100644
--- a/solenv/inc/unitools.mk
+++ b/solenv/inc/unitools.mk
@@ -128,6 +128,7 @@ CDD=cd
 # expect cygwin tools to exist
 COPY*=cp
 COPYRECURSE=-r
+DEREFERENCE=-L
 COPYUPDATE=-u
 ECHON=echo -n
 ECHONL=echo
@@ -179,16 +180,22 @@ PERL*=perl
 TYPE=cat
 CDD=cd
 COPY=cp -f
+.IF "$(OS)"=="MACOSX"
+COPYRECURSE=-R
+.ELSE #"$(OS)"=="MACOSX"
 COPYRECURSE=-r
+.ENDIF
 .IF "$(OS)"=="SOLARIS"
 AWK*=nawk
 GNUCOPY*=gnucp
 GNUPATCH*=gnupatch
 GNUTAR*=gtar
+DEREFERENCE=
 .ELSE			# "$(OS)"=="SOLARIS"
 AWK*=awk
 GNUCOPY*=cp
 GNUPATCH*=patch
+DEREFERENCE=-L
 .ENDIF			# "$(OS)"=="SOLARIS"
 .IF "$(OS)"=="LINUX" || "$(OS)"=="MACOSX"
 GNUMAKE*=make
commit d19085df350752dda5125c7d79c369b2ef9b0c73
Author: Release Engineers <releng at openoffice.org>
Date:   Wed Aug 26 06:41:14 2009 +0000

    CWS-TOOLING: integrate CWS native262
    2009-08-18 16:35:06 +0200 is  r275118 : #i102939# differ between ok-label and install-label
    2009-08-13 17:24:47 +0200 is  r274960 : #i102939# mac languagepacks
    2009-08-13 17:22:22 +0200 is  r274959 : #i102939# mac languagepacks
    2009-08-13 17:15:01 +0200 is  r274958 : #i102939# mac languagepacks
    2009-08-13 17:13:36 +0200 is  r274957 : #i102939# mac languagepacks
    2009-08-13 17:12:57 +0200 is  r274956 : #i102939# mac languagepacks
    2009-08-13 17:12:20 +0200 is  r274955 : #i102939# mac languagepacks
    2009-08-13 17:11:41 +0200 is  r274954 : #i102939# mac languagepacks
    2009-08-13 17:10:52 +0200 is  r274953 : #i102939# mac languagepacks

diff --git a/instsetoo_native/res/DS_Store_Langpack b/instsetoo_native/res/DS_Store_Langpack
new file mode 100644
index 0000000..1b53eba
Binary files /dev/null and b/instsetoo_native/res/DS_Store_Langpack differ
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index 99ca8b1..fa9e97e 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -217,8 +217,8 @@ $(MAKETARGETS) : $(ADDDEPS)
 .ENDIF			# "$(BUILD_SPECIAL)"!=""
 
 .IF "$(OS)" == "MACOSX"
-DMGDEPS=$(BIN)$/{osxdndinstall.png DS_Store}
-$(foreach,i,$(alllangiso) {openoffice openofficedev openofficewithjre broffice brofficedev brofficewithjre}_$i) : $(DMGDEPS)
+DMGDEPS=$(BIN)$/{osxdndinstall.png DS_Store DS_Store_Langpack}
+$(foreach,i,$(alllangiso) {openoffice openofficedev openofficewithjre ooolanguagepack broffice brofficedev brofficewithjre}_$i) : $(DMGDEPS)
 .ENDIF # "$(OS)" == "MACOSX"
 
 .IF "$(PKGFORMAT)"!=""
@@ -384,7 +384,7 @@ $(BIN)$/broffice$/intro.zip : $(SOLARCOMMONPCKDIR)$/broffice_nologo$/intro.zip
     @-$(MKDIR) $(@:d)
     $(COPY) $< $@
 
-$(BIN)$/{osxdndinstall.png DS_Store} : $(PRJ)$/res$/$$(@:f)
+$(BIN)$/{osxdndinstall.png DS_Store DS_Store_Langpack} : $(PRJ)$/res$/$$(@:f)
     @$(COPY) $< $@
 
 hack_msitemplates .PHONY:
diff --git a/instsetoo_native/util/pack.lst b/instsetoo_native/util/pack.lst
index 4b7f195..200bf37 100755
--- a/instsetoo_native/util/pack.lst
+++ b/instsetoo_native/util/pack.lst
@@ -17,8 +17,8 @@ OpenOffice_Dev  unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxmacxi.pr
 #OpenOffice_SDK  unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxlngi6,unxmacxi,unxsoli4,unxsols4,wntmsci12  en-US   sdkoo
 OpenOffice_Dev_SDK  unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxlngi6,unxmacxi,unxsoli4,unxsols4,wntmsci12  en-US   sdkoodev
 #URE             unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngi6,unxsoli4,unxsols4,wntmsci12  en-US   ure
-OpenOfficeLanguagepack   unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro        de      ooolanguagepack
-OpenOfficeLanguagepack   unxlngi6,unxsoli4,unxsols4,wntmsci12                                     de      ooolanguagepack
+OpenOfficeLanguagepack   unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxmacxi.pro    de      ooolanguagepack
+OpenOfficeLanguagepack   unxlngi6,unxsoli4,unxsols4,wntmsci12,unxmacxi                                     de      ooolanguagepack
 OpenOfficeDevLanguagepack   unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro     de|fr|ja|ar   ooodevlanguagepack
 #BrOfficeLanguagepack     unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro        pt-BR   broolanguagepack
 
diff --git a/scp2/source/ooo/directory_ooo_macosx.scp b/scp2/source/ooo/directory_ooo_macosx.scp
index 409afc0..6bff77e 100755
--- a/scp2/source/ooo/directory_ooo_macosx.scp
+++ b/scp2/source/ooo/directory_ooo_macosx.scp
@@ -34,6 +34,8 @@
 Directory gid_Dir_Bundle
     ParentID = PD_PROGDIR;
     HostName = "%PRODUCTNAME.app";
+    LangPackHostName = "%PRODUCTNAME %PRODUCTVERSION Language Pack.app";
+    PatchHostName = "%PRODUCTNAME %PRODUCTVERSION Patch.app";
 End
 #endif
 
diff --git a/scp2/source/ooo/scpaction_ooo.scp b/scp2/source/ooo/scpaction_ooo.scp
index 76ea41e..f887374 100644
--- a/scp2/source/ooo/scpaction_ooo.scp
+++ b/scp2/source/ooo/scpaction_ooo.scp
@@ -370,8 +370,10 @@ End
 
 ScpAction scp_Copy_Ds_Store
     Copy = "DS_Store";
+    LangPackCopy = "DS_Store_Langpack";
+    PatchCopy = "DS_Store_Patch";
     Name = ".DS_Store";
     UnixRights = 444;
-    Styles = ();
+    Styles = (FORCELANGUAGEPACK);
 End
 #endif
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 1de4821..a79ae26 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -408,8 +408,12 @@ installer::logger::print_message( "... analyzing directories ... \n" );
 my $dirsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Directory");
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1.log", $dirsinproductarrayref); }
 
-if ( $allvariableshashref->{'SHIFT_BASIS_INTO_BRAND_LAYER'} ) { $dirsinproductarrayref = installer::scriptitems::shift_basis_directory_parents($dirsinproductarrayref); }
+if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_hostname($dirsinproductarrayref); }
+if ( $installer::globals::patch ) { installer::scriptitems::use_patch_hostname($dirsinproductarrayref); }
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1a.log", $dirsinproductarrayref); }
+
+if ( $allvariableshashref->{'SHIFT_BASIS_INTO_BRAND_LAYER'} ) { $dirsinproductarrayref = installer::scriptitems::shift_basis_directory_parents($dirsinproductarrayref); }
+if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1b.log", $dirsinproductarrayref); }
 if ( $allvariableshashref->{'OFFICEDIRECTORYNAME'} ) { installer::scriptitems::set_officedirectory_name($dirsinproductarrayref, $allvariableshashref->{'OFFICEDIRECTORYNAME'}); }
 if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1b.log", $dirsinproductarrayref); }
 
@@ -472,6 +476,10 @@ if (( ! $allvariableshashref->{'XPDINSTALLER'} ) || ( ! $installer::globals::isx
     if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1a.log", $scpactionsinproductarrayref); }
 }
 
+if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_copy_scpaction($scpactionsinproductarrayref); }
+if ( $installer::globals::patch ) { installer::scriptitems::use_patch_copy_scpaction($scpactionsinproductarrayref); }
+if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1b.log", $scpactionsinproductarrayref); }
+
 # $scpactionsinproductarrayref = installer::scriptitems::remove_scpactions_without_name($scpactionsinproductarrayref);
 # if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions2.log", $scpactionsinproductarrayref); }
 
@@ -1008,7 +1016,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
     my $profilesinproductlanguageresolvedarrayref;
     my $profileitemsinproductlanguageresolvedarrayref;
 
-    if ((!($installer::globals::is_copy_only_project)) && (!($installer::globals::product =~ /ada/i )))
+    if ((!($installer::globals::is_copy_only_project)) && (!($installer::globals::product =~ /ada/i )) && (!($installer::globals::languagepack)))
     {
         installer::logger::print_message( "... creating profiles ...\n" );
 
@@ -1363,7 +1371,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
             # try it again later.
             ####################################################
 
-            if (( $installer::globals::patch ) || ( $installer::globals::languagepack ) || ( $installer::globals::packageformat eq "native" )) { $allvariableshashref->{'POOLPRODUCT'} = 0; }
+            if (( $installer::globals::patch ) || ( $installer::globals::languagepack ) || ( $installer::globals::packageformat eq "native" ) || ( $installer::globals::packageformat eq "osx" )) { $allvariableshashref->{'POOLPRODUCT'} = 0; }
 
             if ( $allvariableshashref->{'POOLPRODUCT'} )
             {
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 19eaaf7..0b8d2f1 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -134,6 +134,7 @@ BEGIN
     $issolarissparcbuild = 0;
     $issolarisx86build = 0;
     $isfreebsdpkgbuild = 0;
+    $ismacdmgbuild = 0;
     $unpackpath = "";
     $idttemplatepath = "";
     $idtlanguagepath = "";
@@ -448,6 +449,7 @@ BEGIN
     @featurecollector =();
     $msiassemblyfiles = "";
     $nsisfilename = "Nsis";
+    $macinstallfilename = "macinstall.ulf";
     $nsis204 = 0;
     $nsis231 = 0;
     $unicodensis = 0;
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index 4109a6b..a0fc5cc 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -293,6 +293,15 @@ sub setglobalvariables
             $installer::globals::isxpdplatform = 1;
         }
     }
+
+    if ( $installer::globals::compiler =~ /unxmacxi/ )
+    {
+        if ( $installer::globals::packageformat eq "dmg" )
+        {
+            $installer::globals::ismacdmgbuild = 1;
+        }
+    }
+
     if ( $installer::globals::compiler =~ /unxfbsd/ )
     {
         if ( $installer::globals::packageformat eq "bsd" )
@@ -537,7 +546,7 @@ sub control_required_parameter
     # for Solaris packages and Linux
     #######################################
 
-    if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::islinuxrpmbuild ) && ( ! $installer::globals::islinuxdebbuild ) && ( ! $installer::globals::iswindowsbuild ))
+    if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::islinuxrpmbuild ) && ( ! $installer::globals::islinuxdebbuild ) && ( ! $installer::globals::iswindowsbuild ) && ( ! $installer::globals::ismacdmgbuild ))
     {
         installer::logger::print_error( "Sorry, Patch flag currently only available for Solaris pkg, Linux RPM and Windows builds!" );
         usage();
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 0bf2333..25c016e 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -591,6 +591,66 @@ sub get_children
 }
 
 ################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_langpack_hostname
+{
+    my ($dirsref) = @_;
+
+    for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
+    {
+        my $onedir = ${$dirsref}[$i];
+        if (( $onedir->{'LangPackHostName'} ) && ( $onedir->{'LangPackHostName'} ne "" )) { $onedir->{'HostName'} = $onedir->{'LangPackHostName'}; }
+    }	
+}
+
+################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_patch_hostname
+{
+    my ($dirsref) = @_;
+
+    for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
+    {
+        my $onedir = ${$dirsref}[$i];
+        if (( $onedir->{'PatchHostName'} ) && ( $onedir->{'PatchHostName'} ne "" )) { $onedir->{'HostName'} = $onedir->{'PatchHostName'}; }
+    }	
+}
+
+################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_langpack_copy_scpaction
+{
+    my ($scpactionsref) = @_;
+
+    for ( my $i = 0; $i <= $#{$scpactionsref}; $i++ )
+    {
+        my $onescpaction = ${$scpactionsref}[$i];
+        if (( $onescpaction->{'LangPackCopy'} ) && ( $onescpaction->{'LangPackCopy'} ne "" )) { $onescpaction->{'Copy'} = $onescpaction->{'LangPackCopy'}; }
+    }	
+}
+
+################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_patch_copy_scpaction
+{
+    my ($scpactionsref) = @_;
+
+    for ( my $i = 0; $i <= $#{$scpactionsref}; $i++ )
+    {
+        my $onescpaction = ${$scpactionsref}[$i];
+        if (( $onescpaction->{'PatchCopy'} ) && ( $onescpaction->{'PatchCopy'} ne "" )) { $onescpaction->{'Copy'} = $onescpaction->{'PatchCopy'}; }
+    }	
+}
+
+################################################################################
 # Shifting parent directories of URE and Basis layer, so that
 # these directories are located below the Brand layer.
 # Style: SHIFT_BASIS_INTO_BRAND_LAYER
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index cab2e48..ef28711 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -181,6 +181,180 @@ sub register_extensions
     chdir($from);
 }
 
+########################################################################
+# Getting the translation file for the Mac Language Pack installer
+########################################################################
+
+sub get_mac_translation_file
+{
+    my $translationfilename = $installer::globals::maclangpackfilename;
+    # my $translationfilename = $installer::globals::idtlanguagepath . $installer::globals::separator . $installer::globals::maclangpackfilename;
+    # if ( $installer::globals::unicodensis ) { $translationfilename = $translationfilename . ".uulf"; }
+    # else { $translationfilename = $translationfilename . ".mlf"; }
+    if ( ! -f $translationfilename ) { installer::exiter::exit_program("ERROR: Could not find language file $translationfilename!", "get_mac_translation_file"); }
+    my $translationfile = installer::files::read_file($translationfilename);
+
+    my $infoline = "Reading translation file: $translationfilename\n";
+    push( @installer::globals::logfileinfo, $infoline);
+    
+    return $translationfile;
+}
+
+##################################################################
+# Collecting all identifier from ulf file 
+##################################################################
+
+sub get_identifier
+{
+    my ( $translationfile ) = @_;
+    
+    my @identifier = ();
+    
+    for ( my $i = 0; $i <= $#{$translationfile}; $i++ )
+    {
+        my $oneline = ${$translationfile}[$i];
+
+        if ( $oneline =~ /^\s*\[(.+)\]\s*$/ )
+        {
+            my $identifier = $1;
+            push(@identifier, $identifier);
+        }
+    }
+
+    return \@identifier;
+}
+
+##############################################################
+# Returning the complete block in all languages
+# for a specified string
+##############################################################
+
+sub get_language_block_from_language_file
+{
+    my ($searchstring, $languagefile) = @_;
+
+    my @language_block = ();
+
+    for ( my $i = 0; $i <= $#{$languagefile}; $i++ )
+    {		
+        if ( ${$languagefile}[$i] =~ /^\s*\[\s*$searchstring\s*\]\s*$/ )
+        {
+            my $counter = $i;
+
+            push(@language_block, ${$languagefile}[$counter]);
+            $counter++;
+            
+            while (( $counter <= $#{$languagefile} ) && (!( ${$languagefile}[$counter] =~ /^\s*\[/ )))
+            {
+                push(@language_block, ${$languagefile}[$counter]);
+                $counter++;
+            }
+            
+            last;
+        }
+    }	
+    
+    return \@language_block;
+}
+
+##############################################################
+# Returning a specific language string from the block
+# of all translations
+##############################################################
+
+sub get_language_string_from_language_block
+{
+    my ($language_block, $language) = @_;
+    
+    my $newstring = "";
+
+    for ( my $i = 0; $i <= $#{$language_block}; $i++ )
+    {
+        if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
+        {
+            $newstring = $1;
+            last;
+        }	
+    }	
+    
+    if ( $newstring eq "" )
+    {
+        $language = "en-US"; 	# defaulting to english	
+
+        for ( my $i = 0; $i <= $#{$language_block}; $i++ )
+        {		
+            if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
+            {
+                $newstring = $1;
+                last;
+            }
+        }
+    }
+    
+    return $newstring;
+}
+
+########################################################################
+# Localizing the script for the Mac Language Pack installer
+########################################################################
+
+sub localize_scriptfile
+{
+    my ($scriptfile, $translationfile, $languagestringref) = @_;
+    
+    # my $translationfile = get_mac_translation_file();
+    
+    my $onelanguage = $$languagestringref;
+    if ( $onelanguage =~ /^\s*(.*?)_/ ) { $onelanguage = $1; } 
+    
+    # Analyzing the ulf file, collecting all Identifier
+    my $allidentifier = get_identifier($translationfile);
+
+    for ( my $i = 0; $i <= $#{$allidentifier}; $i++ )
+    {
+        my $identifier = ${$allidentifier}[$i];
+        my $language_block = get_language_block_from_language_file($identifier, $translationfile);
+        my $newstring = get_language_string_from_language_block($language_block, $onelanguage);
+        
+        # removing mask
+        $newstring =~ s/\\\'/\'/g;
+        
+        replace_one_variable_in_shellscript($scriptfile, $newstring, $identifier);
+    }
+}
+
+#################################################################################
+# Replacing one variable in Mac shell script
+#################################################################################
+
+sub replace_one_variable_in_shellscript
+{
+    my ($scriptfile, $variable, $searchstring) = @_;
+    
+    for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
+    {
+        ${$scriptfile}[$i] =~ s/\[$searchstring\]/$variable/g;
+    }	
+}
+
+#############################################
+# Replacing variables in Mac shell script
+#############################################
+
+sub replace_variables_in_scriptfile
+{
+    my ($scriptfile, $volume_name, $allvariables) = @_;
+    
+    replace_one_variable_in_shellscript($scriptfile, $volume_name, "FULLPRODUCTNAME" );
+    replace_one_variable_in_shellscript($scriptfile, $allvariables->{'PRODUCTNAME'}, "PRODUCTNAME" );
+    replace_one_variable_in_shellscript($scriptfile, $allvariables->{'PRODUCTVERSION'}, "PRODUCTVERSION" );
+    
+    my $scriptname = lc($allvariables->{'PRODUCTNAME'}) . "\.script";
+    if ( $allvariables->{'PRODUCTNAME'} eq "OpenOffice.org" ) { $scriptname = "org.openoffice.script"; }
+
+    replace_one_variable_in_shellscript($scriptfile, $scriptname, "SEARCHSCRIPTNAME" );
+}
+
 #############################################
 # Creating the "simple" package.
 # "zip" for Windows
@@ -190,7 +364,7 @@ sub register_extensions
 
 sub create_package
 {
-    my ( $installdir, $packagename, $allvariables, $includepatharrayref ) = @_;
+    my ( $installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref ) = @_;
     
     # moving dir into temporary directory
     my $pid = $$; # process id
@@ -232,13 +406,121 @@ sub create_package
         $volume_name = $volume_name . ' ' . $allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'};
         if ( $allvariables->{'DMG_VOLUMEEXTENSION'} ) {
             $volume_name = $volume_name . ' ' . $allvariables->{'DMG_VOLUMEEXTENSION'};
-        }		
+        }
 
         my $sla = 'sla.r';
         my $ref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0);
+
+        my $localtempdir = $tempdir;
+        
+        if (( $installer::globals::languagepack ) || ( $installer::globals::patch ))
+        {
+            $localtempdir = "$tempdir/$packagename";
+            if ( $installer::globals::languagepack ) { $volume_name = "$volume_name Language Pack"; }
+            if ( $installer::globals::patch ) { $volume_name = "$volume_name Patch"; }
+            
+            # Create tar ball named tarball.tar.bz2
+            my $appfolder = $localtempdir . "/" . $volume_name . "\.app";
+            my $contentsfolder = $appfolder . "/Contents";
+            my $tarballname = "tarball.tar.bz2";
+            
+            my $localfrom = cwd();
+            chdir $appfolder;
+
+            $systemcall = "tar -cjf $tarballname Contents/";
+
+            print "... $systemcall ...\n";
+            my $localreturnvalue = system($systemcall);
+            $infoline = "Systemcall: $systemcall\n";
+            push( @installer::globals::logfileinfo, $infoline);
+        
+            if ($localreturnvalue)
+            {
+                $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+                push( @installer::globals::logfileinfo, $infoline);	
+            }
+            else
+            {
+                $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+                push( @installer::globals::logfileinfo, $infoline);
+            }
             
-        $systemcall = "cd $tempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name \"$volume_name\" -ov -o $installdir/tmp && hdiutil convert -ov -format UDZO $installdir/tmp.dmg -o $archive && ";
-                if ($$ref ne "") {
+            my $sourcefile = $appfolder . "/" . $tarballname;
+            my $destfile = $contentsfolder . "/" . $tarballname;
+            
+            installer::systemactions::remove_complete_directory($contentsfolder);
+            installer::systemactions::create_directory($contentsfolder);
+
+            installer::systemactions::copy_one_file($sourcefile, $destfile);
+            unlink($sourcefile);
+            
+            # Copy two files into installation set next to the tar ball
+            # 1. "osx_install.applescript"
+            # 2 "OpenOffice.org Languagepack"
+            
+            my $scriptrealfilename = "osx_install.applescript";
+            my $scriptfilename = "";
+            if ( $installer::globals::languagepack ) { $scriptfilename = "osx_install_languagepack.applescript"; }
+            if ( $installer::globals::patch ) { $scriptfilename = "osx_install_patch.applescript"; }
+            my $scripthelpersolverfilename = "mac_install.script";
+            my $scripthelperrealfilename = $volume_name;
+            my $translationfilename = $installer::globals::macinstallfilename;
+
+            # Finding both files in solver
+            
+            my $scriptref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$scriptfilename, $includepatharrayref, 0);
+            if ($$scriptref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script $scriptfilename!", "create_package"); }
+            my $scripthelperref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$scripthelpersolverfilename, $includepatharrayref, 0);
+            if ($$scripthelperref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script $scripthelpersolverfilename!", "create_package"); }
+            my $translationfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$translationfilename, $includepatharrayref, 0);
+            if ($$translationfileref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script translation file $translationfilename!", "create_package"); }
+                        
+            $scriptfilename = $contentsfolder . "/" . $scriptrealfilename;
+            $scripthelperrealfilename = $contentsfolder . "/" . $scripthelperrealfilename;
+
+            installer::systemactions::copy_one_file($$scriptref, $scriptfilename);
+            installer::systemactions::copy_one_file($$scripthelperref, $scripthelperrealfilename);
+
+            # Replacing variables in script $scriptfilename
+            # Localizing script $scriptfilename
+            my $scriptfilecontent = installer::files::read_file($scriptfilename);
+            my $translationfilecontent = installer::files::read_file($$translationfileref);
+            localize_scriptfile($scriptfilecontent, $translationfilecontent, $languagestringref);
+            replace_variables_in_scriptfile($scriptfilecontent, $volume_name, $allvariables);
+            installer::files::save_file($scriptfilename, $scriptfilecontent);
+
+            $systemcall = "chmod 775 " . "\"" . $scriptfilename . "\"";
+            system($systemcall);
+            $systemcall = "chmod 775 " . "\"" . $scripthelperrealfilename . "\"";
+            system($systemcall);
+
+            # Copy also Info.plist and icon file
+            # Finding both files in solver
+            my $iconfile = "ooo3_installer.icns";
+            my $iconfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$iconfile, $includepatharrayref, 0);
+            if ($$iconfileref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script icon file $iconfile!", "create_package"); }
+            my $subdir = $contentsfolder . "/" . "Resources";
+            if ( ! -d $subdir ) { installer::systemactions::create_directory($subdir); }
+            $destfile = $subdir . "/" . $iconfile;
+            installer::systemactions::copy_one_file($$iconfileref, $destfile);
+             
+            my $infoplistfile = "Info.plist.langpack";
+            my $installname = "Info.plist";
+            my $infoplistfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$infoplistfile, $includepatharrayref, 0);
+            if ($$infoplistfileref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script Info.plist: $infoplistfile!", "create_package"); }
+            $destfile = $contentsfolder . "/" . $installname;
+            installer::systemactions::copy_one_file($$infoplistfileref, $destfile);
+            
+            # Replacing variables in Info.plist
+            $scriptfilecontent = installer::files::read_file($destfile);
+            replace_one_variable_in_shellscript($scriptfilecontent, $volume_name, "FULLPRODUCTNAME" );
+            installer::files::save_file($destfile, $scriptfilecontent);
+            
+            chdir $localfrom;
+        }
+
+        $systemcall = "cd $localtempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name \"$volume_name\" -ov -o $installdir/tmp && hdiutil convert -ov -format UDZO $installdir/tmp.dmg -o $archive && ";
+        if ($$ref ne "") {
             $systemcall .= "hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive &&";
         }
         $systemcall .= "rm -f $installdir/tmp.dmg";
@@ -322,6 +604,8 @@ sub create_simple_package
         else
         {
             $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "downloadname");
+            if ( $installer::globals::languagepack ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "langpackdownloadname"); }
+            if ( $installer::globals::patch ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "patchdownloadname"); }
             $packagename = installer::download::resolve_variables_in_downloadname($allvariables, $$downloadname, \$locallanguage);
         }		
     }
@@ -374,6 +658,7 @@ sub create_simple_package
         my $onefile = ${$filesref}[$i];
 
         if (( $onefile->{'Styles'} ) && ( $onefile->{'Styles'} =~ /\bBINARYTABLE_ONLY\b/ )) { next; }
+        if (( $installer::globals::patch ) && ( $onefile->{'Styles'} ) && ( ! ( $onefile->{'Styles'} =~ /\bPATCH\b/ ))) { next; }
 
         my $source = $onefile->{'sourcepath'};
         my $destination = $onefile->{'destination'};
@@ -428,6 +713,9 @@ sub create_simple_package
     for ( my $i = 0; $i <= $#{$linksref}; $i++ )
     {
         my $onelink = ${$linksref}[$i];
+
+        if (( $installer::globals::patch ) && ( $onelink->{'Styles'} ) && ( ! ( $onelink->{'Styles'} =~ /\bPATCH\b/ ))) { next; }
+
         my $destination = $onelink->{'destination'};
         $destination = $subfolderdir . $installer::globals::separator . $destination;
         my $destinationfile = $onelink->{'destinationfile'};
@@ -442,6 +730,9 @@ sub create_simple_package
     for ( my $i = 0; $i <= $#{$unixlinksref}; $i++ )
     {
         my $onelink = ${$unixlinksref}[$i];
+
+        if (( $installer::globals::patch ) && ( $onelink->{'Styles'} ) && ( ! ( $onelink->{'Styles'} =~ /\bPATCH\b/ ))) { next; }
+
         my $target = $onelink->{'Target'};
         my $destination = $subfolderdir . $installer::globals::separator . $onelink->{'destination'};
     
@@ -485,7 +776,7 @@ sub create_simple_package
         # -> tar.gz for all other platforms
         installer::logger::print_message( "... creating $installer::globals::packageformat file ...\n" );
         installer::logger::include_header_into_logfile("Creating $installer::globals::packageformat file:");
-        create_package($installdir, $packagename, $allvariables, $includepatharrayref);
+        create_package($installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref);
     }
     
     # Analyzing the log file
commit 28d6705c59f53cb509ca8b528caa76ee3c3a7cee
Author: Vladimir Glazounov <vg at openoffice.org>
Date:   Wed Aug 26 06:36:38 2009 +0000

    CWS-TOOLING: integrate CWS mingwport22
    2009-08-19 16:18:46 +0200 tono  r275156 : i#103794: mingw gcc-4.4.0 port: make use of dwarf2 eh
    2009-08-05 12:27:41 +0200 tono  r274650 : CWS-TOOLING: rebase CWS mingwport22 to trunk at 274622 (milestone: DEV300:m54)
    2009-08-01 00:56:35 +0200 tono  r274552 : i#103795: mingw gcc-4.4.0 port: use gcc dll
    2009-07-27 00:13:27 +0200 tono  r274344 : i#103795: mingw gcc-4.4.0 port: use gcc dll
    2009-07-25 06:19:59 +0200 tono  r274332 : i#103803: mingw gcc-4.4.0 port: invalid "extern static"
    2009-07-25 06:13:56 +0200 tono  r274331 : i#103802: mingw gcc-4.4.0 port: inhibit use of pthread
    2009-07-25 06:05:22 +0200 tono  r274330 : i#103801: mingw gcc-4.4.0 port: specify relocatable data section
    2009-07-25 05:54:09 +0200 tono  r274329 : i#103800: mingw gcc-4.4.0 port: remove invalid scope
    2009-07-25 05:44:58 +0200 tono  r274328 : i#103799: mingw gcc-4.4.0 port: add some #include
    2009-07-25 05:33:09 +0200 tono  r274327 : i#103798: mingw gcc-4.4.0 port: add backward in include path
    2009-07-25 05:24:42 +0200 tono  r274326 : i#103797: mingw gcc-4.4.0 port: nooptimize c++-uno bridge
    2009-07-25 05:16:20 +0200 tono  r274325 : i#103795: mingw gcc-4.4.0 port: use gcc dll
    2009-07-25 04:01:59 +0200 tono  r274324 : i#103794: mingw gcc-4.4.0 port: make use of dwarf2 eh
    2009-07-25 02:44:01 +0200 tono  r274322 : i#103793: mingw port: Exclude msvc[pr]80.dll from packaging
    2009-07-25 02:28:21 +0200 tono  r274321 : i#103791: mingw port fix typo

diff --git a/configure b/configure
index 575c615..28516ec 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 at .* _libgcc\(.*\)_dll_iname at libgcc\1.dll at p' | uniq | sed -e 's at _@?@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 at .* _libstdc__\(.*\)_dll_iname at libstdc++\1.dll at p' | uniq | sed -e 's at _@?@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 5cb5c0f..d447e30 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 at .* _libgcc\(.*\)_dll_iname at libgcc\1.dll at p' | uniq | sed -e 's at _@?@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 at .* _libstdc__\(.*\)_dll_iname at libstdc++\1.dll at p' | uniq | sed -e 's at _@?@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 60ba107..8a3b0b4 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 6c81b0f..ceb6c8b 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 646196e..0d85cc5 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 9f4506b..1d7e0f2 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 190fd50..76ea41e 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 bc9629b..61887e1 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 22b0a57..39f4db5 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 e079995..318bb1e 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 1b293d4..06d4174 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 596ecf8..213cdbc 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 1888a6d..dc47714 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 d6846a0..efffc86 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 602dfcb..ff26f53 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 327e205..3940f4e 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 28c1656..9186ea9 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


More information about the ooo-build-commit mailing list