DragonFly BSD
DragonFly submit List (threaded) for 2004-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

CPUTYPE for gcc3


From: YONETANI Tomokazu <qhwt+dragonfly-submit@xxxxxxxxxx>
Date: Mon, 26 Jan 2004 21:37:33 +0900

Hello.
Now that great efforts are made to enable gcc3 on DragonFly,
I decided to build kernel/world with gcc3, and possibly with
-march=pentiumN flag. Just adding the flag to CFLAGS breaks the
buildworld because newer -march flags won't work with gcc2,
and part of buildworld falls back to gcc2 even when CCVER=gcc3
is specified. The idea is to make bsd.cpu.mk sensitive
to CCVER so as to enable newer flags only when gcc3 is in use.

http://les.ath.cx/DragonFly/gcc3-cputype.diff.gz

what it does is:
- split bsd.cpu.mk into bsd.gcc2.cpu.mk and bsd.gcc3.cpu.mk,
  keeping the old bsd.cpu.mk as the former, and bsd.cpu.mk
  from FreeBSD-CURRENT as the latter.
- include bsd.cpu.mk from gnu/lib/gcc2/Makefile so that CPUTYPE
  is re-evaluated after setting CCVER=gcc2.
- add CCVER=gcc2 to lib/libc_r/Makefile to force building
  libc_r with gcc2.

after successfully applying the patch, you can add
CCVER=gcc3
. makeenv CCVER
to your make.conf without breaking the buildworld/buildkernel.

using gcc2 to build libc_r may not be necessary in the future,
but at the moment building libc_r with gcc3 breaks any programs
linked with -pthread (Mozilla, for example).



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]