CXXFLAGS and example make.conf

From: Paul Mather <paul_at_gromit.dlib.vt.edu>
Date: Mon, 02 Aug 2004 13:31:31 -0400
One thing I noticed when building a new userland after the GCC 3.4.2
import is that it fails if you have uncommented in your /etc/make.conf
file the CXXFLAGS line in the sample make.conf file (e.g., if you copied
/usr/src/share/examples/etc/make.conf to /etc/make.conf and happened to
uncomment the CXXFLAGS line thinking it was safe/recommended to do so).

In my case, I got this during "make buildworld":

>>>>>
>>> Rebuilding the temporary build tree
[[...]]
>>> stage 1.1: legacy release compatibility shims
[[...]]
>>> stage 1.2: bootstrap tools
[[...]]
>>> stage 2.1: cleaning up the object tree
[[...]]
>>> stage 2.2: rebuilding the object tree
[[...]]
>>> stage 2.3: build tools
[[...]]
>>> stage 3: cross tools
[[...]]
>>> stage 4.1: building includes
[[...]]
>>> stage 4.2: building libraries
[[...]]
===> gnu/lib/libreadline/readline/doc
===> gnu/lib/libstdc++
c++ -O -pipe -march=pentium2 -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -I/usr/src/gnu/lib/libstdc++ -I/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++ -I/usr/src/gnu/lib/libstdc++/../../../contrib/gcc -I/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/include -fmemoize-lookups -fsave-memoized -fno-implicit-templates -ffunction-sections -fdata-sections  -Wno-deprecated -c /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/src/allocator.cc
cc1plus: error: unrecognized command line option "-fmemoize-lookups"
cc1plus: error: unrecognized command line option "-fsave-memoized"
*** Error code 1

Stop in /usr/src/gnu/lib/libstdc++.
*** Error code 1

Stop in /usr/src/gnu/lib.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
<<<<<

It seems that both options in the example line "#CXXFLAGS+=
-fmemoize-lookups -fsave-memoized" are no longer valid in GCC 3.4.2. 
So, I guess they should be changed/removed in the example make.conf. 
(Commenting out CXXFLAGS again in my /etc/make.conf fixed my problem.)

BTW, the only other upgrade problem I had was during "make
installworld".  I got a complaint about "btxld" not being found when
installing boot2.  However, simply running "make installworld" again
after running a "make install" in /usr/src/sys/boot/i386 seemed to solve
the problem and allow installworld to complete successfully.

Cheers,

Paul.
-- 
e-mail: paul_at_gromit.dlib.vt.edu

"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
        --- Frank Vincent Zappa
Received on Mon Aug 02 2004 - 15:31:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:04 UTC