Re: 7.0BETA4 /usr/src/gnu/usr.bin/cc/cc_int Thrashes

2007-12-20 Thread Oliver Fromme
Julian Stacey wrote:
  Has 7.0-BETA4 perhaps wrongly got a -pipe in the .mk macros ?

It was added 9 years 7 months ago my JKH (see the CVS
repository, src/share/mk/sys.mk rev 1.31).  He wrote:

Add -pipe to default CFLAGS.  The optimization it provides
is cheap and does not require any special action on the part
of the user to take advantage of it.

It might not be that cheap anymore with gcc 4.2 being
the default compiler now, known to be somewhat more RAM-
hungry than its predecessors.

However, I still think that -pipe should be kept on by
default, because it will help on the vast majority of
machines.  Old machines with very little RAM need some
special-tuning anyway, so it's reasonable to give them
special CFLAGS that don't contain -pipe.

(Apart from that I would recommend to use a faster and
sufficiently RAM-equipped machine for building and then
perform only the install on the smaller machine, or
install directly on its harddisk by plugging it into
the faster machine temporarily.  That's how I used to
update an old 486SX notebook that had only 4 MB RAM and
no network except SLIP/PLIP.)

YMMV, of course.  Please take the above only as my
personal opinion on the matter.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code  (taken from comp.lang.awk FAQ)
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


7.0BETA4 /usr/src/gnu/usr.bin/cc/cc_int Thrashes

2007-12-18 Thread Julian Stacey
Has 7.0-BETA4 perhaps wrongly got a -pipe in the .mk macros ?
Please someone with generic 7.0BETA4 check with eg:
A single line /etc/make.conf
CFLAGS += -Dzonk=bla
~/tmp/Makefile
tst:
@echo XX ${CFLAGS} YY
make tst
XX -O2 -fno-strict-aliasing -pipe -Dzonk=bla  YY
Is pipe coming from generic mk/ ?
Or from my local hacked version  ?
Could someone test please:
My /usr/src is no longer generic, on a very slow CPU, SLIP
linked, building rest of src/  I'm about to go away, 
will miss the 7-RELEASE date, but -pipe should not be in
generic, needs to be a host dependent choice. )
Thanks

PS
Discovered after thrashing, never getting past
/usr/src/gnu/usr.bin/cc/cc_int
  cc -O2 -fno-strict-aliasing -pipe -march=i586  -DIN_GCC -DHAVE_CONFIG_H
  -DPREFIX=\/usr\ -I/usr/obj/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
  -I/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
  -I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc
  -I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/config
  -I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcclibs/include
  -I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcclibs/libcpp/include
  -I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcclibs/libdecnumber
  -c ../cc_tools/insn-attrtab.c

 many
swap_pager_getswapspace(3): failed
Then I got desperate  
dd if=/dev/zero of=/var/tmp/SWAP count=20
mdconfig -a -t vnode -f /var/tmp/SWAP
swapon /dev/md0
I've hashed out cc in src/gnu/usr.bin/Makefile to nurse it on.

Julian
--
Julian Stacey. Munich Consultant: BSD Unix Linux. http://berklix.com
Ihr Rauch=mein allergischer Kopfschmerz. Dump cigs 4 snuff.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 7.0BETA4 /usr/src/gnu/usr.bin/cc/cc_int Thrashes

2007-12-18 Thread Julian H. Stacey
 Has 7.0-BETA4 perhaps wrongly got a -pipe in the .mk macros ?
 Please someone with generic 7.0BETA4 check with eg:
   A single line /etc/make.conf
   CFLAGS += -Dzonk=bla
   ~/tmp/Makefile
   tst:
   @echo XX ${CFLAGS} YY
   make tst
   XX -O2 -fno-strict-aliasing -pipe -Dzonk=bla  YY
 Is pipe coming from generic mk/ ?
 Or from my local hacked version  ?
 Could someone test please:
   My /usr/src is no longer generic, on a very slow CPU, SLIP
   linked, building rest of src/  I'm about to go away, 
   will miss the 7-RELEASE date, but -pipe should not be in
   generic, needs to be a host dependent choice. )

Error found. I will send-pr.  Patch below stored in :
http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/share/mk/sys.mk.REL=ALL.diff

pipe should not be on by default as
- It cripples machines with limited memory.
- Pipe can be enabled by any memory rich host in /etc/make.conf with:
CFLAGS += -pipe
- Man cc lists how to turn it on but not off.
- Man cc also notes assembler problems 

*** /pub/FreeBSD/branches/-current/src/share/mk/sys.mk.orig Tue Dec 18 
15:11:26 2007
--- /pub/FreeBSD/branches/-current/src/share/mk/sys.mk  Tue Dec 18 15:12:23 2007
***
*** 36,44 
  .else
  CC?=  cc
  .if ${MACHINE_ARCH} == arm
! CFLAGS?=  -O -fno-strict-aliasing -pipe
  .else
! CFLAGS?=  -O2 -fno-strict-aliasing -pipe
  .endif
  .if defined(NO_STRICT_ALIASING)
  CFLAGS+=  -fno-strict-aliasing
--- 36,44 
  .else
  CC?=  cc
  .if ${MACHINE_ARCH} == arm
! CFLAGS?=  -O -fno-strict-aliasing
  .else
! CFLAGS?=  -O2 -fno-strict-aliasing
  .endif
  .if defined(NO_STRICT_ALIASING)
  CFLAGS+=  -fno-strict-aliasing

*** 6.2-RELEASE/src/share/mk/sys.mk.origTue Sep 18 09:32:40 2007
--- 6.2-RELEASE/src/share/mk/sys.mk Tue Dec 18 15:21:09 2007
***
*** 35,41 
  CFLAGS?=  -O
  .else
  CC?=  cc
! CFLAGS?=  -O2 -fno-strict-aliasing -pipe
  .endif
  
  CXX   ?=  c++
--- 35,41 
  CFLAGS?=  -O
  .else
  CC?=  cc
! CFLAGS?=  -O2 -fno-strict-aliasing
  .endif
  
  CXX   ?=  c++

-- 
Julian Stacey. Munich Computer Consultant, BSD Unix C Linux. http://berklix.com
Ihr Rauch = mein allergischer Kopfschmerz. Dump cigs 4 snuff.
-- 
Julian Stacey. Munich Computer Consultant, BSD Unix C Linux. http://berklix.com
Ihr Rauch = mein allergischer Kopfschmerz. Dump cigs 4 snuff.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]