This is the mail archive of the 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]

Re: [PATCH] rs6000.c ELF bits inclusion

On Wed, May 02, 2001 at 11:06:57PM -0400, David Edelsohn wrote:
> > W/o this change one must include config/svr4.h rather than
> > config/elfos.h, which is just wrong on BSD hosts as config/svr4.h
> > contains bits specific to that platform vs. the generic ELF object
> > format.
> 	What do you mean by "contains bits specific to that platform"?
> SVR4 is not a platform?  For PowerPC, the only defined ABIs are PowerOpen
> (AIX and related to Darwin) and SVR4 (including eABI).  eABI is a
> derivative of SVR4.  There are no other ABIs.  What other "generic" ELF
> object format is FreeBSD for PowerPC using that SVR4 is a conflict?

Did you look at config/svr4.h???

    #define WORD_SWITCH_TAKES_ARG(STR)			\
      && strcmp (STR, "Tdata") && strcmp (STR, "Ttext")	\
      && strcmp (STR, "Tbss"))

No BSD ELF implementation supports these.

    #undef  ASM_SPEC
    #define ASM_SPEC \
      "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"

This ASM spec is wrong.

    #define MD_EXEC_PREFIX "/usr/ccs/bin/"
    #define MD_STARTFILE_PREFIX "/usr/ccs/lib/"

These MD spec are *WAY* wrong.  This is a SVR4 _platform_ setting.  Where
in any ELF ABI is this spec specified?

    /* Provide a LIB_SPEC appropriate for svr4.  Here we tack on the default
       standard C library (unless we are building a shared library).  */

    #undef	LIB_SPEC
    #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"

As the comment says, "appropriate for svr4", not all ELF platforms and
certainly not FreeBSD.

    /* Provide an ENDFILE_SPEC appropriate for svr4.  Here we tack on our own
    #define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"

Again, this is a bogus setting to force down ever ELF implementations
I need this one "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s",
and why should I have to #undef the world?

    /* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o,
       /usr/ccs/lib/values-Xa.o, or /usr/ccs/lib/values-Xt.o for each final
       link step (depending upon the other gcc options selected, such as
       -traditional and -ansi).  These files each contain one (initialized)
       copy of a special variable called `_lib_version'.  Each one of these
       files has `_lib_version' initialized to a different (enum) value.
       The SVR4 library routines query the value of `_lib_version' at run
       to decide how they should behave.  Specifically, they decide (based
       upon the value of `_lib_version') if they will act in a strictly ANSI
       conforming manner or not.  */

    #define STARTFILE_SPEC "%{!shared: \

I won't even go into how this is very much a system implimentation
setting is only appropriate for "true-blue" generic SVR4 implementations.

    /* Define the actual types of some ANSI-mandated types.  (These
       definitions should work for most SVR4 systems).  */

systems => platforms to me.

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