* gdb-7.4 bfin simulator fails to build on Fedora 17 @ 2012-01-24 17:58 Ralf Corsepius 2012-01-24 20:59 ` Mike Frysinger 0 siblings, 1 reply; 5+ messages in thread From: Ralf Corsepius @ 2012-01-24 17:58 UTC (permalink / raw) To: gdb Hi, 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. Ralf ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb-7.4 bfin simulator fails to build on Fedora 17 2012-01-24 17:58 gdb-7.4 bfin simulator fails to build on Fedora 17 Ralf Corsepius @ 2012-01-24 20:59 ` Mike Frysinger 2012-01-25 6:18 ` Ralf Corsepius 0 siblings, 1 reply; 5+ messages in thread From: Mike Frysinger @ 2012-01-24 20:59 UTC (permalink / raw) To: gdb; +Cc: Ralf Corsepius [-- Attachment #1: Type: Text/Plain, Size: 1964 bytes --] 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 ... -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb-7.4 bfin simulator fails to build on Fedora 17 2012-01-24 20:59 ` Mike Frysinger @ 2012-01-25 6:18 ` Ralf Corsepius 2012-01-25 6:44 ` Mike Frysinger 0 siblings, 1 reply; 5+ messages in thread From: Ralf Corsepius @ 2012-01-25 6:18 UTC (permalink / raw) To: Mike Frysinger; +Cc: gdb, Ralf Corsepius [-- Attachment #1: Type: text/plain, Size: 2348 bytes --] 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 [-- Attachment #2: gdb-7.4-sim-bfin.diff --] [-- Type: text/x-patch, Size: 420 bytes --] 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 <linux/mii.h> #define REG_PHY_SIZE 0x20 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb-7.4 bfin simulator fails to build on Fedora 17 2012-01-25 6:18 ` Ralf Corsepius @ 2012-01-25 6:44 ` Mike Frysinger 2012-03-04 19:57 ` Mike Frysinger 0 siblings, 1 reply; 5+ messages in thread From: Mike Frysinger @ 2012-01-25 6:44 UTC (permalink / raw) To: Ralf Corsepius; +Cc: gdb [-- Attachment #1: Type: Text/Plain, Size: 571 bytes --] On Wednesday 25 January 2012 01:15:27 Ralf Corsepius wrote: > 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}. you didn't go back far enough ;). iirc, the failure was reported against an older version of OpenSUSE. i can dig up the bug report, but it'd take time. i'll probably extend the configure logic and have it try linux/mii.h by itself, and if that fails, enable the hack. -mike [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb-7.4 bfin simulator fails to build on Fedora 17 2012-01-25 6:44 ` Mike Frysinger @ 2012-03-04 19:57 ` Mike Frysinger 0 siblings, 0 replies; 5+ messages in thread From: Mike Frysinger @ 2012-03-04 19:57 UTC (permalink / raw) To: gdb; +Cc: Ralf Corsepius [-- Attachment #1: Type: Text/Plain, Size: 1200 bytes --] i've committed this. i'll worry about old systems when someone complains again. -mike 2012-02-04 Mike Frysinger <vapier@gentoo.org> * config.in: Regenerate. * configure: Likewise. * configure.ac: Add linux/types.h to AC_CHECK_HEADERS. * dv-eth_phy.c: Check for HAVE_LINUX_TYPES_H, and delete __u16 and _LINUX_TYPES_H defines. --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -54,7 +54,14 @@ SIM_AC_OPTION_HARDWARE(yes,,\ ) AC_CHECK_FUNCS([getuid getgid geteuid getegid setuid setgid mmap munmap kill pread]) -AC_CHECK_HEADERS([sys/ioctl.h sys/mman.h net/if.h linux/if_tun.h linux/mii.h]) +AC_CHECK_HEADERS([ \ + linux/if_tun.h \ + linux/mii.h \ + linux/types.h \ + net/if.h \ + sys/ioctl.h \ + sys/mman.h \ +]) BFIN_SIM_EXTRA_OBJS= --- a/sim/bfin/dv-eth_phy.c +++ b/sim/bfin/dv-eth_phy.c @@ -23,11 +23,10 @@ #include "sim-main.h" #include "devices.h" -#ifdef HAVE_LINUX_MII_H +#if defined (HAVE_LINUX_MII_H) && defined (HAVE_LINUX_TYPES_H) /* Workaround old/broken linux headers. */ -#define _LINUX_TYPES_H -#define __u16 unsigned short +#include <linux/types.h> #include <linux/mii.h> #define REG_PHY_SIZE 0x20 [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-04 19:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-01-24 17:58 gdb-7.4 bfin simulator fails to build on Fedora 17 Ralf Corsepius 2012-01-24 20:59 ` Mike Frysinger 2012-01-25 6:18 ` Ralf Corsepius 2012-01-25 6:44 ` Mike Frysinger 2012-03-04 19:57 ` Mike Frysinger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).