Norman,
CC_OPT seems to work on the compile stage, but not the link stage...
COMPILE new_delete.o /usr/local/genode-gcc-x86_32/bin/genode-x86-g++ -m32 -L/usr/lib32 -DFOOOOOOBARRR -ffunction-sections -fno-strict-aliasing -nostdinc -g -march=i686 -O2 -MMD -MP -MT 'new_delete.o new_delete.d' -Wall -I. -I/usr/include -I/home/dwaddington/git/omnios/genode/base-linux/src/platform/x86_32 -I/home/dwaddington/git/omnios/genode/base/include/x86 -I/home/dwaddington/git/omnios/genode/base/include/32bit -I/home/dwaddington/git/omnios/genode/base-linux/include -I/home/dwaddington/git/omnios/genode/base/include -I/home/dwaddington/git/omnios/genode/os/include -I/home/dwaddington/git/omnios/genode/demo/include -I/home/dwaddington/git/omnios/genode/libc/include -I/usr/local/genode-gcc-x86_32/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/include -c /home/dwaddington/git/omnios/genode/base/src/base/cxx/new_delete.cc -o new_delete.o LINK audio_out_drv libs=/home/dwaddington/git/omnios/build/genode-linux_x86/var/libcache; /usr/local/genode-gcc-x86_32/bin/genode-x86-g++ -Wl,-gc-sections -Wl,-Tldscripts/elf_i386.xc -Wl,-T/home/dwaddington/git/omnios/genode/base-linux/src/platform/context_area.stdlib.ld -Wl,--whole-archive -Wl,--start-group alsa.o main.o new_delete.o $libs/allocator_avl/allocator_avl.lib.a $libs/avl_tree/avl_tree.lib.a $libs/console/console.lib.a $libs/env/env.lib.a $libs/heap/heap.lib.a $libs/ipc/ipc.lib.a $libs/lock/lock.lib.a $libs/log_console/log_console.lib.a $libs/server/server.lib.a $libs/signal/signal.lib.a $libs/slab/slab.lib.a $libs/syscall/syscall.lib.a $libs/thread/thread.lib.a -Wl,--end-group -Wl,--no-whole-archive -lasound /usr/local/genode-gcc-x86_32/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc.a -o audio_out_drv
Daniel
On 03/14/2011 11:36 AM, Norman Feske wrote:
Hi Daniel,
Looks like the problem is only specific to .. ./os/src/drivers/audio_out ./os/src/drivers/nic
everything else builds 32bit version on 64bit host platform.
These targets alongside 'os/src/drivers/framebuffer/sdl' are hybrid programs using both the Genode framework as well as native Linux libraries. The 'audio_out' "driver" translates Genode's 'Audio_out_session' to ALSA, 'nic' translates Genode's 'Nic_session' to a Linux tap device, and 'fb_sdl' translates Genode's 'Framebuffer_session' and 'Input_session' to libSDL. Because of their hybrid nature, those programs are built without the '-nostdlib' switch. This way, the libraries at '/usr/lib' end up in those binaries.
It looks like I need to add -m32 -L/usr/lib32 to the linux-compiled build flags - not sure how to do this, CC_OPT doesn't seem to percolate through.
Normally, 'CC_OPT' is the right variable to use. However, I would not specify those arguments globally (hence, a spec-file is the wrong place for them). They should exceptionally be used for hybrid targets only. Can you successfully build 'audio_out' by adding those arguments to 'CC_OPT' in its 'target.mk' file?
Best regards Norman