Why is libbsd limited to ARM, x86 and x86_64?
Hello,
I'm working on a project for PowerPC in which libbsd would be useful. However the package is restricted to ARM, x86 and x86_64 architectures, since Config.in contains this:
# libbsd requires a.out.h, which is only available for those # architectures: arm, x86 (and alpha, currently not supported in Buildroot; # also m68k which is currently not enabled, so can't be tested.) default y if BR2_arm || BR2_i386 || BR2_x86_64
However, my PowerPC toolchain, generated by crosstool-NG, provides the required a.out.h file. It is based on GCC 4.8.2, GLIBC 2.19 and Kernel 3.10.47.
Where does the information about the missing a.out.h on PowerPC comes from?
Carlos Santos (Casantos) - DATACOM, P&D
Rua Am?rica, 1000 - Eldorado do Sul, RS, Brasil - 92990-000
casantos at datacom.ind.br +55 51 3933.3000 ext. 3627
http://www.datacom.ind.br
Quoted 4 lines · Carlos Santos
Hello,
I'm working on a project for PowerPC in which libbsd would be useful. However the package is restricted to ARM, x86 and
x86_64architectures, since Config.in contains this:
Quoted 8 lines
# libbsd requires a.out.h, which is only available for those # architectures: arm, x86 (and alpha, currently not supported in Buildroot; # also m68k which is currently not enabled, so can't be tested.) default y if BR2_arm || BR2_i386 || BR2_x86_64However, my PowerPC toolchain, generated by crosstool-NG, provides the required
a.out.hfile. It is based on GCC 4.8.2, GLIBC 2.19 and Kernel 3.10.47.Where does the information about the missing
a.out.hon PowerPC comes from?
I had to do some archeology for this one :-)
This exclusion was from the time that we only supported glibc for external
toolchains and it didn't get too much attention. So we missed the fact that glibc doesn't include linux/a.out.h so you won't get this[1] error. And it also seems that libbsd doesn't really require a.out support in the architecture (PPC doesn't support a.out), it just needs the a.out.h file to be present (in uClibc, a.out.h includes linux/a.out.h; in glibc, it doesn't). So for glibc, it works on any architecture.
Sometime later, the bump to 0.6.0 made libbsd require a glibc toolchain [2].
But of course, nobody noticed that this meant that the architecture dependencies are no longer needed.
So it would be great if you could prepare a patch that removes the arch
dependency and test if libbsd builds on all the arches that have glibc: aarch64, mips, sh, microblaze, sparc, nios2.
Regards,
Arnout
[1]
http://autobuild.buildroot.org/results/019/019091312ec547520370ffad967b53e23f54a14b/
[2]
http://autobuild.buildroot.net/results/e94/e949d8fabeeecc74bd1c324c516e0b4938c99dbc/
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Quoted 40 lines
From: "Arnout Vandecappelle" <[email protected]>
To: "Carlos Santos" <[email protected]>, "buildroot" <[email protected]>
Sent: Tuesday, February 2, 2016 7:09:28 PM
Subject: Re: [Buildroot] Why is libbsd limited to ARM, x86 andx86_64?Quoted 11 lines · Carlos Santos
Hello,
I'm working on a project for PowerPC in which libbsd would be useful. However the package is restricted to ARM, x86 and
x86_64architectures, since Config.in contains this:# libbsd requires a.out.h, which is only available for those # architectures: arm, x86 (and alpha, currently not supported in Buildroot; # also m68k which is currently not enabled, so can't be tested.) default y if BR2_arm || BR2_i386 || BR2_x86_64Quoted 4 lines
However, my PowerPC toolchain, generated by crosstool-NG, provides the required
a.out.hfile. It is based on GCC 4.8.2, GLIBC 2.19 and Kernel 3.10.47.Where does the information about the missing
a.out.hon PowerPC comes from?I had to do some archeology for this one :-)
This exclusion was from the time that we only supported glibc for external toolchains and it didn't get too much attention. So we missed the fact that glibc doesn't include
linux/a.out.hso you won't get this[1] error. And it also seems that libbsd doesn't really require a.out support in the architecture (PPC doesn't support a.out), it just needs thea.out.hfile to be present (in uClibc,a.out.hincludeslinux/a.out.h; in glibc, it doesn't). So for glibc, it works on any architecture.Sometime later, the bump to 0.6.0 made libbsd require a glibc toolchain [2]. But of course, nobody noticed that this meant that the architecture dependencies are no longer needed.
So it would be great if you could prepare a patch that removes the arch dependency and test if libbsd builds on all the arches that have glibc: aarch64, mips, sh, microblaze, sparc, nios2.
Quoted 6 lines
Regards,
Arnout
[1]
http://autobuild.buildroot.org/results/019/019091312ec547520370ffad967b53e23f54a14b/
[2]
http://autobuild.buildroot.net/results/e94/e949d8fabeeecc74bd1c324c516e0b4938c99dbc/
OK, I will submit a patch.
Carlos Santos (Casantos)
DATACOM, P&D
Two questions, first:
1. Is it enough to build for quemu boards?
2. I'm absolutely ignorant about nios2. What defconfig should I use to build for it?
Carlos Santos (Casantos)
DATACOM, P&D
----- Original Message -----
Quoted 58 lines
From: "Carlos Santos" <[email protected]>
To: "Arnout Vandecappelle" <[email protected]>
Cc: "buildroot" <[email protected]>, "guilherme machado" <[email protected]>
Sent: Wednesday, February 3, 2016 1:39:51 PM
Subject: Re: [Buildroot] Why is libbsd limited to ARM, x86 andx86_64?Quoted 41 lines
From: "Arnout Vandecappelle" <[email protected]>
To: "Carlos Santos" <[email protected]>, "buildroot" <[email protected]>
Sent: Tuesday, February 2, 2016 7:09:28 PM
Subject: Re: [Buildroot] Why is libbsd limited to ARM, x86 andx86_64?Quoted 11 lines · Carlos Santos
Hello,
I'm working on a project for PowerPC in which libbsd would be useful. However the package is restricted to ARM, x86 and
x86_64architectures, since Config.in contains this:# libbsd requires a.out.h, which is only available for those # architectures: arm, x86 (and alpha, currently not supported in Buildroot; # also m68k which is currently not enabled, so can't be tested.) default y if BR2_arm || BR2_i386 || BR2_x86_64Quoted 4 lines
However, my PowerPC toolchain, generated by crosstool-NG, provides the required
a.out.hfile. It is based on GCC 4.8.2, GLIBC 2.19 and Kernel 3.10.47.Where does the information about the missing
a.out.hon PowerPC comes from?I had to do some archeology for this one :-)
This exclusion was from the time that we only supported glibc for external toolchains and it didn't get too much attention. So we missed the fact that glibc doesn't include
linux/a.out.hso you won't get this[1] error. And it also seems that libbsd doesn't really require a.out support in the architecture (PPC doesn't support a.out), it just needs thea.out.hfile to be present (in uClibc,a.out.hincludeslinux/a.out.h; in glibc, it doesn't). So for glibc, it works on any architecture.Sometime later, the bump to 0.6.0 made libbsd require a glibc toolchain [2]. But of course, nobody noticed that this meant that the architecture dependencies are no longer needed.
So it would be great if you could prepare a patch that removes the arch dependency and test if libbsd builds on all the arches that have glibc: aarch64, mips, sh, microblaze, sparc, nios2.
Quoted 6 lines
Regards,
Arnout
[1]
http://autobuild.buildroot.org/results/019/019091312ec547520370ffad967b53e23f54a14b/
[2]
http://autobuild.buildroot.net/results/e94/e949d8fabeeecc74bd1c324c516e0b4938c99dbc/OK, I will submit a patch.
Carlos Santos (Casantos)
DATACOM, P&D
[Please don't top-post]
Quoted 3 lines · Carlos Santos
Two questions, first:
1. Is it enough to build for quemu boards?
Sure. I don't think runtime testing is really needed, except maybe for powerpc.
Quoted 2 lines
2. I'm absolutely ignorant about nios2. What defconfig should I use to build for it?
Hm, looks like we don't have a nios2 defconfig... But you can do a very quick
build-test by setting arch to nios2 and selecting the Sourcery toolchain.
Regards,
Arnout
Quoted 3 lines
Carlos Santos (Casantos)
DATACOM, P&D
Signature · 6 lines
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile) Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Hi Carlos, Arnout,
Quoted 6 lines · Arnout Vandecappelle
Quoted 2 lines · Carlos Santos
2. I'm absolutely ignorant about nios2. What defconfig should I use to build for it?
Hm, looks like we don't have a nios2 defconfig... But you can do a very quick
build-test by setting arch to nios2 and selecting the Sourcery toolchain.
You can also use the config at
http://autobuild.buildroot.net/toolchains/configs/br-nios2-glibc.config.
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -Quoted 11 lines
From: "Baruch Siach" <[email protected]>
To: "Arnout Vandecappelle" <[email protected]>
Cc: "Carlos Santos" <[email protected]>, "guilherme machado" <[email protected]>, "buildroot" <[email protected]>
Sent: Thursday, February 4, 2016 3:21:32 AM
Subject: Re: [Buildroot] Why is libbsd limited to ARM, x86 andx86_64?Hi Carlos, Arnout,
Quoted 1 line · Arnout Vandecappelle
On 03-02-16 19:50, Carlos Santos wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
2. I'm absolutely ignorant about nios2. What defconfig should I use to build for it?
Hm, looks like we don't have a nios2 defconfig... But you can do a very quick
build-test by setting arch to nios2 and selecting the Sourcery toolchain.You can also use the config at
http://autobuild.buildroot.net/toolchains/configs/br-nios2-glibc.config.
OK, I was able to build libbsd and its dependent packages (libedit and netcat-openbsd) using br-nios2-glibc.config, as well as the following defconfigs: (some of them modified to use glibc instead of uClibc):
- qemu_aarch64_virt
- qemu_mips64_malta
- qemu_mips64el_malta
- qemu_mips_malta
- qemu_mipsel_malta
- qemu_sh4_r2d
- qemu_sparc64_sun4u
- qemu_sparc_ss10
The compilation for microblaze failed using br-microblazeel-full.config, taken from the autobuilder (build log saved at http://ur1.ca/ohak2). It also failed, for similar reasons using the existing defconfig's:
- qemu_microblazebe_mmu
- qemu_microblazeel_mmu
'
The compilation also failed using qemu_sh4eb_r2d_defconfig but I don't think it is a valid test, since I forced BR2_TOOLCHAIN_BUILDROOT_GLIBC to "y".
So I think I should disable libbsd for the microblaze architecture, at least for the moment.
Carlos Santos (Casantos)
DATACOM, P&D