From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17998 invoked by alias); 12 May 2014 16:59:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17969 invoked by uid 89); 12 May 2014 16:59:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 3 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 May 2014 16:59:09 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4CGx6Hh030421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 May 2014 12:59:07 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-85.phx2.redhat.com [10.3.113.85]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4CGx5ds002316; Mon, 12 May 2014 12:59:05 -0400 Message-ID: <5370FDD9.8030802@redhat.com> Date: Mon, 12 May 2014 16:59:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: John Marino , "Joseph S. Myers" CC: gcc-patches@gcc.gnu.org, Jonathan Wakely , Gerald Pfeifer , manu@gcc.gnu.org, "Eric Botcazou (gnu.org)" Subject: Re: Contributing new gcc targets: i386-*-dragonfly and x86-64-*-dragonfly References: <5352D100.9040108@marino.st> <5362DC9B.8090709@marino.st> <5363E0F4.4060900@marino.st> <53649694.6050508@marino.st> <536C671F.4080100@redhat.com> <536C8059.8090304@marino.st> In-Reply-To: <536C8059.8090304@marino.st> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00798.txt.bz2 On 05/09/14 01:14, John Marino wrote: > On 5/9/2014 07:26, Jeff Law wrote: >> On 05/03/14 01:11, John Marino wrote: >> >> In config.gcc: >> >> + no | gnat | single) >> + # Let these non-posix thread selections fall through if requested >> Support for "gnat" as a thread model was removed in 2011. So I think >> you need to remove that case. > > I realized that the gnat thread mechanism had been removed a couple of > days ago, but I didn't want to invalidate the ongoing review since it > was a not really an issue. I'll make the change now. This hunk was > obviously created when it did exist. No problem. > >> configure.ac: >> >> + *-*-dragonfly* | *-*-freebsd*) >> + if grep dl_iterate_phdr $target_header_dir/sys/link_elf.h > >> /dev/null 2>&1; then >> + gcc_cv_target_dl_iterate_phdr=yes >> + else >> + gcc_cv_target_dl_iterate_phdr=no >> + fi >> + ;; >> Presumably you intended to change freebsd* here. Just want a >> confirmation. I haven't worked on the *bsd platforms in about 20 years, >> so I have no idea if this is right for them in general. > > > Yes, this is intentional. This is why I also did a full testsuite on > FreeBSD as well as DragonFly to prove that still worked. OK. Just wanted to be sure. As I mentioned, it's been a *long* time since I did anything with the *bsd ports. > > NetBSD and OpenBSD would be handled similarly when the time comes, but > they would need to grep a different header. > > >> I see you have a dragonfly-stdint.h. Is there a particular reason why >> you can't use the freebsd-stdint.h? I didn't check every type, but a >> quick glance makes me think they ought to be equivalent. >> >> Similarly for dragonfly.opt. > > And there is already precedent for each system to have its own files: > > freebsd.opt freebsd-stdint.h > openbsd.opt openbsd-stdint.h > netbsd.opt ( > > The dragonfly-stdint.h is cleaner than freebsd-stdint.h as well. Yea, there's always a bit of a natural tension between having this kind of stuff duplicated vs sharing when their contents are common. I lean towards the latter in this case for a variety of reasons. > > While similar due to heritage, and also due to a conscious effort to > keep the userland compatible where a difference isn't specifically > needed, DragonFly is not FreeBSD. We've had a challenge with software > that consider them to be equivalent in every aspect. I certainly understand having done similar stuff in the past. > > Sometimes changes are made against a FreeBSD file that is not valid for > DragonFly, so even if they are equivalent today they may not be in the > future. We prefer separate configuration files like NetBSD and OpenBSD > have in general. Right and this is the most important counter-argument to sharing. They're compatible today, but will they be tomorrow? It sounds like Dragonfly has a bit of a mandate to be different than FreeBSD, so there's probably more than the usual chance this stuff could diverge in the future. > > by the way config/dragonfly.h and config/i386/dragonfly.h are > significantly different that FreeBSD counterparts. And we eliminated > the equivalent of config/i386/freebsd64.h by combining it's > functionality into config/i386/dragonfly.h. There are also > platform-specific differences there so there is no question that > DragonFly needs its own header files. I saw that when scanning dragfonfly.h and freebsd.h to see how much commonality there was between them. > >> I'm going to trust the unwind code works and isn't duplicating something >> from somewhere else that ought to instead be shared. > > Not only is it not duplicated, FreeBSD needs its own, different version > (FreeBSD is currently missing unwind functionality). I have the patch > and that's a separate submission (out of scope for DragonFly target > creation). Believe me, if there is one thing you would not want to > duplicate, it's MD support code. FYI NetBSD and OpenBSD are missing > this functionality too. > > >> So it basically looks good. Can you fix the config.gcc nit and >> determine if we can (and should) share files with freebsd. Repost after >> those fixes and we should be ready to go. > > 1) Patch updated online as requested > 2) At this exact point in time, we probably can share the files > 3) I might debate that we should share the files - that would imply > reviewing the existing counterpart files for NetBSD and OpenBSD and > combining when equivalent. Let's go ahead and keep the files separate. We can always go back and combine them at a later date if we see the need. So with that in mind, the patch is good to go with the gnat thread stuff removed. Do you have write access, or do you you need someone to commit the change for you? Jeff