public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling without -g
@ 1998-01-19  2:30 Jonathan Buzzard
  1998-01-21  9:18 ` Andreas Schwab
  0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Buzzard @ 1998-01-19  2:30 UTC (permalink / raw)
  To: egcs

Hi,

I grabed a copy of egcs-1.0.1 in order to get a better C++ compiler than
gcc-2.7.2. However without going round editting all the Makefiles is
there anyway to stop it using the -g flag everywhere as I am a little
short on disk space. 

I have tried the --diasble-debug flag but it did not work?


JAB.


-- 
Jonathan A. Buzzard                 Email: jab@hex.prestel.co.uk
Northumberland, United Kingdom.       Tel: +44(0)1661-832195



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-19  2:30 Compiling without -g Jonathan Buzzard
@ 1998-01-21  9:18 ` Andreas Schwab
  1998-01-23 14:48   ` David Edelsohn
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 1998-01-21  9:18 UTC (permalink / raw)
  To: Jonathan Buzzard; +Cc: egcs

Jonathan Buzzard <jab@hex.prestel.co.uk> writes:

|> I grabed a copy of egcs-1.0.1 in order to get a better C++ compiler than
|> gcc-2.7.2. However without going round editting all the Makefiles is
|> there anyway to stop it using the -g flag everywhere as I am a little
|> short on disk space. 

CFLAGS=-O2 ./configure  should do it.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-21  9:18 ` Andreas Schwab
@ 1998-01-23 14:48   ` David Edelsohn
  0 siblings, 0 replies; 13+ messages in thread
From: David Edelsohn @ 1998-01-23 14:48 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Jonathan Buzzard, egcs

>>>>> Andreas Schwab writes:

Andreas> CFLAGS=-O2 ./configure  should do it.

	Depending on how you are performing the build, you need to
override BOOT_CFLAGS as well.

David

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-23 14:48     ` Joseph H. Buehler
@ 1998-01-23 21:57       ` Jeffrey A Law
  1998-01-23 21:57       ` H.J. Lu
  1 sibling, 0 replies; 13+ messages in thread
From: Jeffrey A Law @ 1998-01-23 21:57 UTC (permalink / raw)
  To: Joseph H. Buehler; +Cc: Joe Buck, egcs

  In message < 199801222344.SAA11529@altera.gaithersburg.md.us >you write:
  > Here's what happens under redhat 5.0.  I configure with CFLAGS=-O and
  > run "make" with CFLAGS=-O.  As soon as the bootstrap starts in the
  > gcc/ directory, a -g appears in the compiler arguments and the -O is
  > gone.
The first stage compiler is built with just "-g" for debugging
purposes.

If you want to pass arguments to the first stage build of gcc use
BOOT_CFLAGS=

jeff

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-23 14:48     ` Joseph H. Buehler
  1998-01-23 21:57       ` Jeffrey A Law
@ 1998-01-23 21:57       ` H.J. Lu
  1 sibling, 0 replies; 13+ messages in thread
From: H.J. Lu @ 1998-01-23 21:57 UTC (permalink / raw)
  To: Joseph H. Buehler; +Cc: jbuck, egcs

> 
> Here's what happens under redhat 5.0.  I configure with CFLAGS=-O and
> run "make" with CFLAGS=-O.  As soon as the bootstrap starts in the
> gcc/ directory, a -g appears in the compiler arguments and the -O is
> gone.
> 

That is normal, which is how bootstrap works. If you wait until
the build finishes, you will see the latest compiler is compiled
with -O.


H.J.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-23 13:30     ` Joseph H. Buehler
@ 1998-01-23 16:33       ` H.J. Lu
  0 siblings, 0 replies; 13+ messages in thread
From: H.J. Lu @ 1998-01-23 16:33 UTC (permalink / raw)
  To: Joseph H. Buehler; +Cc: egcs

> 
> Torbjorn Lindgren <tl@funcom.com> writes:
> 
> > > Still haven't been able to get egcs to compile under redhat 5.0,
> > > though...
> > 
> > egcs 1.0.1 compiles fine under RedHat 5.0. Several other people have also
> > reported that they had no problem compiling egcs 1.0.1 on RedHat 5.0
> > either.
> 
> I've noticed.  I am beginning to think it may be because my machine is
> SMP.  Has anyone got egcs compiled on a 5.0 machine running SMP?
> 

I am building egcs on a Linux SMP machine. But I am not using
RedHat 5.0 on it. BTW, if it shouldn't make any difference unless
you use

# make -j 4 MAKE="make -j 4"

ot something like it. In any case, I cannot tell anything wrong.

-- 
H.J. Lu (hjl@gnu.org)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-22  1:45 ` Joseph H. Buehler
@ 1998-01-23 14:48   ` Joe Buck
  1998-01-23 14:48     ` Joseph H. Buehler
  0 siblings, 1 reply; 13+ messages in thread
From: Joe Buck @ 1998-01-23 14:48 UTC (permalink / raw)
  To: Joseph H. Buehler; +Cc: egcs

> > make CFLAGS=-O2
> 
> Not true, at least in some cases I have had to resort to using perl as
> shown.  As I recall, the problem was recursive makes that either did
> not pass CFLAGS or overrode it.

Either you are not using GNU make, or this is a bug that occurs on your
platform but not mine, or you are assuming behavior based on reading
the makefiles rather than checking it (make variables go in the
environment, so they get passed to recursive makes automatically).

If it is not working the way I described, it is a bug that should be
fixed!  We should not be encouraging people to write perl scripts to
mangle the makefiles.

(note that for 'make bootstrap' there is a different variable BOOT_CFLAGS
that is used by stage 2 and stage 3 builds).




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-23 14:48   ` Joe Buck
@ 1998-01-23 14:48     ` Joseph H. Buehler
  1998-01-23 21:57       ` Jeffrey A Law
  1998-01-23 21:57       ` H.J. Lu
  0 siblings, 2 replies; 13+ messages in thread
From: Joseph H. Buehler @ 1998-01-23 14:48 UTC (permalink / raw)
  To: Joe Buck; +Cc: egcs

>>>>> "JB" == Joe Buck <jbuck@Synopsys.COM> writes:

    >> > make CFLAGS=-O2
    >> 
    >> Not true, at least in some cases I have had to resort to using perl as
    >> shown.  As I recall, the problem was recursive makes that either did
    >> not pass CFLAGS or overrode it.

    JB> Either you are not using GNU make, or this is a bug that occurs on your
    JB> platform but not mine, or you are assuming behavior based on reading
    JB> the makefiles rather than checking it (make variables go in the
    JB> environment, so they get passed to recursive makes automatically).

    JB> If it is not working the way I described, it is a bug that should be
    JB> fixed!  We should not be encouraging people to write perl scripts to
    JB> mangle the makefiles.

    JB> (note that for 'make bootstrap' there is a different variable BOOT_CFLAGS
    JB> that is used by stage 2 and stage 3 builds).

Here's what happens under redhat 5.0.  I configure with CFLAGS=-O and
run "make" with CFLAGS=-O.  As soon as the bootstrap starts in the
gcc/ directory, a -g appears in the compiler arguments and the -O is
gone.

Joe Buehler

cd /usr/local/src/gnu/egcs/
make
./egcs-build 971225
+ [ -f /etc/bashrc ]
+ . /etc/bashrc
++ PS1=[\u@\h \W]\$ 
++ alias which=type -path
++ PVM_ROOT=/usr/local/clustering/pvm3
++ PVM_DPATH=/usr/local/clustering/pvm3/lib/pvmd
++ LAMHOME=/usr/local/clustering/lam
++ MANPATH=/usr/man:/usr/local/man:/usr/X11R6/man:/usr/openwin/man:/usr/local/clustering/pvm3/man:/usr/local/clustering/lam/man
++ export PVM_ROOT PVM_DPATH LAMHOME MANPATH
+ NEW=971225
+ rm -fr egcs-971225
+ gunzip
+ tar xf -
+ cd egcs-971225
+ rm -fr gcc/f
+ rm -fr gcc/objc
+ mkdir build
+ cd build
+ CFLAGS=-O
+ ../configure --prefix=/usr/local/egcs --host=i486-pc-linux-gnu --target=i486-pc-linux-gnu
Created "Makefile" in /2/usr/local/src/gnu/egcs/egcs-971225/build using "mt-frag"
Links are now set up to build a native compiler for i486-pc-linux-gnu
+ make CFLAGS=-O bootstrap-lean
make[1]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build'
make[2]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/libiberty'
if [ -n "" ] && [ ! -d pic ]; then \
  mkdir pic; \
else true; fi
touch stamp-picdir
echo "# !Automatically generated from ../../libiberty/functions.def"\
  "- DO NOT EDIT!" >needed2.awk
grep '^DEFVAR(' < ../../libiberty/functions.def \
 | sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
 >>needed2.awk
grep '^DEFFUNC(' < ../../libiberty/functions.def \
 | sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
 >>needed2.awk
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/dummy.c 2>/dev/null
(gcc -o dummy -O   dummy.o  ) >errors 2>&1 || true
echo "/* !Automatically generated from ../../libiberty/functions.def"\
  "- DO NOT EDIT! */" >lconfig.h
awk -f needed2.awk <errors >>lconfig.h
cp lconfig.h config.tmp
/bin/sh ../../libiberty/../move-if-change config.tmp config.h
touch stamp-config
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/argv.c -o pic/argv.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/argv.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/basename.c -o pic/basename.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/basename.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/choose-temp.c -o pic/choose-temp.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/choose-temp.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/concat.c -o pic/concat.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/concat.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/cplus-dem.c -o pic/cplus-dem.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/cplus-dem.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/fdmatch.c -o pic/fdmatch.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/fdmatch.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/fnmatch.c -o pic/fnmatch.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/fnmatch.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/getopt.c -o pic/getopt.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/getopt.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/getopt1.c -o pic/getopt1.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/getopt1.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/getruntime.c -o pic/getruntime.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/getruntime.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/hex.c -o pic/hex.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/hex.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/floatformat.c -o pic/floatformat.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/floatformat.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/objalloc.c -o pic/objalloc.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/objalloc.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/obstack.c -o pic/obstack.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/obstack.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/pexecute.c -o pic/pexecute.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/pexecute.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/spaces.c -o pic/spaces.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/spaces.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/strerror.c -o pic/strerror.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/strerror.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/strsignal.c -o pic/strsignal.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/strsignal.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/xatexit.c -o pic/xatexit.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/xatexit.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/xexit.c -o pic/xexit.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/xexit.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/xmalloc.c -o pic/xmalloc.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/xmalloc.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/xstrdup.c -o pic/xstrdup.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/xstrdup.c
test -z "" || \
  gcc -c -O -I. -I../../libiberty/../include   ../../libiberty/xstrerror.c -o pic/xstrerror.o
gcc -c -O -I. -I../../libiberty/../include  ../../libiberty/xstrerror.c
echo "# !Automatically generated from ../../libiberty/functions.def"\
  "- DO NOT EDIT!" >needed.awk
grep '^DEF(' < ../../libiberty/functions.def \
    | sed -e '/DEF/s|DEF.\([^,]*\).*|/\1/ { printf "\1.o " }|' \
    >>needed.awk
rm -f lneeded-list
f=""; \
for i in `awk -f needed.awk <errors`  ; do \
  case " $f " in \
    *" $i "*) ;; \
    *) f="$f $i" ;; \
  esac ; \
done ; \
case $f in \
    *alloca.o*) f="$f xmalloc.o xexit.o" ;; \
esac ; \
echo $f >>lneeded-list
cp lneeded-list needed-tmp
/bin/sh ../../libiberty/../move-if-change needed-tmp needed-list
touch stamp-needed
make[3]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/libiberty'
rm -rf libiberty.a
ar rc libiberty.a \
  argv.o basename.o choose-temp.o concat.o cplus-dem.o fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o floatformat.o objalloc.o obstack.o pexecute.o spaces.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o 
ranlib libiberty.a
echo argv.o basename.o choose-temp.o concat.o cplus-dem.o fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o floatformat.o objalloc.o obstack.o pexecute.o spaces.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o > required-list
make[3]: Leaving directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/libiberty'
make[2]: Leaving directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/libiberty'
make[2]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo'
rm -f stmp-sub-all
for dir in libtxi makeinfo util emacs; do \
  echo making sub-all in $dir; \
  (cd $dir && make bindir='/usr/local/egcs/bin' mandir='/usr/local/egcs/man/man1' manext='1' prefix='/usr/local/egcs' binprefix='' manprefix='' infodir='/usr/local/egcs/info' CFLAGS='-O' CC='gcc' ALLOCA='' LDFLAGS='' DEFAULT_INFOPATH='/usr/local/egcs/info:.' INSTALL='/bin/sh /2/usr/local/src/gnu/egcs/egcs-971225/install-sh -c' INSTALL_DATA='/bin/sh /2/usr/local/src/gnu/egcs/egcs-971225/install-sh -c -m 644' INSTALL_PROGRAM='/bin/sh /2/usr/local/src/gnu/egcs/egcs-971225/install-sh -c ' sub-all || exit 1); \
done
making sub-all in libtxi
make[3]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/libtxi'
gcc -c  -I. -I../../../texinfo/libtxi -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1  -O ../../../texinfo/libtxi/getopt.c
gcc -c  -I. -I../../../texinfo/libtxi -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1  -O ../../../texinfo/libtxi/getopt1.c
gcc -c  -I. -I../../../texinfo/libtxi -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1  -O ../../../texinfo/libtxi/bzero.c
rm -f libtxi.a
ar cq libtxi.a getopt.o getopt1.o bzero.o  
ranlib libtxi.a
make[3]: Leaving directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/libtxi'
making sub-all in makeinfo
make[3]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/makeinfo'
gcc -c  -I. -I../../../texinfo/makeinfo -I../../../texinfo/makeinfo/../libtxi -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1  -O ../../../texinfo/makeinfo/makeinfo.c
gcc -c  -I. -I../../../texinfo/makeinfo -I../../../texinfo/makeinfo/../libtxi -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1  -O ../../../texinfo/makeinfo/multi.c
gcc  -o makeinfo makeinfo.o multi.o -L../libtxi -ltxi -lbsd 
./makeinfo --no-split -I../../../texinfo/makeinfo makeinfo.texi
Making info file `makeinfo.info' from `makeinfo.texi'.
make[3]: Leaving directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/makeinfo'
making sub-all in util
make[3]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/util'
gcc -c  -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1  -I. -I../../../texinfo/util -I../../../texinfo/util/../libtxi -O ../../../texinfo/util/texindex.c
gcc  -o texindex texindex.o -L../libtxi -ltxi -lbsd 
gcc -c  -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1 -DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1  -I. -I../../../texinfo/util -I../../../texinfo/util/../libtxi -O ../../../texinfo/util/install-info.c
gcc  -o install-info install-info.o -L../libtxi -ltxi -lbsd 
make[3]: Leaving directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/util'
making sub-all in emacs
make[3]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/emacs'
make[3]: Nothing to be done for `sub-all'.
make[3]: Leaving directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo/emacs'
touch stmp-sub-all
./makeinfo/makeinfo -I../../texinfo texinfo.texi
Making info file `texinfo' from `texinfo.texi'.
make[2]: Leaving directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/texinfo'
Bootstrapping the compiler
make[2]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/gcc'
make CC="gcc" libdir=/usr/local/egcs/lib LANGUAGES="c "
make[3]: Entering directory `/2/usr/local/src/gnu/egcs/egcs-971225/build/gcc'
gcc  -DIN_GCC    -g  -DHAVE_CONFIG_H     -I. -I../../gcc -I../../gcc/config \
  -DGCC_INCLUDE_DIR=\"/usr/local/egcs/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.03/include\" \
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/egcs/include/g++\" \
  -DOLD_GPLUSPLUS_INCLUDE_DIR=\"/usr/local/egcs/lib/g++-include\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
  -DCROSS_INCLUDE_DIR=\"/usr/local/egcs/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.03/sys-include\" \
  -DTOOL_INCLUDE_DIR=\"/usr/local/egcs/i486-pc-linux-gnu/include\" \
  -c `echo ../../gcc/cccp.c | sed 's,^\./,,'`

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-22  2:29   ` Torbjorn Lindgren
@ 1998-01-23 13:30     ` Joseph H. Buehler
  1998-01-23 16:33       ` H.J. Lu
  0 siblings, 1 reply; 13+ messages in thread
From: Joseph H. Buehler @ 1998-01-23 13:30 UTC (permalink / raw)
  To: egcs

Torbjorn Lindgren <tl@funcom.com> writes:

> > Still haven't been able to get egcs to compile under redhat 5.0,
> > though...
> 
> egcs 1.0.1 compiles fine under RedHat 5.0. Several other people have also
> reported that they had no problem compiling egcs 1.0.1 on RedHat 5.0
> either.

I've noticed.  I am beginning to think it may be because my machine is
SMP.  Has anyone got egcs compiled on a 5.0 machine running SMP?

Joe Buehler

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-19 16:10 ` Joseph H. Buehler
  1998-01-20 12:42   ` Joe Buck
@ 1998-01-22  2:29   ` Torbjorn Lindgren
  1998-01-23 13:30     ` Joseph H. Buehler
  1 sibling, 1 reply; 13+ messages in thread
From: Torbjorn Lindgren @ 1998-01-22  2:29 UTC (permalink / raw)
  To: egcs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]

On 19 Jan 1998, Joseph H. Buehler wrote:
> Jonathan Buzzard <jab@hex.prestel.co.uk> writes:
> > I grabed a copy of egcs-1.0.1 in order to get a better C++ compiler than
> > gcc-2.7.2. However without going round editting all the Makefiles is
> > there anyway to stop it using the -g flag everywhere as I am a little
> > short on disk space. 
> 
> Here's what I do sometimes:

There are multiple ways of doing that, the two standard ways I know of
doing it is:

1. Tell configure that you want -O2 by setting the CFLAGS environment
   variable before running configure. This will set both CFLAGS and
   CXXFLAGS in the generated Makefile to the specified flags, and these
   will then be passed downwards.

2. Override it when starting make by giving it specific CFLAGS and
   CXXFLAGS (both will probably be necessary here). These will be
   propagated downwards as usual (see 1).


Both these works with egcs AFAIK.

Example of method 1:
setenv CFLAGS -O2   (or export CFLAGS=-O2)
./configure --prefix=whatever ...
make

Example of method 2:
make CFLAGS=-O2 CXXFLAGS=-O2


Do note that both these will generate a compiler without debugging
information, if you run into trouble this can be a problem! 
(If the problem is repeatable it's not that bad)


> find -type f |
> 	xargs grep -l 'FLAGS[	 ]*=' |
> 	xargs perl -p -i -e 's#(-O\d?|-g)\b#-O#g if (/FLAGS\s*=/)'

But at least it's better than this :-)
*All* files? At least check the name against '[Mm]akefile' first.


> Still haven't been able to get egcs to compile under redhat 5.0,
> though...

egcs 1.0.1 compiles fine under RedHat 5.0. Several other people have also
reported that they had no problem compiling egcs 1.0.1 on RedHat 5.0
either.


-- 
Torbjörn Lindgren
E-mail: tl@funcom.com
If Santa ever DID deliver presents on Christmas Eve, he's dead now.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
       [not found] <January_21_1998_at_17_18_27_11598_Joseph_H._Buehler@altera>
@ 1998-01-22  1:45 ` Joseph H. Buehler
  1998-01-23 14:48   ` Joe Buck
  0 siblings, 1 reply; 13+ messages in thread
From: Joseph H. Buehler @ 1998-01-22  1:45 UTC (permalink / raw)
  To: egcs

Joe Buck <jbuck@synopsys.com> writes:

> > Here's what I do sometimes:
> > 
> > find -type f |
> > 	xargs grep -l 'FLAGS[	 ]*=' |
> > 	xargs perl -p -i -e 's#(-O\d?|-g)\b#-O#g if (/FLAGS\s*=/)'
> 
> You don't need to edit the makefiles; it suffices to say, for example
> 
> make CFLAGS=-O2

Not true, at least in some cases I have had to resort to using perl as
shown.  As I recall, the problem was recursive makes that either did
not pass CFLAGS or overrode it.

Joe Buehler

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
  1998-01-19 16:10 ` Joseph H. Buehler
@ 1998-01-20 12:42   ` Joe Buck
  1998-01-22  2:29   ` Torbjorn Lindgren
  1 sibling, 0 replies; 13+ messages in thread
From: Joe Buck @ 1998-01-20 12:42 UTC (permalink / raw)
  To: Joseph H. Buehler; +Cc: egcs

> Jonathan Buzzard <jab@hex.prestel.co.uk> writes:
> 
> > I grabed a copy of egcs-1.0.1 in order to get a better C++ compiler than
> > gcc-2.7.2. However without going round editting all the Makefiles is
> > there anyway to stop it using the -g flag everywhere as I am a little
> > short on disk space. 

Warning: you don't want to compile your libraries without -g, or your
users won't be able to debug fully (even if they use -g for their own
code, the lack of -g in the libraries will mean, for instance, that
the debugger things iostreams, strings, etc are unknown classes).

> Here's what I do sometimes:
> 
> find -type f |
> 	xargs grep -l 'FLAGS[	 ]*=' |
> 	xargs perl -p -i -e 's#(-O\d?|-g)\b#-O#g if (/FLAGS\s*=/)'

You don't need to edit the makefiles; it suffices to say, for example

make CFLAGS=-O2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Compiling without -g
       [not found] <January_19_1998_at_18_43_15_2665_Joseph_H._Buehler@altera>
@ 1998-01-19 16:10 ` Joseph H. Buehler
  1998-01-20 12:42   ` Joe Buck
  1998-01-22  2:29   ` Torbjorn Lindgren
  0 siblings, 2 replies; 13+ messages in thread
From: Joseph H. Buehler @ 1998-01-19 16:10 UTC (permalink / raw)
  To: egcs

Jonathan Buzzard <jab@hex.prestel.co.uk> writes:

> I grabed a copy of egcs-1.0.1 in order to get a better C++ compiler than
> gcc-2.7.2. However without going round editting all the Makefiles is
> there anyway to stop it using the -g flag everywhere as I am a little
> short on disk space. 

Here's what I do sometimes:

find -type f |
	xargs grep -l 'FLAGS[	 ]*=' |
	xargs perl -p -i -e 's#(-O\d?|-g)\b#-O#g if (/FLAGS\s*=/)'

Still haven't been able to get egcs to compile under redhat 5.0,
though...

Joe Buehler

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~1998-01-23 21:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-19  2:30 Compiling without -g Jonathan Buzzard
1998-01-21  9:18 ` Andreas Schwab
1998-01-23 14:48   ` David Edelsohn
     [not found] <January_19_1998_at_18_43_15_2665_Joseph_H._Buehler@altera>
1998-01-19 16:10 ` Joseph H. Buehler
1998-01-20 12:42   ` Joe Buck
1998-01-22  2:29   ` Torbjorn Lindgren
1998-01-23 13:30     ` Joseph H. Buehler
1998-01-23 16:33       ` H.J. Lu
     [not found] <January_21_1998_at_17_18_27_11598_Joseph_H._Buehler@altera>
1998-01-22  1:45 ` Joseph H. Buehler
1998-01-23 14:48   ` Joe Buck
1998-01-23 14:48     ` Joseph H. Buehler
1998-01-23 21:57       ` Jeffrey A Law
1998-01-23 21:57       ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).