Apache OpenOffice (AOO) Bugzilla – Issue 34342
Solarisgccport: config_office patch
Last modified: 2005-02-13 08:53:17 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
Created attachment 17786 [details] configure.in GNU ld patch
Created attachment 17787 [details] set_soenv.in Envfile patch
Confirmed.
reassigned.
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?
> 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.
Created attachment 18451 [details] set_soenv.in patch 2
Thanks. I have also changed set_soenv.in's case for non-gcc back to SolarisIntelEnv.Set. Fixed in solarisgcc01.
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?
.
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 ;)
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....
rene: agreed. Lets do this in different cws.
VERIFIED. Thanks.
closed