This is the mail archive of the
mailing list for the GCC project.
Re: Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: John Marino <gnugcc at marino dot st>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Gerald Pfeifer <gerald at pfeifer dot com>, "manu at gcc dot gnu.org" <manu at gcc dot gnu dot org>, "Eric Botcazou (gnu.org)" <ebotcazou at gcc dot gnu dot org>
- Date: Thu, 8 May 2014 14:14:55 +0100
- Subject: Re: Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly
- Authentication-results: sourceware.org; auth=none
- References: <5352D100 dot 9040108 at marino dot st> <Pine dot LNX dot 4 dot 64 dot 1405012259450 dot 16441 at digraph dot polyomino dot org dot uk> <5362DC9B dot 8090709 at marino dot st> <Pine dot LNX dot 4 dot 64 dot 1405021746390 dot 4946 at digraph dot polyomino dot org dot uk> <5363E0F4 dot 4060900 at marino dot st> <Pine dot LNX dot 4 dot 64 dot 1405022013520 dot 7129 at digraph dot polyomino dot org dot uk> <53649694 dot 6050508 at marino dot st>
On 3 May 2014 08:11, John Marino wrote:
> On 5/2/2014 22:15, Joseph S. Myers wrote:
>> On Fri, 2 May 2014, John Marino wrote:
>>> 1) I don't know which type definitions are missing (iow, the important
>>> ones from sys/type.h that are required to build gcc)
>> The default presumption should be:
>> * <stddef.h> from GCC provides what it needs to provide; nothing extra is
>> needed and such a #include should not be needed at all.
>> * Special measures to avoid duplicate typedefs (where some other header
>> also defines one of the typedefs defined in <stddef.h>) aren't in fact
>> needed, because GCC allows duplicate typedefs in system headers (even
>> outside C11 mode - in C11 mode it's a standard feature).
>> So try removing that #include. If that causes problems, investigate based
>> on the actual problems seen.
> Hi Joseph,
> Removing the include worked after also removing the #ifdef __DragonFly
> with regards to the rune_t type definition.
> I built gcc with a full bootstraps on both DragonFly platforms
> successfully. stddef.h is much simpler now:
> --- gcc/ginclude/stddef.h.orig
> +++ gcc/ginclude/stddef.h
> @@ -133,6 +133,7 @@
> #ifndef _BSD_PTRDIFF_T_
> #ifndef ___int_ptrdiff_t_h
> #ifndef _GCC_PTRDIFF_T
> +#ifndef _PTRDIFF_T_DECLARED /* DragonFly */
> #define _PTRDIFF_T
> #define _T_PTRDIFF_
> #define _T_PTRDIFF
> @@ -141,10 +142,12 @@
> #define _BSD_PTRDIFF_T_
> #define ___int_ptrdiff_t_h
> #define _GCC_PTRDIFF_T
> +#define _PTRDIFF_T_DECLARED
> #ifndef __PTRDIFF_TYPE__
> #define __PTRDIFF_TYPE__ long int
> typedef __PTRDIFF_TYPE__ ptrdiff_t;
> +#endif /* _PTRDIFF_T_DECLARED */
> #endif /* _GCC_PTRDIFF_T */
> #endif /* ___int_ptrdiff_t_h */
> #endif /* _BSD_PTRDIFF_T_ */
> @@ -198,6 +201,7 @@
> #define _GCC_SIZE_T
> #define _SIZET_
> #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
> + || defined(__DragonFly__) \
> || defined(__FreeBSD_kernel__)
> /* __size_t is a typedef on FreeBSD 5, must not trash it. */
> #elif defined (__VMS__)
> revised patchset :
> revised changelog :
> revised commit msg:
> Good catch! Does the rest of the patch set look good to you? I think
> all the non-obvious patches have been reviewed collectively by various
> people now and may be ready to be approved now.
Ian's approved the libiberty.h change, Joseph's approved the stddef.h
change, I've approved the libstdc++ parts.
IIUC it still needs explicit approval for the rest, e.g. trivial
adjustments to configuration stuff in libitm and libcilkrts. Are there
specific maintainers for those libs?
The rest look obvious to me, it doesn't touch other targets at all
except for one bit that replaces a check for __FreeBSD__ >= 7 with a
grep for the dl_iterate_phdr function in a system header, which only
affects FreeBSD and looks OK to me.
Anyone willing to give it an overall approval?