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

Re: support for i386-pc-nto-qnx* target


On Mon, Aug 12, 2002 at 07:46:23AM -0700, J.T. Conklin wrote:
> Enclosed is support for QNX 6.2 I developed for my employer.
> 
> While there are a few nits that I would have liked to have addressed
> before I submitted these changes, it is useful in its current state.
> In fact, it is planned that our next release will be built with this
> compiler.

We appreciate your contribution, and I hope it does get in
eventually.  However:

1) This should have gone to gcc-patches.
2) Please use 'i386-nto-qnx*', not 'i386-pc-nto-qnx*', as the target
name.  If the -pc- version is what config.sub/guess generate now, send
them patches to fix it.  -pc- is a mere placeholder; when you have
something meaningful to put in the COMPANY field of a canonical system
name, use it.
3) We prefer to get brand new files as diffs against /dev/null.  You
can fake out CVS by adding lines of the form

/whatever.c/0/dummy timestamp//

to CVS/Entries for the appropriate directory, after which cvs diff -N
will generate suitable diffs.

4)

> X#undef CPP_PREDEFINES
> X#define CPP_PREDEFINES  \
> X  "-D__X86__ -Di386 -D__QNXNTO__ -D__QNX__ --D__LITTLEENDIAN__ " \
> X  "-Asystem=unix -Asystem=nto -Asystem=qnxnto -Asystem=qnx " \
> X  "-Acpu=i386 -Amachine=i386"

In new code, please use TARGET_OS_CPP_BUILTINS rather than adjusting
CPP_PREDEFINES; you should not define CPP_PREDEFINES at all.  Also,
new ports should not create any assertions, nor should they
predefine macros outside the implementation name space.

  #define TARGET_OS_CPP_BUILTINS()	    \
    do {				    \
        builtin_define("__X86__");	    \
	builtin_define("__QNXNTO__");	    \
	builtin_define("__QNX__");	    \
	builtin_define("__LITTLEENDIAN__"); \
    } while (0)

If you have to #undef TARGET_OS_CPP_BUILTINS, something is wrong.

zw


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