This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__sparcv9 vs. __sparc_v9__ is a mess in 3.2.1


What is supose to be the GCC offical pre-defined symbol for Sparc64??

gcc/config/sparc.h implies it is "__sparc_v9__":

    #if TARGET_CPU_DEFAULT == TARGET_CPU_v9
    #define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
    ...
    #endif
    #if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
    #define CPP_CPU64_DEFAULT_SPEC "-D__sparc_v9__"
    ...
    #endif
    #define CPP_CPU_SPEC "\
    ...
    %{mcpu=v9:-D__sparc_v9__} \
    %{mcpu=ultrasparc:-D__sparc_v9__} \

BUT sol2-bi.h goes against that with:

    #undef CPP_ARCH64_SPEC
    #define CPP_ARCH64_SPEC
    ...
    -D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9

AND every other place in GCC it matters what the sparc arch is the
test is:

    #ifdef __sparcv9
    --or--
    && (!defined(__sparc__) || (!defined(__sparcv9) && !defined(__arch64__)))
    --or--
    #if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9)

this ChangeLog says it was intentional:

    1999-12-14  Jakub Jelinek  <jakub@redhat.com>
    ...
    * config/sparc/xm-sp64.h: Avoid using __sparc_v9__ when testing
    for sparc64.
    * config/sparc/sparc.h: Likewise.
    * config/sparc/xm-sysv4-64.h: Likewise.
    * config/float-sparc.h: Likewise.
    * glimits.h: Likewise.
    * longlong.h: Likewise.

So just what is it supose to be???
And why is just plain __arch64__ not enough?

-- 
-- David  (obrien@FreeBSD.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]