| Summary: | /usr/share/examples/etc/make.conf contains broken CXXFLAGS | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Chris Pepper <pepper> | ||||||
| Component: | Books & Articles | Assignee: | Tom Rhodes <trhodes> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | CC: | paul | ||||||
| Priority: | Normal | ||||||||
| Version: | Latest | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
Chris Pepper
2004-09-04 04:40:19 UTC
On 2004-09-03 23:31, Chris Pepper <pepper@reppep.com> wrote: > >Description: > /usr/share/examples/etc/make.conf suggests: > CXXFLAGS+= -fmemoize-lookups -fsave-memoized > but this prevents make buildworld in RELENG_5. > [...] > >Fix: > Remove this sample from the example, or replace it with one that's > safe under RELENG_5 You don't *have* to use the same CXXFLAGS options as the ones of the example. It's an example, after all. Anyway, would you prefer something like this instead? # CXXFLAGS controls the compiler settings used when compiling C++ code. # Note that CXXFLAGS is initially set to the value of CFLAGS. If you wish # to add to CXXFLAGS value, "+=" must be used rather than "=". Using "=" # alone will remove the often needed contents of CFLAGS from CXXFLAGS. +# For a description of the options recognized by the GNU C++ compiler +# please refer to the c++(1) manpage and the info documentation of GCC. # -#CXXFLAGS+= -fmemoize-lookups -fsave-memoized +#CXXFLAGS+= -O -pipe At 3:46 PM +0300 2004/09/04, Giorgos Keramidas wrote: >On 2004-09-03 23:31, Chris Pepper <pepper@reppep.com> wrote: >> >Description: > > /usr/share/examples/etc/make.conf suggests: >> CXXFLAGS+= -fmemoize-lookups -fsave-memoized >> but this prevents make buildworld in RELENG_5. >> [...] >> >Fix: >> Remove this sample from the example, or replace it with one that's >> safe under RELENG_5 > >You don't *have* to use the same CXXFLAGS options as the ones of the >example. It's an example, after all. Anyway, would you prefer something >like this instead? Of course, but the examples should all be valid. This one prevents make buildworld, so should be replaced by something that doesn't. > # CXXFLAGS controls the compiler settings used when compiling C++ code. > # Note that CXXFLAGS is initially set to the value of CFLAGS. If you wish > # to add to CXXFLAGS value, "+=" must be used rather than "=". Using "=" > # alone will remove the often needed contents of CFLAGS from CXXFLAGS. > +# For a description of the options recognized by the GNU C++ compiler > +# please refer to the c++(1) manpage and the info documentation of GCC. > # > -#CXXFLAGS+= -fmemoize-lookups -fsave-memoized > +#CXXFLAGS+= -O -pipe Except that's provided already with the example of CFLAGS, so would make sense iff CFLAGS had another example value. # CFLAGS controls the compiler settings used when compiling C code. # Note that optimization settings other than -O and -O2 are not recommended # or supported for compiling the world or the kernel - please revert any # nonstandard optimization settings to "-O" before submitting bug reports # without patches to the developers. # Note also that at this time the -O2 setting is known to expose bugs in # libalias(3), and possibly other parts of the system. # #CFLAGS= -O -pipe # # CXXFLAGS controls the compiler settings used when compiling C++ code. # Note that CXXFLAGS is initially set to the value of CFLAGS. If you wish # to add to CXXFLAGS value, "+=" must be used rather than "=". Using "=" # alone will remove the often needed contents of CFLAGS from CXXFLAGS. # #CXXFLAGS+= -fmemoize-lookups -fsave-memoized Regards, Chris Pepper -- Chris Pepper: <http://www.reppep.com/~pepper/> Rockefeller University: <http://www.rockefeller.edu/> On 2004-09-04 11:31, Chris Pepper <pepper@reppep.com> wrote: > > Of course, but the examples should all be valid. This one > prevents make buildworld, so should be replaced by something that > doesn't. True, true. > > # CXXFLAGS controls the compiler settings used when compiling C++ code. > > # Note that CXXFLAGS is initially set to the value of CFLAGS. If you > > wish > > # to add to CXXFLAGS value, "+=" must be used rather than "=". Using > > "=" > > # alone will remove the often needed contents of CFLAGS from CXXFLAGS. > > +# For a description of the options recognized by the GNU C++ compiler > > +# please refer to the c++(1) manpage and the info documentation of GCC. > > # > > -#CXXFLAGS+= -fmemoize-lookups -fsave-memoized > > +#CXXFLAGS+= -O -pipe > > Except that's provided already with the example of CFLAGS, so > would make sense iff CFLAGS had another example value. I don't use C++ so much, so perhaps I'm not the right person to choose a "nice set of default flags" for this. Any ideas from you, Chris? At 8:47 PM +0300 2004/09/04, Giorgos Keramidas wrote: >On 2004-09-04 11:31, Chris Pepper <pepper@reppep.com> wrote: >> >> Of course, but the examples should all be valid. This one >> prevents make buildworld, so should be replaced by something that >> doesn't. > >True, true. > >> > # CXXFLAGS controls the compiler settings used when compiling C++ code. >> > # Note that CXXFLAGS is initially set to the value of CFLAGS. If you >> > wish >> > # to add to CXXFLAGS value, "+=" must be used rather than "=". Using >> > "=" >> > # alone will remove the often needed contents of CFLAGS from CXXFLAGS. >> > +# For a description of the options recognized by the GNU C++ compiler >> > +# please refer to the c++(1) manpage and the info documentation of GCC. >> > # >> > -#CXXFLAGS+= -fmemoize-lookups -fsave-memoized > > > +#CXXFLAGS+= -O -pipe >> >> Except that's provided already with the example of CFLAGS, so >> would make sense iff CFLAGS had another example value. > >I don't use C++ so much, so perhaps I'm not the right person to choose a >"nice set of default flags" for this. > >Any ideas from you, Chris? No idea, sorry. If we don't have (get) one, it should probably be left blank (e.g., "#CXXFLAGS+="), and the explanation will have to serve. That would still be a substantial improvement over the current state of affairs. Chris Pepper -- Chris Pepper: <http://www.reppep.com/~pepper/> Rockefeller University: <http://www.rockefeller.edu/> Hi freebsd-gnats-submit, the -fmemoize-lookups and -fsave-memoized flags are deprecated in RELENG_5 so here is a patch :) Ruslan: have you some problems with this or doc team can commit this? --- /usr/share/examples/etc/make.confThu Nov 11 21:21:15 2004 +++ /usr/share/examples/etc/make.conf.dangerSun Feb 20 22:41:44 2005 @@ -57,7 +57,7 @@ # to add to CXXFLAGS value, "+=" must be used rather than "=". Using "=" # alone will remove the often needed contents of CFLAGS from CXXFLAGS. # -#CXXFLAGS+= -fmemoize-lookups -fsave-memoized +#CXXFLAGS+= # # MAKE_SHELL controls the shell used internally by make(1) to process the # command scripts in makefiles. Three shells are supported, sh, ksh, and -- Best Regards, +----------==/\/\==----------+ (__) FreeBSD | DanGer <danger@rulez.sk> | \\\'',) The | DanGer@IRCnet ICQ261701668 | \/ \ ^ Power | http://danger.rulez.sk | .\._/_) To +----------==\/\/==----------+ Serve [ Beer - So much more than just a breakfast drink. ] State Changed From-To: open->closed Patched, MFC pending. Responsible Changed From-To: freebsd-doc->trhodes Over to me. |