------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-04-17 
21:13 -------
It's a target problem: FreeBSD overrides this line from sparc.h:

#define CPP_SPEC "%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)"

with this line from freebsd-spec.h:

/* Provide a CPP_SPEC appropriate for FreeBSD.  We just deal with the GCC 
   option `-posix', and PIC issues.  */

#define FBSD_CPP_SPEC "                                                 \
  %(cpp_cpu)                                                            \
  %{fPIC|fpic|fPIE|fpie:-D__PIC__ -D__pic__}                            \
  %{posix:-D_POSIX_SOURCE}"

The missing bits are %(cpp_arch).  Also note the bogus quotation in the spec.

I think it's up to the FreeBSD maintainer to decide what is the best long-term
fix.  For 4.0.0, something like:

#undef  CPP_SPEC
#define CPP_SPEC \
  %(cpp_cpu)                                                            \
  %(cpp_arch)                                                           \
  %{fPIC|fpic|fPIE|fpie:-D__PIC__ -D__pic__}                            \
  %{posix:-D_POSIX_SOURCE}

in config/sparc/freebsd.h should be good enough.

Gerald, if it works for you, I can approve it on principle for the 4.0 branch
and I think you can ask Mask permission for installing it before 4.0RC2.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|bootstrap                   |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20633

Reply via email to