From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7313 invoked by alias); 25 Jan 2012 06:18:17 -0000 Received: (qmail 7304 invoked by uid 22791); 25 Jan 2012 06:18:15 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mout4.freenet.de (HELO mout4.freenet.de) (195.4.92.94) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jan 2012 06:18:02 +0000 Received: from [195.4.92.142] (helo=mjail2.freenet.de) by mout4.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port 25) (Exim 4.76 #1) id 1RpwBB-0000wP-Tw; Wed, 25 Jan 2012 07:17:57 +0100 Received: from localhost ([::1]:33014 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim 4.76 #1) id 1RpwBB-0000SX-QA; Wed, 25 Jan 2012 07:17:57 +0100 Received: from [195.4.92.14] (port=55548 helo=4.mx.freenet.de) by mjail2.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim 4.76 #1) id 1Rpw8n-0008CG-1y; Wed, 25 Jan 2012 07:15:29 +0100 Received: from hsi-kbw-149-172-203-247.hsi13.kabel-badenwuerttemberg.de ([149.172.203.247]:47600 helo=[192.168.1.104]) by 4.mx.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de) (TLSv1:CAMELLIA256-SHA:256) (port 587) (Exim 4.76 #1) id 1Rpw8m-0002dp-Pg; Wed, 25 Jan 2012 07:15:28 +0100 Message-ID: <4F1F9DFF.7040506@rtems.org> Date: Wed, 25 Jan 2012 06:18:00 -0000 From: Ralf Corsepius User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Mike Frysinger CC: gdb@sourceware.org, Ralf Corsepius Subject: Re: gdb-7.4 bfin simulator fails to build on Fedora 17 References: <4F1EF0BF.1030005@rtems.org> <201201241559.32809.vapier@gentoo.org> In-Reply-To: <201201241559.32809.vapier@gentoo.org> Content-Type: multipart/mixed; boundary="------------070401070307090705040404" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00076.txt.bz2 This is a multi-part message in MIME format. --------------070401070307090705040404 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2348 On 01/24/2012 09:59 PM, Mike Frysinger wrote: > On Tuesday 24 January 2012 12:56:15 Ralf Corsepius wrote: >> gdb-7.4's bfin simulator fails to build for bfin-rtems* targets on >> Fedora 17/RH rawhide: >> >> .... >> In file included from /usr/include/linux/ethtool.h:17:0, >> from /usr/include/linux/mii.h:12, >> from ../../../gdb-7.4/sim/bfin/dv-eth_phy.c:31: >> /usr/include/linux/if_ether.h:130:2: error: unknown type name '__be16' >> In file included from /usr/include/linux/mii.h:12:0, >> from ../../../gdb-7.4/sim/bfin/dv-eth_phy.c:31: >> /usr/include/linux/ethtool.h:21:2: error: unknown type name '__u32' >> /usr/include/linux/ethtool.h:22:2: error: unknown type name '__u32' >> /usr/include/linux/ethtool.h:23:2: error: unknown type name '__u32' >> /usr/include/linux/ethtool.h:28:2: error: unknown type name '__u8' >> /usr/include/linux/ethtool.h:29:2: error: unknown type name '__u8' >> /usr/include/linux/ethtool.h:30:2: error: unknown type name '__u8' >> /usr/include/linux/ethtool.h:31:2: error: unknown type name '__u8' >> /usr/include/linux/ethtool.h:32:2: error: unknown type name '__u8' >> /usr/include/linux/ethtool.h:33:2: error: unknown type name '__u8' >> /usr/include/linux/ethtool.h:34:2: error: unknown type name '__u32' >> /usr/include/linux/ethtool.h:35:2: error: unknown type name '__u32' >> ... >> >> The same configuration builds fine for Fedora 15/16 and openSUSE-11.4/12.1. >> >> From what I gather, the bfin simulator chokes upon kernel header >> incompatiblities. > > hmm, in linux-3.2 (and older), linux/mii.h doesn't include anything else. > seems linux-3.3-rc1 has started including linux/ethtool.h too. however, that > is unnecessary for userspace, so i'll probably send a patch to move the > include to __KERNEL__. > > dv-eth_phy.c has some hacks in it to make it build with even older kernel > headers. maybe i should have it just not build that driver on older systems > rather than try to support it ... FWIW: With the patch below applied, gdb-7.4's bfin simulator at least builds for me (--target=bfin-rtems4.11) for Centos-{5,6}-{i386,x86_64}, fedora-{15,16,17}-{i386,x86_64} and openSUSE-{11.4,12.1}-{i586,x86_64}. Seems to me, as if some of the hacks aren't required on any of these distros and harmful on bleeding edge distros ;) Ralf --------------070401070307090705040404 Content-Type: text/x-patch; name="gdb-7.4-sim-bfin.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-7.4-sim-bfin.diff" Content-length: 420 diff -Naur gdb-7.4.orig/sim/bfin/dv-eth_phy.c gdb-7.4/sim/bfin/dv-eth_phy.c --- gdb-7.4.orig/sim/bfin/dv-eth_phy.c 2012-01-06 05:54:38.000000000 +0100 +++ gdb-7.4/sim/bfin/dv-eth_phy.c 2012-01-25 05:35:16.204109337 +0100 @@ -25,9 +25,6 @@ #ifdef HAVE_LINUX_MII_H -/* Workaround old/broken linux headers. */ -#define _LINUX_TYPES_H -#define __u16 unsigned short #include #define REG_PHY_SIZE 0x20 --------------070401070307090705040404--