sparc64/109510: mcpu flags break buildworld in Sparc64 line
Steven Hillis
evultrole at gmail.com
Sun Feb 25 02:00:13 UTC 2007
>Number: 109510
>Category: sparc64
>Synopsis: mcpu flags break buildworld in Sparc64 line
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-sparc64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 25 02:00:12 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Steven Hillis
>Release: 6.2
>Organization:
>Environment:
FreeBSD popp.tops 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #0: Sat Feb 24 14:15:14 PST 2007 steven at popp.tops:/usr/src/sys/sparc64/compile/MYKERN sparc64
>Description:
Setting -mcpu=ultrasparc or -mcpu=v9 in /etc/make.conf causes "unknown architecture" errors on world or kernel builds.
Setting the flags overwrites the CPU_SPEC that's normally set to __sparc64__.
>How-To-Repeat:
Add -mcpu=ultrasparc to you CFLAGS= configuration in /etc/make.conf, then try to compile world or any kernel.
>Fix:
Apply the attached patch which adds the following to /usr/src/contrib/gcc/config/sparc/freebsd.h:
builtin_define ("__sparc64__");
builtin_define ("__sparc_v9__");
builtin_define ("__sparcv9");
builtin_define ("__arch64__");
Patch attached with submission follows:
*** contrib/gcc/config/sparc/freebsd.h Tue Jul 27 22:00:13 2004
--- contrib/gcc/config/sparc/temp/freebsd.h Sat Feb 24 16:56:33 2007
***************
*** 34,44 ****
#undef FBSD_TARGET_CPU_CPP_BUILTINS
#define FBSD_TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define ("__LP64__"); \
! } \
while (0)
#define LINK_SPEC "%(link_arch) \
%{!mno-relax:%{!r:-relax}} \
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
--- 34,48 ----
#undef FBSD_TARGET_CPU_CPP_BUILTINS
#define FBSD_TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define ("__LP64__"); \
! builtin_define ("__sparc64__"); \
! builtin_define ("__sparc_v9__"); \
! builtin_define ("__sparcv9"); \
! builtin_define ("__arch64__"); \
! } \
while (0)
#define LINK_SPEC "%(link_arch) \
%{!mno-relax:%{!r:-relax}} \
%{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-sparc64
mailing list