Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Feb 2011 14:25:48 -0500
From:      "b. f." <bf1783@googlemail.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-toolchain@FreeBSD.org, gerald@FreeBSD.org
Subject:   Re: [toolchain] ${CC} in share/mk/bsd.cpu.mk
Message-ID:  <AANLkTimpabx3dKBvN%2BWWve97H1Cd4HrQtVdXXRoHWAut@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Warner Losh wrote:
> On 02/01/2011 04:27, b. f. wrote:
> > Gerald Pfeifer wrote:
> >> On Sun, 30 Jan 2011, Alexander Best wrote:
> >>> i might have described things a bit too complicated. basically i want to
> >>> have CPUTYPE ?= core2 in my make.conf. clang is capable of producing
> >>> core2 specific code, however core2 always gets downgraded by
> >>> share/mk/bsd.cpu.mk to nocona in order not to confuse gcc.
> >>>
> >>> any chance of fixing this?
> >> I guess one of those extern compilers Robert has in mind should
> >> be lang/gcc46 from the Ports Collection which is perfectly happy
> >> to generate core2 code.  I agree we need good infrastructure to
> >> support such cases.
> >
> > Related:
> >
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=conf/84800
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=conf/112997
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=conf/30399
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=i386/122623
> >
> > The longevity of some of these is remarkable.
>
> Wow!  I think the fortran one takes the cake for ancientness :)  When
> applying it, keep in mind that we do things a little differently...
> Maybe I'll take a look at it/them :)

I didn't mean to suggest that the proposals of the original submitters
be adopted in each case above, just that the PRs ought to be resolved,
as they have practical consequences for users.

I had mentioned the Fortran PR earlier to the GCC ports maintainer,
and he saw no reason why the default Fortran bits (default targets,
compiler and flag definitions)
couldn't be shifted from src/share/mk/sys.mk and
src/share/mk/bsd.lib.mk to ports/Mk/bsd.gcc.mk and placed under the
USE_FORTRAN knob, as they are no longer used in the base system, and
applicable standards like:

http://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html

state that " Implementations that do not support FORTRAN may omit FC,
FFLAGS, and the .f inference rules."  This would allow the ports
committers to more easily maintain those bits, and the few users who
rely on those bits for software that is not in either Ports or the
base system could probably easily adapt to such a change.

But even if such a change isn't adopted,  the default FFLAGS probably
ought to be set to be the same as the default CFLAGS, including the
option to specify -mtune=...  That would simplify matters, and I think
at the moment that they are too conservative.

While we are on the topic, in reference to my earlier comment in
conf/112997, is anyone working on adding basic OS support for some of
the newer CPU instruction sets to FreeBSD?  Even if we can't use them
with the older base system compiler, I think that a growing number of
users would like to use them with clang or the other newer compilers
in Ports.

b.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimpabx3dKBvN%2BWWve97H1Cd4HrQtVdXXRoHWAut>