Issue 12442 - Clean up of configure - create a symbols switch
Summary: Clean up of configure - create a symbols switch
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: 644
Hardware: PC All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: foskey
QA Contact: issues@tools
URL:
Keywords:
Depends on: 14472
Blocks:
  Show dependency tree
 
Reported: 2003-03-18 13:45 UTC by foskey
Modified: 2013-08-07 15:35 UTC (History)
4 users (show)

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


Attachments
patch file for config_office. (42.98 KB, patch)
2003-03-18 13:46 UTC, foskey
no flags Details | Diff
remove rtti and -g from makefile now done in configure. (1.22 KB, patch)
2003-03-18 13:50 UTC, foskey
no flags Details | Diff
finally a reduction of cuft in settings.mk (627 bytes, patch)
2003-03-18 13:54 UTC, foskey
no flags Details | Diff
this patch allows -fno-rtti to be left on in gcc 3.2 (2.11 KB, patch)
2003-03-27 20:30 UTC, foskey
no flags Details | Diff
Configure clean up - new descriptions, remove rtti option change (19.23 KB, patch)
2003-03-28 12:10 UTC, foskey
no flags Details | Diff
original patch minus the no-rtti removal. (1.78 KB, patch)
2003-03-28 12:12 UTC, foskey
no flags Details | Diff
Once more without the windows regression. (30.58 KB, patch)
2003-03-28 22:22 UTC, foskey
no flags Details | Diff
Include a symbols switch and more errors if program not found. (24.79 KB, patch)
2003-03-31 14:47 UTC, foskey
no flags Details | Diff
Patch to enable symbols switch for gcc and MSVC (3.37 KB, patch)
2003-04-12 12:55 UTC, quetschke
no flags Details | Diff
2nd try. Patch to enable symbols switch for gcc and MSVC (3.38 KB, patch)
2003-04-12 13:12 UTC, quetschke
no flags Details | Diff
Start AIX and fix bug where it does not show perl version checked. (833 bytes, patch)
2003-04-19 08:43 UTC, foskey
no flags Details | Diff
handle system not setup yet, remove USE_SHELL and tidy the comment variable. (8.92 KB, patch)
2003-04-19 08:57 UTC, foskey
no flags Details | Diff
Major upgrade. based on 0412 branch. AIX aware, format upgrades. (38.11 KB, patch)
2003-04-19 13:31 UTC, foskey
no flags Details | Diff
Patch for solenv/inc/wnt.mk (856 bytes, patch)
2003-04-19 16:03 UTC, quetschke
no flags Details | Diff
Patch for solenv/inc/wnt.mk (856 bytes, patch)
2003-04-19 16:07 UTC, quetschke
no flags Details | Diff
Backout patch for setup2 to compile on most platforms. (2.83 KB, patch)
2003-06-06 13:31 UTC, foskey
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description foskey 2003-03-18 13:45:33 UTC
The current build process has two major errors:

a)  gcc 3.2 needs no-rtti removed.
b)  The size of the build has tripled.

The attached patch cleans this up and removes some cruft from the code.
Comment 1 foskey 2003-03-18 13:46:26 UTC
Created attachment 5130 [details]
patch file for config_office.
Comment 2 foskey 2003-03-18 13:50:59 UTC
Created attachment 5131 [details]
remove rtti and -g from makefile now done in configure.
Comment 3 foskey 2003-03-18 13:54:23 UTC
Created attachment 5132 [details]
finally a reduction of cuft in settings.mk
Comment 4 michael.bemmer 2003-03-25 08:09:14 UTC
Target this one for beta2.
Comment 5 chris 2003-03-25 13:27:18 UTC
OK, I've got several comments/questions:

1. --enable-symbols vs --enable-debug

The help text didn't make it clear to me at first what the difference
is between these two settings.  I guess this is the difference?

  --enable-symbols -> -g
  --enable-debug   -> -g and debug=true

How about these help texts?

--enable-symbols:  Include debugging symbols in output.  Warning -  
                   a complete build needs 8 Gb of space and takes 
                   much longer.  (enables -g compiler flag)

--enable-debug:    Include debugging symbols from --enable-symbols
                   plus extra debugging code.  Extra large build!
                   (enables -g compiler flag and dmake debug=true)

2. Use of ENVCFLAGSCXX.  Should we consider using the standard
autoconf variables CFLAGS/CXXFLAGS, just as we switched to using the
standard compiler vars CC and CXX?  Also, it might be better to leave
ENVCFLAGS alone completely for the user to use if they wish?

3. removing -fno-rtti.  As dicussed on IRC, it might be better to try
and remove the -frtti from one or two makefiles instead of enabling it
for the whole build, since it incurs a (fairly small I know) extra
overhead in the size of the binaries.

12:59 <@haggai> waratah: Ratte suggested removing the CFLAGS+=-frtti
from the individual project.  If that would work, it would generate
smaller binaries and is maybe a good idea
12:59 <@haggai> Ratte: did you actually test that change, or was it a
guess?
13:44 < Ratte> haggai: yes I tested this with gcc-3.2.2 on LinuxIntel,
I surely donot approve enabling -frtti for all modules at this moment
13:47 < Ratte> waratah: I'm not happy with this, how much increased
size of OOo with rtti enabled ?
13:48 <@haggai> Ratte: I think it was about 2M in total
13:49 <@haggai> Ratte: so you tested that removing -frtti works?  In
that case, lets go for that
13:50 < Ratte> yes: the rtti switch in the xmlhelp makefiles seems a
ccp error to me, it's only needed in one dir, grep for dynamic_cast
13:54 <@haggai> but the problem is.. anything that is linked to that
file will need -frtti, no?
13:55 < Ratte> haggai: no, only here rtti is needed, but this may be
good luck
14:04 <@haggai> hmm, ok - sounds better then

4. cleanup of the gcc verson code using gcc_longver is a great idea!

5. ditto for cleanup of AC_MSG_WARN >> warn construct and introducing
AC_MSG_ERROR for missing build components.  Much better.

6. Did this one leak in from another issue?

# Set default warn level
-CFLAGSDFLTWARN=-w
+CFLAGSDFLTWARN=

Hope that helps,
Chris
Comment 6 foskey 2003-03-27 12:04:41 UTC
1)  accepted.

2)  I wanted to keep this a little smaller and less risky.  We can
follow this up as a post requirement with sufficient testing.

3) We should apply and backout if the 'correct' solution is not
available soon.  This is a buildability bug,  we can raise the rtti
reimplementation as another patch to reverse the patch we implement
now.  I do not want to alienate the builders because of broken gcc 3.2
as a lot of developers are using.

4+5)  clean up - thanks

6)  already applied.
Comment 7 foskey 2003-03-27 12:07:35 UTC
1)  accepted.

2)  I wanted to keep this a little smaller and less risky.  We can
follow this up as a post requirement with sufficient testing.

3) We should apply and backout if the 'correct' solution is not
available soon.  This is a buildability bug,  we can raise the rtti
reimplementation as another patch to reverse the patch we implement
now.  I do not want to alienate the builders because of broken gcc 3.2
as a lot of developers are using.

4+5)  clean up - thanks

6)  already applied.
Comment 8 foskey 2003-03-27 12:28:17 UTC
Status is waiting patch for rtti in makefiles.
Comment 9 foskey 2003-03-27 13:02:37 UTC
Here is a list of rtti that I found inside the source for the latest
644 tag:

./svx/workben/makefile.mk:add_cflagscxx="-frtti -fexceptions"
./setup2/source/custom/update/makefile.mk:CFLAGSCXX+=-frtti
./solenv/inc/macgccp.mk:CFLAGSCXX= -mpowerpc -fguiding-decls -frtti
./solenv/inc/unxbsdi.mk:CFLAGSCXX=-pipe -mpentium -fguiding-decls -frtti
./solenv/inc/unxlngppc.mk:CFLAGSCXX= -pipe -fno-for-scope -fpermissive
-frtti
./solenv/inc/unxlngppc4.mk:CFLAGSCXX= -fsigned-char -pipe
-fno-for-scope -fpermissive -frtti
./solenv/inc/unxscoi.mk:CFLAGSCXX=-mpentium -fguiding-decls -frtti
./xmlhelp/source/cxxhelp/db/makefile.mk:CFLAGSCXX+=-frtti
./xmlhelp/source/cxxhelp/provider/makefile.mk:CFLAGSCXX+=-frtti
./xmlhelp/source/cxxhelp/qe/makefile.mk:CFLAGSCXX+=-frtti
./xmlhelp/source/cxxhelp/util/makefile.mk:CFLAGSCXX+=-frtti
./xmlhelp/util/makefile.mk:CFLAGSCXX+=-frtti
./sablot/Sablot-0.52.patch:! CFLAGSCXX+=-frtti
./sablot/unxlngi4.pro/misc/build/Sablot-0.52/Sablot/engine/makefile.mk:CFLAGSCXX+=-frtti
./stlport/unxlngi4.pro/misc/build/STLport-4.5/src/gcc7.mak:WARNING_FLAGS=
-W -Wno-sign-compare -Wno-unused -Wno-uninitialized
-D_STLP_NO_TYPEINFO -D_STLP_NO_EXCEPTIONS -frtti
./cosv/source/fullcpp.mk:CFLAGSCXX+= -frtti
./autodoc/source/mkinc/fullcpp.mk:CFLAGSCXX+= -frtti
./udm/source/mkinc/fullcpp.mk:CFLAGSCXX+= -frtti
Comment 10 foskey 2003-03-27 20:30:25 UTC
Created attachment 5290 [details]
this patch allows -fno-rtti to be left on in gcc 3.2
Comment 11 chris 2003-03-28 09:12:58 UTC
xmlhelp.rtti.patch: approved.
Comment 12 foskey 2003-03-28 12:10:02 UTC
Created attachment 5313 [details]
Configure clean up - new descriptions, remove rtti option change
Comment 13 foskey 2003-03-28 12:10:58 UTC
The xmlhelp patch has now been applied.  gcc 3.2 builds should now work.
Comment 14 foskey 2003-03-28 12:12:54 UTC
Created attachment 5314 [details]
original patch minus the no-rtti removal.
Comment 15 quetschke 2003-03-28 16:46:31 UTC
Ken, can you please remove the:
----
+         if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" ))
+         {   
          print OUT "$setenv $_[ 0 ] \"$_[ 1 ]\"$newline";          #
to tcsh file
          if(defined($outfile_sh))
          {  print OUT_SH "$_[ 0 ]=\"$_[ 1 ]\"$newline";            #
to sh file
             $exportvars .= " $_[ 0 ]";                             #
add to export list for sh file
          }
+         }
----
part (occurs twice, the last two hunks, at the end off set_soenv.in)
from your config_office.patch.
It makes sense to generate winenv.bat and winenv.set even in the 4nt
case. Martin said me once he wanted to keep the W32-4nt part, and with
both winenv.* files generated it is possible to use bootstrap *AND*
the 4nt shell. (Not simultaneously, but configure and bootstrap
in cygwin bash and winenv.bat in 4nt.)

The rest of config_office.patch looks good to me.
Comment 16 foskey 2003-03-28 22:22:42 UTC
Created attachment 5323 [details]
Once more without the windows regression.
Comment 17 foskey 2003-03-31 14:47:21 UTC
Created attachment 5373 [details]
Include a symbols switch and more errors if program not found.
Comment 18 foskey 2003-04-04 14:28:13 UTC
Applied to developers tree.
Comment 19 quetschke 2003-04-07 11:00:33 UTC
Hi Ken,

you remove -g from 

-CFLAGS+=-fmessage-length=0 -c $(INCLUDE) -g
+CFLAGS+=-fmessage-length=0 -c $(INCLUDE)

CFLAGS, but you add -g only to ENVCFLAGSCXX

+ dnl ================================================================
+ dnl First setting is whether to include symbols into final build.
+ dnl ================================================================
+ if test "$enable_symbols" = "yes"; then
+    ENVCFLAGSCXX="-g"
+ else
+    ENVCFLAGSCXX=""
+ fi

IMHO this should be ENVCFLAGS instead, see line 1457 from settings.mk.

Also, unfortunately not all compilers use "-g" for this purpose. The
setting of ENVCFLAGS should be done after the COM variable is set.

I propose exporting ENABLE_SYMBOLS to set_soenv and set ENVCFLAGS
there.
Comment 20 quetschke 2003-04-12 12:55:29 UTC
Created attachment 5607 [details]
Patch to enable symbols switch for gcc and MSVC
Comment 21 quetschke 2003-04-12 13:10:42 UTC
I just realized that the patch I just attached doesn't work.
The following one should do.

The only problem I see is that it changes the default behavior in the
Hamburg environment for MSVC from "always build with symbols" to "only
build with symbols when ENABLE_SYMBOLS is set to "yes".

But Ken's patch did this already for gcc, so this might be no problem.
Comment 22 quetschke 2003-04-12 13:12:20 UTC
Created attachment 5608 [details]
2nd try. Patch to enable symbols switch for gcc and MSVC
Comment 23 foskey 2003-04-19 08:43:35 UTC
Created attachment 5751 [details]
Start AIX and fix bug where it does not show perl version checked.
Comment 24 foskey 2003-04-19 08:57:23 UTC
Created attachment 5752 [details]
handle system not setup yet, remove USE_SHELL and tidy the comment variable.
Comment 25 quetschke 2003-04-19 09:55:38 UTC
I tried the last patch against cws_srx644_ooo20030412 == HEAD.

patching file set_soenv.in
Hunk #1 FAILED at 43.
Hunk #2 succeeded at 131 (offset -4 lines).
...
Hunk #20 FAILED at 1981.
10 out of 20 hunks FAILED -- saving rejects to file set_soenv.in.rej

Also in hunk 
@@ -1123,7 +1116,7 @@
-   if ( ( "$USE_SHELL" eq "tcsh" ) && ( ! $noldPATH =~
/(?:[:]|\A)(?:$TCSH_PATH)(?:[:]|\Z)/ ) )
+   if ( ( "'@USE_SHELL@'" eq "tcsh" ) && ( ! $noldPATH =~
/(?:[:]|\A)(?:$TCSH_PATH)(?:[:]|\Z)/ ) )
There are "'...'" used, should be only '...'

Ken, can you also please comment on the ENVCFLAGS vs. ENVCFLAGSCXX issue.
I think ENVCFLAGS is the correct variable to be used.
Comment 26 foskey 2003-04-19 13:31:15 UTC
Created attachment 5758 [details]
Major upgrade.  based on 0412 branch.   AIX aware, format upgrades.
Comment 27 foskey 2003-04-19 13:33:31 UTC
THe envcflags have been upgraded to use -g on option as well.

This works well with most compilers as most compilers us -g for
symbols.  Except M$, I have to work on a proper fix for M$ but I have
little time.  I want to move some of the set_soenv.in up to
configure.in to make this switch easier.
Comment 28 quetschke 2003-04-19 16:01:34 UTC
The following patch enables the --enable-symbols switch to be used
for MSVC.

Warning! This is a hack! The patch checks for ENVCFLAGSCXX="-g", as this
is the "global" enable symbols switch for all other compilers and enables
the MSVC switch "-Zi -Fd$(MISC)\_ooo_st_$(TARGET).PDB" if it's set.

CCing ause, because this is in solenv.


Comment 29 quetschke 2003-04-19 16:03:48 UTC
Created attachment 5759 [details]
Patch for solenv/inc/wnt.mk
Comment 30 quetschke 2003-04-19 16:07:45 UTC
Created attachment 5760 [details]
Patch for solenv/inc/wnt.mk
Comment 31 quetschke 2003-04-20 08:11:24 UTC
Ken, when you add the forgotten ENVCFLAGS could you also please fix:

+	   ($platform eq $Irix64) || ($platform eq $FreeBSD) || ($platform =
"AIX"))

the two lines in your patch with $platform = "AIX".
Comment 32 foskey 2003-04-20 13:34:39 UTC
Win nt symbols conversion from -g to complex M$ code is approved. 
WIll work on better configure to make it upstream later.
Comment 33 hjs 2003-04-22 11:34:12 UTC
i strongly discourage the use of "ENVC*" variables for permanent
environment changes. these variables are for temporary use for
developers only to e.g. override the default switches. every content
set in the environment scripts will potentially get removed in
developer builds.
 
Comment 34 Martin Hollmichel 2003-04-28 13:43:34 UTC
unxlngi4.mk readded -g, was it intended to remove it ?
Comment 35 foskey 2003-04-28 13:46:48 UTC
So long as configure sets the -g by option then the -g in unxlngi4.mk
should not be there.
Comment 36 Martin Hollmichel 2003-04-28 13:50:40 UTC
please keep in mind that SO does not use configure, so if we change
some things there, we also have to take care that in SO / setsolar
Environment the required change also has to be done.
Comment 37 foskey 2003-04-28 14:03:31 UTC
Acknowledged.

This particular item was agreed in a lengthy discussion in the mailing
list.  The point about setsolar was made during that discussion to the
internal support.  It was agreed that -g was too big a blocker on disk
space for new OOo developers.
Comment 38 foskey 2003-06-06 13:31:03 UTC
Created attachment 6703 [details]
Backout patch for setup2 to compile on most platforms.
Comment 39 quetschke 2003-06-06 14:18:01 UTC
Hi Ken, wrong issue ;-)
Comment 40 Martin Hollmichel 2003-06-11 14:50:07 UTC
please see #14472 for make --enable-symbols work.
Comment 41 quetschke 2003-08-04 11:29:31 UTC
Fixed in issue 14472.
Comment 42 quetschke 2003-08-04 11:30:21 UTC
close