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

Re: configure patches for FreeBSD to support >1 architecture



  In message <19990421172748.A4853@dragon.nuxi.com>you write:
  > Sorry, here is a minor update of my FreeBSD patches.
  > 
  > > Here is a set of patches against the 1999-04-18 snapshot.  The primary
  > > goal of these patches is to move/add common stuff to files that can be
  > > shared by all FreeBSD architectures.  Common soon will be patches for
  > > FreeBSD/Alpha support.
  > 

  > +/* This defines which switch letters take arguments.  On svr4, most of
  > +   the normal cases (defined in gcc.c) apply, and we also have -h* and
  > +   -z* options (for the linker).  We have a slightly different mix.  We
  > +   have -R (alias --rpath), no -z, --soname (-h), --assert etc. */
  > +
  > +#undef SWITCH_TAKES_ARG
  > +#define SWITCH_TAKES_ARG(CHAR) \
  > +  (   (CHAR) == 'D' \
  > +   || (CHAR) == 'U' \
  > +   || (CHAR) == 'o' \
  > +   || (CHAR) == 'e' \
  > +   || (CHAR) == 'T' \
  > +   || (CHAR) == 'u' \
  > +   || (CHAR) == 'I' \
  > +   || (CHAR) == 'm' \
  > +   || (CHAR) == 'x' \
  > +   || (CHAR) == 'L' \
  > +   || (CHAR) == 'A' \
  > +   || (CHAR) == 'V' \
  > +   || (CHAR) == 'B' \
  > +   || (CHAR) == 'b' \
  > +   || (CHAR) == 'h' \
  > +   || (CHAR) == 'z' /* ignored by ld */ \
  > +   || (CHAR) == 'R')
Egad.  Is all this crud really necessary?  This is gross.  Aren't you using
gnu-ld?  Have you hacked it for some reason?



  > +/* Place spaces around this string.  We depend on string splicing to produ
  > ce
  > +   the final CPP_PREDEFINES value.  */
  > +#define CPP_FBSD_PREDEFINES " -Dunix -D__FreeBSD__ -Asystem(unix) -Asystem
  > (FreeBSD) "
No.  You can't depend on string splicing.  You need to find another way to do
this that does not depend on ANSI features. 

  > +/* Use more efficient ``thunks'' to implement C++ vtables. */
  > +#undef DEFAULT_VTABLE_THUNKS
  > +#define DEFAULT_VTABLE_THUNKS 1
Be very careful with this.  There are cases where it's known not to work. 
While folks are working on the problem, it's not solved yet (and probably will
not be solved in time for egcs-1.2).

  > +/* FREEBSD_NATIVE is defined when gcc is integrated into the FreeBSD
  > +   source tree so it can be configured appropriately without using
  > +   the GNU configure/build mechanism. */
  > +
  > +#ifdef FREEBSD_NATIVE
I'll reiterate my objection to the BLAH_NATIVE stuff.  It's a total mess and
the wrong approach to dealing with these kinds of issues.

  > +/* FreeBSD is 4.4BSD derived */
  > +#define bsd4_4
What did you need this for?  This sounds like a host issue, we want to avoid
lots of host #ifdefs in favor of autoconf. 

  >  #undef CPP_PREDEFINES
  > -#define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__ -Asystem(uni
  > x) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
  > +#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDE
  > FINES
Can we kill -Di386 while we're in here?  It is an ANSI/ISO namespace violation
for the compiler to define -Di386.

  > -	%{static:-static}}}"
  > +	%{static:-Bstatic}}}"
?  What's the point behind this change?

jeff


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