failed on riscv with: FAILED: unittests/CMakeFiles/test_forward_list_32.dir/forward_list.cpp.o /usr/bin/riscv64-unknown-linux-gnu-g++ -I/var/tmp/portage/dev-libs/cereal-1.3.1-r1/work/cereal-1.3.1/include -O2 -p ipe -m32 -Wall -Wextra -pedantic -Wshadow -Wold-style-cast -std=gnu++11 -MD -MT unittests/CMakeFiles/test_forward_lis t_32.dir/forward_list.cpp.o -MF unittests/CMakeFiles/test_forward_list_32.dir/forward_list.cpp.o.d -o unittests/CMake Files/test_forward_list_32.dir/forward_list.cpp.o -c /var/tmp/portage/dev-libs/cereal-1.3.1-r1/work/cereal-1.3.1/unit tests/forward_list.cpp riscv64-unknown-linux-gnu-g++: error: unrecognized command-line option ‘-m32’ if SKIP_PORTABILITY_TEST is OFF, all 32 bits tests requiring -m32 are enabled. riscv and arm gcc don't support -m32 or -m64. Reproducible: Always
Created attachment 765596 [details, diff] cereal-1.3.1-r1-fix-m32-flag.patch This should detect compiler support -m32 and disable 32bits tests
Created attachment 765597 [details] cereal-1.3.1-r1:20220222-104508.log
(In reply to Alex Fan from comment #1) > Created attachment 765596 [details, diff] [details, diff] > cereal-1.3.1-r1-fix-m32-flag.patch > > This should detect compiler support -m32 and disable 32bits tests Can you send this upstream?
(In reply to Sam James from comment #3) > Can you send this upstream? Sure, will do. In addition, there is another issue. riscv ld reports creating DT_TEXTREL in a PIE for all test objects. It is not harmful or related to this library, likely the same bug of https://bugs.gentoo.org/713082 example: shell# scanelf -qT test_portable_binary_archive test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0] test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0] test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0] test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0] test_portable_binary_archive: (memory/data?) [r_offset=0x0] r_type=0 in (optimized out?) [closest_prev_sym=0x0](In reply to Sam James from comment #3)
(In reply to Sam James from comment #3) > (In reply to Alex Fan from comment #1) > > Created attachment 765596 [details, diff] [details, diff] [details, diff] > > cereal-1.3.1-r1-fix-m32-flag.patch > > > > This should detect compiler support -m32 and disable 32bits tests > > Can you send this upstream? Oh sorry, there was an issue already where upstream suggests passing -DSKIP_PORTABILITY_TEST=ON