Author: hdu
Date: Thu Dec 5 08:24:26 2013
New Revision: 1548037
URL: http://svn.apache.org/r1548037
Log:
#i123808# support alternative build tool locations on Mac
by setting the CC_PATH variable the compatibility of
build tools with the active compiler can be enforced
Modified:
openoffice/trunk/main/solenv/bin/deliver.pl
openoffice/trunk/main/solenv/bin/macosx-change-install-names.pl
openoffice/trunk/main/solenv/bin/macosx-dylib-link-list.pl
openoffice/trunk/main/solenv/bin/modules/macosxotoolhelper.pm
openoffice/trunk/main/solenv/inc/_tg_app.mk
openoffice/trunk/main/solenv/inc/tg_app.mk
Modified: openoffice/trunk/main/solenv/bin/deliver.pl
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/deliver.pl?rev=1548037&r1=1548036&r2=1548037&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/deliver.pl (original)
+++ openoffice/trunk/main/solenv/bin/deliver.pl Thu Dec 5 08:24:26 2013
@@ -136,6 +136,7 @@ use sigtrap 'handler' => \&cleanup_and_d
#### main ####
parse_options();
+init_globals();
print "$script_name -- version: $script_rev\n" if !$opt_silent;
@@ -149,7 +150,6 @@ if ( ! $opt_delete ) {
}
}
-init_globals();
push_default_actions();
parse_dlst();
check_dlst() if $opt_checkdlst;
@@ -463,7 +463,9 @@ sub init_globals
my $updminor = $ENV{'UPDMINOR'};
my $updminorext = $ENV{'UPDMINOREXT'};
my $work_stamp = $ENV{'WORK_STAMP'};
-
+
+ $::CC_PATH=(fileparse( $ENV{"CC"}))[1];
+
# special security check for release engineers
if ( defined($updater) && !defined($build_sosl) && !$opt_force) {
my $path = getcwd();
@@ -735,8 +737,9 @@ sub is_unstripped {
sub initialize_strip {
if ((!defined $ENV{DISABLE_STRIP}) || ($ENV{DISABLE_STRIP} eq "")) {
$strip .= 'guw ' if ($^O eq 'cygwin');
+ $strip .= $::CC_PATH if (-e $::CC_PATH.'/strip');
$strip .= 'strip';
- $strip .= " -x" if ($ENV{OS} eq 'MACOSX');
+ $strip .= " -x" if ($ENV{OS} eq 'MACOSX');
$strip .= " -R '.comment' -s" if ($ENV{OS} eq 'LINUX');
};
};
Modified: openoffice/trunk/main/solenv/bin/macosx-change-install-names.pl
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/macosx-change-install-names.pl?rev=1548037&r1=1548036&r2=1548037&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/macosx-change-install-names.pl (original)
+++ openoffice/trunk/main/solenv/bin/macosx-change-install-names.pl Thu Dec 5
08:24:26 2013
@@ -106,7 +106,7 @@ if ($type eq "extshl")
{
foreach $file (@ARGV)
{
- my $call = "install_name_tool$change -id
\@loader_path/$inames{$file} $file";
+ my $call = "${::CC_PATH}install_name_tool$change -id
\@loader_path/$inames{$file} $file";
system($call) == 0 or die "cannot $call";
}
}
@@ -114,14 +114,14 @@ if ($type eq "extshl")
{
foreach $file (@ARGV)
{
- my $call = "install_name_tool$change -id
\@__________________________________________________$loc/$inames{$file} $file";
+ my $call = "${::CC_PATH}install_name_tool$change -id
\@__________________________________________________$loc/$inames{$file} $file";
system($call) == 0 or die "cannot $call";
}
}
}
foreach $file (@ARGV)
{
- my $call = "otool -L $file";
+ my $call = "${::CC_PATH}otool -L $file";
open(IN, "-|", $call) or die "cannot $call";
my $change = "";
while (<IN>)
@@ -132,7 +132,7 @@ foreach $file (@ARGV)
close(IN);
if ($change ne "")
{
- $call = "install_name_tool$change $file";
+ $call = "${::CC_PATH}install_name_tool$change $file";
system($call) == 0 or die "cannot $call";
}
}
Modified: openoffice/trunk/main/solenv/bin/macosx-dylib-link-list.pl
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/macosx-dylib-link-list.pl?rev=1548037&r1=1548036&r2=1548037&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/macosx-dylib-link-list.pl (original)
+++ openoffice/trunk/main/solenv/bin/macosx-dylib-link-list.pl Thu Dec 5
08:24:26 2013
@@ -64,7 +64,7 @@ foreach (@ARGV)
}
foreach $file (@todo)
{
- my $call = "otool -L $file";
+ my $call = "${::CC_PATH}otool -L $file";
open(IN, "-|", $call) or die "cannot $call";
while (<IN>)
{
Modified: openoffice/trunk/main/solenv/bin/modules/macosxotoolhelper.pm
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/macosxotoolhelper.pm?rev=1548037&r1=1548036&r2=1548037&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/macosxotoolhelper.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/macosxotoolhelper.pm Thu Dec 5
08:24:26 2013
@@ -26,6 +26,9 @@ require Exporter;
our @ISA = Exporter;
our @EXPORT = otoolD;
+use File::Basename;
+$::CC_PATH=(fileparse( $ENV{"CC"}))[1];
+
sub otoolD($) {
my ($file) = @_;
my $call = "otool -D $file";
@@ -39,3 +42,4 @@ sub otoolD($) {
close(IN);
return $line;
}
+
Modified: openoffice/trunk/main/solenv/inc/_tg_app.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/_tg_app.mk?rev=1548037&r1=1548036&r2=1548037&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/inc/_tg_app.mk (original)
+++ openoffice/trunk/main/solenv/inc/_tg_app.mk Thu Dec 5 08:24:26 2013
@@ -18,6 +18,9 @@
# under the License.
#
# *************************************************************
+
+CC_PATH*=""
+
# unroll begin
.IF "$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
@@ -117,8 +120,8 @@ $(APP1TARGETN): $(APP1OBJS) $(APP1LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_1.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP1RPATH) $@
@@ -377,8 +380,8 @@ $(APP2TARGETN): $(APP2OBJS) $(APP2LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_2.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP2RPATH) $@
@@ -637,8 +640,8 @@ $(APP3TARGETN): $(APP3OBJS) $(APP3LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_3.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP3RPATH) $@
@@ -897,8 +900,8 @@ $(APP4TARGETN): $(APP4OBJS) $(APP4LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_4.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP4RPATH) $@
@@ -1157,8 +1160,8 @@ $(APP5TARGETN): $(APP5OBJS) $(APP5LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_5.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP5RPATH) $@
@@ -1417,8 +1420,8 @@ $(APP6TARGETN): $(APP6OBJS) $(APP6LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_6.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP6RPATH) $@
@@ -1677,8 +1680,8 @@ $(APP7TARGETN): $(APP7OBJS) $(APP7LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_7.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP7RPATH) $@
@@ -1937,8 +1940,8 @@ $(APP8TARGETN): $(APP8OBJS) $(APP8LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_8.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP8RPATH) $@
@@ -2197,8 +2200,8 @@ $(APP9TARGETN): $(APP9OBJS) $(APP9LIBS)
@+source $(MISC)/$(TARGET).$(@:b)_9.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP9RPATH) $@
@@ -2457,8 +2460,8 @@ $(APP10TARGETN): $(APP10OBJS) $(APP10LIB
@+source $(MISC)/$(TARGET).$(@:b)_10.cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP10RPATH) $@
Modified: openoffice/trunk/main/solenv/inc/tg_app.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/tg_app.mk?rev=1548037&r1=1548036&r2=1548037&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/inc/tg_app.mk (original)
+++ openoffice/trunk/main/solenv/inc/tg_app.mk Thu Dec 5 08:24:26 2013
@@ -19,7 +19,7 @@
#
#**************************************************************
-
+CC_PATH*=""
#######################################################
# instructions for linking
@@ -122,8 +122,8 @@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(
@+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd
# Need to strip __objcInit symbol to avoid duplicate symbols when loading
# libraries at runtime
- @-nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x
'__objcInit' > $(MISC)/$(@:b).strip
- @strip -i -R $(MISC)/$(@:b).strip -X $@
+ @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F
-x '__objcInit' > $(MISC)/$(@:b).strip
+ @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@
@ls -l $@
@$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
app $(APP$(TNR)RPATH) $@