Hi Khem, On Aug 19, 2012, at 10:36 AM, Elvis Dowson wrote:
> What should I do to enable multilib in gcc-4.7? > > I think at the moment, in gcc-configure-common.inc, it is disabled. > > If I were to re-enable it as follows, based on what I've diff'd from the Denx > ELDK repo, what how does the GCCMULTILIB variable evaluate? > > -GCCMULTILIB = "--disable-multilib" > +GCCMULTILIB = '${@base_contains("MULTILIB_ARCH_LIST", "${TARGET_ARCH}", > "--enable-multilib", "--disable-multilib",d)}' > > I think multilib has to be enabled, no? > > In file gcc/config/rs6000/t-ppcos.c > > # Multilibs for a powerpc hosted ELF target (linux, SVR4) > > MULTILIB_OPTIONS = msoft-float > MULTILIB_DIRNAMES = nof > MULTILIB_EXTRA_OPTS = fPIC mstrict-align > MULTILIB_EXCEPTIONS = > > MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT} > > > Here is the full patch, which I am assuming enables multilib, and get libgcc > to generate the nof libraries to the target: > > diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc > b/meta/recipes-devtools/gcc/gcc-configure-common.inc > index 908ad3e..a3fa294 100644 > --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc > +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc > @@ -25,7 +25,7 @@ EXTRA_OECONF_PATHS ?= "" > EXTRA_OECONF_INITIAL ?= "" > EXTRA_OECONF_INTERMEDIATE ?= "" > > -GCCMULTILIB = "--disable-multilib" > +GCCMULTILIB = '${@base_contains("MULTILIB_ARCH_LIST", "${TARGET_ARCH}", > "--enable-multilib", "--disable-multilib",d)}' > > EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', > True) != 'no']} \ > --with-gnu-ld \ > diff --git a/meta/recipes-devtools/gcc/libgcc_4.7.bb > b/meta/recipes-devtools/gcc/libgcc_4.7.bb > index c796253..aac81f6 100644 > --- a/meta/recipes-devtools/gcc/libgcc_4.7.bb > +++ b/meta/recipes-devtools/gcc/libgcc_4.7.bb > @@ -18,7 +18,9 @@ FILES_${PN} = "${base_libdir}/libgcc*.so.*" > FILES_${PN}-dev = " \ > ${base_libdir}/libgcc*.so \ > ${libdir}/${TARGET_SYS}/${BINV}/*crt* \ > - ${libdir}/${TARGET_SYS}/${BINV}/libgcc*" > + ${libdir}/${TARGET_SYS}/${BINV}/libgcc* \ > + ${libdir}/${TARGET_SYS}/${BINV}/nof/crt* \ > + ${libdir}/${TARGET_SYS}/${BINV}/nof/libgcc*" > FILES_libgcov${PKGSUFFIX}-dev = " \ > ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \ > " Hmm, that didn't work, and no nof libraries were generated on the target. zImage starting: loaded at 0x00800000 (sp: 0x018cdfb0) Allocating 0x542f0c bytes for kernel ... gunzipping (0x00000000 <- 0x0080f000:0x00a1886f)...done 0x4255c0 bytes Attached initrd image at 0x00a19000-0x018ccf92 initrd head: 0x1f8b0808 Linux/PowerPC load: console=ttyS0,9600n8 ip=off root=/dev/ram rw rootwait init=/bin/sh Finalizing device tree... flat tree at 0x18da0e0 PM: Adding info for No Bus:ttyv9 [ 0.582992] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.588287] 83e00000.serial: ttyS0 at MMIO 0x83e01003 (irq = 20) is a 16550 [ 0.783785] console [ttyS0] enabled [ 0.829080] brd: module loaded [ 0.875518] loop: module loaded [ 0.912757] xsysace 83600000.sysace: Xilinx SystemACE revision 1.0.12 [ 0.989471] xsysace 83600000.sysace: No CF in slot [ 1.048455] Xilinx SystemACE device driver, major=254 [ 1.109414] xilinx_emaclite 81000000.ethernet: Device Tree Probing [ 1.182945] xilinx_emaclite 81000000.ethernet: error registering MDIO bus [ 1.264024] xilinx_emaclite 81000000.ethernet: MAC address is now 00:0a:35:b7:78:00 [ 1.357651] xilinx_emaclite 81000000.ethernet: Xilinx EmacLite at 0x81000000 mapped to 0xD10A0000, irq=17 [ 1.472557] xilinx_ps2 81480000.ps2: Device Tree Probing 'ps2' [ 1.541805] xilinx_ps2 81480000.ps2: Xilinx PS2 at 0x81480000 mapped to 0xd1036000, irq=22 [ 1.641181] xilinx_ps2 81481000.ps2: Device Tree Probing 'ps2' [ 1.710886] xilinx_ps2 81481000.ps2: Xilinx PS2 at 0x81481000 mapped to 0xd1038000, irq=23 [ 1.811438] mousedev: PS/2 mouse device common for all mice [ 1.879037] i2c /dev entries driver [ 1.920644] Device Tree Probing 'i2c' [ 1.964913] xilinx-iic #0 at 0x81600000 mapped to 0xD10C0000, irq=18 [ 2.042572] TCP cubic registered [ 2.080419] NET: Registered protocol family 17 [ 2.874354] atkbd serio0: keyboard reset failed on xilinxps2/serio at 81480000 [ 3.358644] RAMDISK: gzip image found at block 0 [ 3.882546] input: AT Raw Set 2 keyboard as /devices/plb.0/xps-ps2.1/81481000.ps2/serio1/input/input0 [ 6.370713] EXT2-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended [ 6.468154] VFS: Mounted root (ext2 filesystem) on device 1:0. [ 6.538666] Freeing unused kernel memory: 152k freed /bin/sh: can't access tty; job control turned off [ 6.682471] Kernel panic - not syncing: Attempted to kill init! [ 6.752622] Rebooting in 180 seconds.. Elvis Dowson
_______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto