Changes between Initial Version and Version 3 of Ticket #10241


Ignore:
Timestamp:
Mar 9, 2014, 4:00:53 PM (11 years ago)
Author:
kallisti5
Comment:

http://vincesoft.blogspot.com/2012/04/how-to-solve-undefined-reference-to.html

The issue is due to this source missing for Haiku: http://cgit.haiku-os.org/buildtools/tree/gcc/libgcc/config/arm/linux-atomic.c

This gets included via: http://cgit.haiku-os.org/buildtools/tree/gcc/libgcc/config/arm/t-linux-eabi

Which gets included via: http://cgit.haiku-os.org/buildtools/tree/gcc/libgcc/config.host#n332

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10241 – Description

    initial v3  
    44}}}
    55
    6 haiku loader fails: (it's Raspberry Pi in this example, but the error is in arm common code)
     6EDIT: I was building the wrong target.
     7
     8Now we are running into issues with the gcc_bootstrap build on arm. (jam -q -sHAIKU_BOOT_BOARD=verdex @bootstrap-raw)
     9
    710{{{
    8 jam -q -sHAIKU_BOOT_BOARD=raspberry_pi -sHAIKU_BOOT_PLATFORM=raspberrypi_arm haiku_loader
    9 .
    10 .
    11 /home/kallisti5/Code/haiku/src/system/boot/platform/raspberrypi_arm/video.cpp:32:2: warning: #warning IMPLEMENT platform_set_palette [-Wcpp]
    12 /home/kallisti5/Code/haiku/src/system/boot/platform/raspberrypi_arm/video.cpp:39:2: warning: #warning IMPLEMENT platform_switch_to_logo [-Wcpp]
    13 /home/kallisti5/Code/haiku/src/system/boot/platform/raspberrypi_arm/video.cpp:46:2: warning: #warning IMPLEMENT platform_switch_to_text_mode [-Wcpp]
    14 C++ /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/raspberrypi_arm/arch_framebuffer_bcm2708.o
    15 MkDir1 /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic
    16 C++ /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/text_menu.o
    17 C++ /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_blit.o
    18 C++ /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_splash.o
    19 /home/kallisti5/Code/haiku/src/system/boot/platform/generic/video_splash.cpp:21:18: fatal error: zlib.h: No such file or directory
    20 compilation terminated.
     11/bin/bash ../libtool --tag CXX   --mode=link arm-unknown-haiku-c++  --sysroot=/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot/cross-sysroot/arm/     -DPIC  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=libstdc++.la  -o libstdc++.la -version-info 6:18:0  -lm -rpath /packages/gcc_bootstrap-4.8.2_2014_02_27-1/.self/develop/tools/lib compatibility.lo compatibility-debug_list.lo compatibility-debug_list-2.lo  compatibility-c++0x.lo compatibility-atomic-c++0x.lo compatibility-thread-c++0x.lo compatibility-chrono.lo  ../libsupc++/libsupc++convenience.la ../src/c++98/libc++98convenience.la ../src/c++11/libc++11convenience.la
     12libtool: link:  arm-unknown-haiku-c++  --sysroot=/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot/cross-sysroot/arm/   -shared -nostdlib /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot/cross-sysroot/arm/boot/system/develop/lib/crti.o /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.8.2/crtbegin.o /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot/cross-sysroot/arm/boot/system/develop/lib/init_term_dyn.o  .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o  -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -Wl,--no-whole-archive  -L/home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.8.2 -L/home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.8.2/../../../../arm-unknown-haiku/lib -L/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot/cross-sysroot/arm/boot/system/develop/lib -lroot -lgcc /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.8.2/crtend.o /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/boot/cross-sysroot/arm/boot/system/develop/lib/crtn.o    -Wl,-soname -Wl,libstdc++.so -o .libs/libstdc++.so
     13.libs/compatibility-atomic-c++0x.o: In function `std::atomic_flag::test_and_set(std::memory_order)':
     14/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj/arm-unknown-haiku/libstdc++-v3/include/bits/atomic_base.h:287: undefined reference to `__sync_val_compare_and_swap_1'
     15collect2: error: ld returned 1 exit status
     16make[5]: *** [libstdc++.la] Error 1
     17make[5]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj/arm-unknown-haiku/libstdc++-v3/src'
     18make[4]: *** [all-recursive] Error 1
     19make[4]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj/arm-unknown-haiku/libstdc++-v3/src'
     20make[3]: *** [all-recursive] Error 1
     21make[3]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj/arm-unknown-haiku/libstdc++-v3'
     22make[2]: *** [all] Error 2
     23make[2]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj/arm-unknown-haiku/libstdc++-v3'
     24make[1]: *** [all-target-libstdc++-v3] Error 2
     25make[1]: Leaving directory `/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/sources/gcc_bootstrap-4.8.2_2014_02_27-obj'
     26make: *** [all] Error 2
     27Command '['/bin/bash', '-c', '. /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-4.8.2_2014_02_27/wrapper-script']' returned non-zero exit status 2
     28}}}
    2129
    22 /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/bin/arm-unknown-haiku-gcc -c "/home/kallisti5/Code/haiku/src/system/boot/platform/generic/video_splash.cpp" -O -Wall -Wno-trigraphs -Wno-multichar -fno-strict-aliasing -fno-tree-vrp -Wno-array-bounds -mapcs-frame -nostdinc -Wno-deprecated -mtune=arm1176jzf-s -D_BOOT_MODE -fno-rtti -fno-strict-aliasing -fno-tree-vrp -Wno-array-bounds -mapcs-frame -nostdinc -Wno-deprecated -mtune=arm1176jzf-s -fno-strict-aliasing -fno-tree-vrp -Wno-array-bounds -mapcs-frame -finline -fno-builtin -ffreestanding -fno-exceptions -fno-use-cxa-atexit -fno-pic -D_KERNEL_MODE -DARCH_arm -DBOOT_ARCHIVE_IMAGE_OFFSET=192 -D__HAIKU_PRIMARY_PACKAGING_ARCH=\"arm\" -DHAIKU_DISTRO_COMPATIBILITY_DEFAULT -DHAIKU_INCLUDE_PATENTED_CODE=0 -DHAIKU_TARGET_PLATFORM_HAIKU -iquote /home/kallisti5/Code/haiku/build/user_config_headers -iquote /home/kallisti5/Code/haiku/build/config_headers -iquote /home/kallisti5/Code/haiku/src/system/boot/platform/generic -iquote /home/kallisti5/Code/haiku/generated.arm/objects/common/system/boot/platform/generic -iquote /home/kallisti5/Code/haiku/generated.arm/objects/linux/x86_64/common/system/boot/platform/generic -iquote /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/common/system/boot/platform/generic -I /home/kallisti5/Code/haiku/headers/private/. -I /home/kallisti5/Code/haiku/headers/private/kernel -I /home/kallisti5/Code/haiku/headers/private/libroot -I /home/kallisti5/Code/haiku/headers/private/shared -I /home/kallisti5/Code/haiku/headers/private/kernel/boot/platform/raspberrypi_arm -I /home/kallisti5/Code/haiku/headers/private/kernel/arch/arm -I /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/common/system/kernel -I /home/kallisti5/Code/haiku/headers/private/. -I /home/kallisti5/Code/haiku/headers/private/system -I /home/kallisti5/Code/haiku/headers/private/system/arch/arm -I /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.7.3/../../../../arm-unknown-haiku/include/c++/4.7.3 -I /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.7.3/../../../../arm-unknown-haiku/include/c++/4.7.3/arm-unknown-haiku -I /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.7.3/../../../../arm-unknown-haiku/include/c++/4.7.3/backward -I /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.7.3/../../../../arm-unknown-haiku/include/c++/4.7.3/ext -I /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.7.3/include -I /home/kallisti5/Code/haiku/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/4.7.3/include-fixed -I /home/kallisti5/Code/haiku/headers -I /home/kallisti5/Code/haiku/headers/posix -I /home/kallisti5/Code/haiku/headers/glibc -I /home/kallisti5/Code/haiku/headers/os -I /home/kallisti5/Code/haiku/headers/os/add-ons -I /home/kallisti5/Code/haiku/headers/os/add-ons/file_system -I /home/kallisti5/Code/haiku/headers/os/add-ons/graphics -I /home/kallisti5/Code/haiku/headers/os/add-ons/input_server -I /home/kallisti5/Code/haiku/headers/os/add-ons/registrar -I /home/kallisti5/Code/haiku/headers/os/add-ons/screen_saver -I /home/kallisti5/Code/haiku/headers/os/add-ons/tracker -I /home/kallisti5/Code/haiku/headers/os/app -I /home/kallisti5/Code/haiku/headers/os/device -I /home/kallisti5/Code/haiku/headers/os/drivers -I /home/kallisti5/Code/haiku/headers/os/game -I /home/kallisti5/Code/haiku/headers/os/interface -I /home/kallisti5/Code/haiku/headers/os/kernel -I /home/kallisti5/Code/haiku/headers/os/locale -I /home/kallisti5/Code/haiku/headers/os/media -I /home/kallisti5/Code/haiku/headers/os/mail -I /home/kallisti5/Code/haiku/headers/os/midi -I /home/kallisti5/Code/haiku/headers/os/midi2 -I /home/kallisti5/Code/haiku/headers/os/net -I /home/kallisti5/Code/haiku/headers/os/opengl -I /home/kallisti5/Code/haiku/headers/os/storage -I /home/kallisti5/Code/haiku/headers/os/support -I /home/kallisti5/Code/haiku/headers/os/translation -I /home/kallisti5/Code/haiku/headers/private/. -o "/home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_splash.o" ;
    2330
    24 ...failed C++ /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/system/boot/platform/generic/video_splash.o ...
    25 
    26 BUILD FAILURE:
    27 ...failed updating 1 target(s)...
    28 ...skipped 4 target(s)...
    29 ...updated 24 target(s)...
    30 }}}
     31This seems to be due to a missing built-in atomic for Haiku. When gcc arm attempts to build gcc arm under Haiku this happens.