[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Glibc-bsd-hackers] Re: [PATCH] GNU/k*BSD support (with ChangeLog) for g
From: |
Robert Millan |
Subject: |
[Glibc-bsd-hackers] Re: [PATCH] GNU/k*BSD support (with ChangeLog) for gcc |
Date: |
Thu, 15 Apr 2004 20:00:10 +0200 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
Hi Jim,
On Wed, Apr 14, 2004 at 06:27:22PM -0700, Jim Wilson wrote:
> Robert Millan wrote:
> > * libtool.m4: Add kfreebsd*-gnu and knetbsd*-gnu.
> > * ltconfig: Likewise.
> > * ltcf-c.sh: Likewise.
> > * ltcf-cxx.sh: Likewise.
> > * ltcf-gcj.sh: Likewise.
>
> These files are from the upstream package libtool. Our rules say that
> the patches have to be submitted to and accepted by the libtool
> maintainers first. Once that is done, they can be merged into the gcc
> tree without further approval.
My patches for libtool are already integrated and present in release 1.5.2.
Note: I asked the GCC maintainers for a libtool update some time ago, and in
response I was told that doing this would open a big can of worms because of
autotools stuff (still sticking with autoconf 2.13).
Still want me to remove that part of the patch?
> >diff -Nur gcc.old/gcc/config/i386/linux.h gcc/gcc/config/i386/linux.h
> >--- gcc.old/gcc/config/i386/linux.h 2003-11-29 04:08:10.000000000 +0100
> >+++ gcc/gcc/config/i386/linux.h 2004-03-22 20:45:45.000000000 +0100
> >+#undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */
>
> The definition in i386.h isn't bogus. It has to be there.
> SUBTARGET_EXTRA_SPECS is an optional macro. An OS port defines it only
> if it needs it. If an OS port doesn't need it, then we use the default
> definition in i386.h.
I copy-pasted this line from i386/freebsd.h. Want me to remove the comment
in i386/linux.h part of my patch?
> This seems unnecessarily wordy. Couldn't you just have something like
> #define REG_NAME(reg) reg
>
> and then in the k*bsd-gnu files this becomes something like
> #define REG_NAME (reg) sc_ ## reg
> This might have to be written differently, but there should be some way
> to use token pasting here.
Done.
> >diff -Nur gcc.old/gcc/config/kfreebsd-gnu.h gcc/gcc/config/kfreebsd-gnu.h
> >--- gcc.old/gcc/config/kfreebsd-gnu.h 1970-01-01 01:00:00.000000000
> >+0100
> >+++ gcc/gcc/config/kfreebsd-gnu.h 2004-03-22 20:46:33.000000000 +0100
>
> >+#define LINK_EMULATION "elf_i386_fbsd"
>
> This can't be right. This is a target file that should apply to
> kfreebsd-gnu for all architectures, but this is an obvious i386
> dependence. Hence it should be in a config/i386/kfreebsd-gnu.h file.
> Also, it is overriding a macro that only exists in config/i386/linux.h,
> and hence it makes no sense to put it in a target independent config
> file. Same this for DYNAMIC_LINKER which is i386 specific macro.
Fixed. I reviewed all my patch for instances of the same error.
> >diff -Nur gcc.old/gcc/config.gcc gcc/gcc/config.gcc
> >--- gcc.old/gcc/config.gcc 2004-03-14 18:24:36.000000000 +0100
> >+++ gcc/gcc/config.gcc 2004-03-22 20:32:27.000000000 +0100
>
> >- tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h
> >linux.h i386/linux.h"
> >+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h"
> >+ case ${target} in
> >+ i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
> >+ i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
> >+ esac
> >+ tm_file="${tm_file} linux.h i386/linux.h"
>
> I think you made the wrong choice here. kfreebsd-gnu.h and
> knetbsd-gnu.h should come after linux.h instead of before it, since you
> are trying to override macros defined in the linux.h files.
Done.
> This does mean a few extra #undef need to be added to the kfreebsd-gnu.h
> and knetbsd-gnu.h files, but that just helps make it obvious that we are
> overriding linux defaults.
Done too.
--
Robert Millan
"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."
-- J.R.R.T., Ainulindale (Silmarillion)