Cross compiling glib-2.74.0 to qnx 7.0
Hello
I have cross compiled glib-2.74.0 to qnx 7.0 using the qnx gcc 5.4 cross compiler. So far so good. But, when I compile a small test program that links to glib (it doesn't use anything in glib, just linking) and run it on my qnx target I get a segmentation fault before the main method is invoked
Process 10940512 (DemoExe) terminated SIGSEGV code=1 fltno=11 ip=0000000100053df3(/usr/lib/ldqnx-64.so.2@_dl_debug_state+0x0000000000001893) mapaddr=0000000000053df3. ref=0000000000000008
Memory fault (core dumped)
I have had a thorough look at config and build logs, and nothing smells funny there. My cross file looks like this:
[host_machine]
system = 'qnx'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[properties]
growing_stack = false
pkg_config_path = '/path_to_my_pc_files'
[binaries]
c = '/my_toolchain_dir/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc'
cpp = '/my_toolchain_dir/qnx700/host/linux/x86_64/usr/bin/ntox86_64-g++'
ar = '/my_toolchain_dir/qnx700/host/linux/x86_64/usr/bin/ntox86_64-ar'
ld = '/my_toolchain_dir/qnx700/host/linux/x86_64/usr/bin/ntox86_64-ld'
objcopy = 'None'
strip = '/my_toolchain_dir/qnx700/host/linux/x86_64/usr/bin/ntox86_64-strip'
windres = 'windres'
Could this be a static initialization problem as the main method is never reached? Any help or hints would be much appreciated.
I have attached the config/build output.
Edited by Klaus Holst Jacobsen