Issue 34342 - Solarisgccport: config_office patch
Summary: Solarisgccport: config_office patch
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 680m54
Hardware: PC Solaris
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: taniguchi
QA Contact: issues@porting
URL:
Keywords:
Depends on: 34341
Blocks:
  Show dependency tree
 
Reported: 2004-09-18 16:46 UTC by taniguchi
Modified: 2005-02-13 08:53 UTC (History)
4 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
configure.in GNU ld patch (919 bytes, patch)
2004-09-18 16:46 UTC, taniguchi
no flags Details | Diff
set_soenv.in Envfile patch (3.58 KB, patch)
2004-09-18 16:47 UTC, taniguchi
no flags Details | Diff
set_soenv.in patch 2 (3.27 KB, patch)
2004-10-16 16:02 UTC, taniguchi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description taniguchi 2004-09-18 16:46:14 UTC
This issue is related #i34341#.

These patches add some entities to config_office/configure.in and
config_office/set_soenv.in for Solaris gcc compilation.

config_office_configure.in-solarisgccldcheck.patch:
    Because GCC C++ ABI and Sun C ABI are different, it is necessary to use
    GNU ld to compile OOo with gcc on Solaris.

    This patch adds the code that checks whether GNU ld is used
     to configure.in.


config_office_set_soenv.in-addsolarisgcc.patch:
     This patch adds the code to output SolarisSparcGccEnv.Set 
     and SolarisIntelGccEnv.Set to set_soenv.in
Comment 1 taniguchi 2004-09-18 16:46:45 UTC
Created attachment 17786 [details]
configure.in GNU ld patch
Comment 2 taniguchi 2004-09-18 16:47:23 UTC
Created attachment 17787 [details]
set_soenv.in Envfile patch
Comment 3 pavel 2004-09-18 22:34:49 UTC
Confirmed.
Comment 4 Martin Hollmichel 2004-10-11 16:54:13 UTC
reassigned.
Comment 5 pavel 2004-10-11 22:53:15 UTC
Could you please change this:

 if ($platform eq "$Solaris")
 {
-$SOLARINC            .= '/SC5 ';
+    if ($CC !=~ "gcc") {
+        $SOLARINC            .= '/SC5 ';
+    }
 }

to be one if ( condition1 and  condition2)? It will be synoptical.

The last hunk contains:

 # Platform dependent include path at the top of this list of include paths
 if ($platform eq "$Solaris")
-{   my $temp;
-    $temp =~ s:$COMPATH:/bin\$:;
-    $SOLARINC         .= $I.$temp.$ds."include";
+{
+        my $temp;
+        $temp =~ s:$COMPATH:/bin\$:;
+        $SOLARINC         .= $I.$temp.$ds."include";
 }

what is the change here? It is only whitespacing, no?
Comment 6 taniguchi 2004-10-16 16:01:25 UTC
> Could you please change this:
snip
> to be one if ( condition1 and  condition2)? It will be synoptical.

Changed.

@@ -1180,7 +1203,7 @@
 # This simply adds an include path, so even cases that break the FHS work
 $SOLARINC            .= $STLPORT_inc_stlport;
 }
-if ($platform eq "$Solaris")
+if ($platform eq "$Solaris" && $CC !=~ "gcc")
 {
 $SOLARINC            .= '/SC5 ';
 }



> what is the change here? It is only whitespacing, no?

It is only for whitespacing. I removed this part.
Comment 7 taniguchi 2004-10-16 16:02:07 UTC
Created attachment 18451 [details]
set_soenv.in patch 2
Comment 8 pavel 2004-12-11 13:21:43 UTC
Thanks.

I have also changed set_soenv.in's case for non-gcc back to SolarisIntelEnv.Set.

Fixed in solarisgcc01.
Comment 9 pavel 2004-12-14 13:25:13 UTC
reopening.

Can you please check if/how can we use AC_PROG_LD for this?

This is from IRC chat with rene:

<_rene_> paveljanik: why didn't you use AC_PROG_LD for your ld check? ;)
<_rene_> checking for ld used by gcc... /usr/i586-suse-linux/bin/ld
<_rene_> checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes

Can we fail if ld is non-GNU here?
Comment 10 pavel 2004-12-14 13:25:48 UTC
.
Comment 11 rene 2004-12-14 14:00:18 UTC
Hi, 
 
I just did some quick experiments wrt that: 
 
I added AC_PROG_LD at (for testing) at the beginning of configure.in and tried 
it on a Solaris box I have an account on: 
 
checking build system type... sparc-sun-solaris2.9 
checking host system type... sparc-sun-solaris2.9 
checking for egrep... egrep 
checking for ld used by gcc... /usr/ccs/bin/ld 
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no 
 
works as expected. The check seems to just run ld, though. 
 
Specifiying --with-gnu-ld makes it assume having GNU ld, but that's not what we 
want ;) -- it doesn't seem to take an argument, at least 
--with-gnu-ld=/app/unido-inf/sun4_58/binutils/2.9.1/bin/ld didn't work. 
 
What did work was: 
 
setenv LD "/app/unido-inf/sun4_58/binutils/2.9.1/bin/ld"; ./configure 
[...] 
checking for ld used by gcc... /app/unido-inf/sun4_58/binutils/2.9.1/bin/ld 
checking if the linker(/app/unido-inf/sun4_58/binutils/2.9.1/bin/ld) is GNU 
ld... yes 
 
so we probably need to set LD to the right value which should be specified by 
a configure flag (as far as I can see the argument to $with_gnu_ld can be 
used ) 
 
Checking for it then is easy since you could just check one variable since 
configure does the following: 
 
case `$LD -v 2>&1 </dev/null` in 
*GNU* | *'with BFD'*) 
  lt_cv_prog_gnu_ld=yes 
  ;; 
*) 
  lt_cv_prog_gnu_ld=no 
  ;; 
esac 
 
What I however did notice now is that this macro depends on the 
AC_CANONICAL_HOST / _BUILD macros (the two first lines in the first snippet) 
which need config.sub/config.guess in the tree to work (prerequiesites for 
the . And install.sh, but this could be solved by simply touch'ing it ;-) 
Anyway, I plan to change configure to use those macros anyhow, so.. ;-) 
 
Regards, 
 
Rene 
 
P.S: Why did I propose this? I think using ready, working macros already 
provided by autoconf is better than reinventing the wheel ;) 
Comment 12 rene 2004-12-14 15:00:35 UTC
what I forgot to mention: since it needs some framework around it 
(AC_CANONICAL_* / config.*) it probably shouldn't be done in the solarisgcc01 
cws but in the cws where I do introduce AC_CANONCAL_* anyway.... 
Comment 13 pavel 2004-12-14 21:51:56 UTC
rene: agreed. Lets do this in different cws.
Comment 14 taniguchi 2005-01-16 15:04:14 UTC
VERIFIED.
Thanks.
Comment 15 taniguchi 2005-02-13 08:53:17 UTC
closed