Hi maxim

I want to compile odp for AMRMv6j with toolchain having gcc version 4.3.3,. I 
getting the following issue .



1. Compilation fails for ARMv6j with toolchain having gcc version 4.3.3:

   a. Undefined reference to __sync_fetch_and_sub_4/__sync_fetch_and_add_8/ 
__sync_lock_test_and_set_4/ __sync_fetch_and_sub_4/ __sync_fetch_and_sub_8 (all 
sync built-in functions). As the sync functions support was provided in gcc 
4.4+ versions
    b. Undefined reference to `__aeabi_read_tp' - This issues comes due to the 
presence of __thread specifier



Compilation logs:

[root@localhost ODP_MASTER]# make
Making all in platform
make[1]: Entering directory `/home/utils/ODP_MASTER/platform'
Making all in linux-generic
make[2]: Entering directory `/home/utils/ODP_MASTER/platform/linux-generic'
  CC       odp_barrier.lo
  CC       odp_buffer.lo
  CC       odp_buffer_pool.lo
  CC       odp_coremask.lo
  CC       odp_init.lo
  CC       odp_linux.lo
  CC       odp_packet.lo
  CC       odp_packet_flags.lo
  CC       odp_packet_io.lo
  CC       odp_packet_socket.lo
  CC       odp_queue.lo
  CC       odp_ring.lo
  CC       odp_rwlock.lo
  CC       odp_schedule.lo
  CC       odp_shared_memory.lo
  CC       odp_spinlock.lo
  CC       odp_system_info.lo
  CC       odp_thread.lo
  CC       odp_ticketlock.lo
  CC       odp_time.lo
  CC       odp_timer.lo
  CCLD     ../../lib/libodp.la
make[2]: Leaving directory `/home/utils/ODP_MASTER/platform/linux-generic'
make[2]: Entering directory `/home/utils/ODP_MASTER/platform'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/utils/ODP_MASTER/platform'
make[1]: Leaving directory `/home/utils/ODP_MASTER/platform'
Making all in test
make[1]: Entering directory `/home/utils/ODP_MASTER/test'
Making all in api_test
make[2]: Entering directory `/home/utils/ODP_MASTER/test/api_test'
  CC       odp_atomic_test.o
  CC       odp_common.o
  CCLD     odp_atomic
odp_atomic_test.o: In function `odp_atomic_fetch_add_int':
/home/utils/ODP_MASTER/test/api_test/../../include/odp_atomic.h:89: undefined 
reference to `__sync_fetch_and_add_4'
odp_atomic_test.o: In function `odp_atomic_fetch_add_u32':
/home/utils/ODP_MASTER/test/api_test/../../include/odp_atomic.h:202: undefined 
reference to `__sync_fetch_and_add_4'
odp_atomic_test.o: In function `odp_atomic_fetch_add_u64':
/home/utils/ODP_MASTER/test/api_test/../../include/odp_atomic.h:369: undefined 
reference to `__sync_fetch_and_add_8'
odp_atomic_test.o: In function `odp_atomic_fetch_sub_int':
/home/utils/ODP_MASTER/test/api_test/../../include/odp_atomic.h:102: undefined 
reference to `__sync_fetch_and_sub_4'
odp_atomic_test.o: In function `odp_atomic_fetch_sub_u32':
/home/utils/ODP_MASTER/test/api_test/../../include/odp_atomic.h:216: undefined 
reference to `__sync_fetch_and_sub_4'
odp_atomic_test.o: In function `odp_atomic_fetch_sub_u64':
/home/utils/ODP_MASTER/test/api_test/../../include/odp_atomic.h:421: undefined 
reference to `__sync_fetch_and_sub_8'
../../lib/.libs/libodp.a(odp_schedule.o): In function `odp_schedule_init_local':
/home/utils/ODP_MASTER/platform/linux-generic/odp_schedule.c:150: undefined 
reference to `__aeabi_read_tp'
/home/utils/ODP_MASTER/platform/linux-generic/odp_schedule.c:151: undefined 
reference to `__aeabi_read_tp'
/home/utils/ODP_MASTER/platform/linux-generic/odp_schedule.c:154: undefined 
reference to `__aeabi_read_tp'
/home/utils/ODP_MASTER/platform/linux-generic/odp_schedule.c:156: undefined 
reference to `__aeabi_read_tp'
/home/utils/ODP_MASTER/platform/linux-generic/odp_schedule.c:157: undefined 
reference to `__aeabi_read_tp'
../../lib/.libs/libodp.a(odp_schedule.o):/home/utils/ODP_MASTER/platform/linux-generic/odp_schedule.c:158:
 more undefined references to `__aeabi_read_tp' follow
../../lib/.libs/libodp.a(odp_spinlock.o): In function `odp_spinlock_lock':
/home/utils/ODP_MASTER/platform/linux-generic/odp_spinlock.c:19: undefined 
reference to `__sync_lock_test_and_set_4'
../../lib/.libs/libodp.a(odp_spinlock.o): In function `odp_spinlock_trylock':
/home/utils/ODP_MASTER/platform/linux-generic/odp_spinlock.c:27: undefined 
reference to `__sync_lock_test_and_set_4'
../../lib/.libs/libodp.a(odp_thread.o): In function `odp_thread_init_local':
/home/utils/ODP_MASTER/platform/linux-generic/odp_thread.c:40: undefined 
reference to `__aeabi_read_tp'
../../lib/.libs/libodp.a(odp_thread.o): In function `odp_atomic_fetch_add_int':
/home/utils/ODP_MASTER/platform/linux-generic/../../include/odp_atomic.h:89: 
undefined reference to `__sync_fetch_and_add_4'
../../lib/.libs/libodp.a(odp_thread.o): In function `odp_thread_id':
/home/utils/ODP_MASTER/platform/linux-generic/odp_thread.c:61: undefined 
reference to `__aeabi_read_tp'
../../lib/.libs/libodp.a(odp_thread.o): In function `odp_thread_core':
/home/utils/ODP_MASTER/platform/linux-generic/odp_thread.c:67: undefined 
reference to `__aeabi_read_tp'
../../lib/.libs/libodp.a(odp_ticketlock.o): In function 
`odp_atomic_fetch_add_u32':
/home/utils/ODP_MASTER/platform/linux-generic/../../include/odp_atomic.h:202: 
undefined reference to `__sync_fetch_and_add_4'
../../lib/.libs/libodp.a(odp_timer.o): In function `odp_atomic_fetch_sub_int':
/home/utils/ODP_MASTER/platform/linux-generic/../../include/odp_atomic.h:102: 
undefined reference to `__sync_fetch_and_sub_4'
../../lib/.libs/libodp.a(odp_timer.o): In function `odp_atomic_fetch_add_int':
/home/utils/ODP_MASTER/platform/linux-generic/../../include/odp_atomic.h:89: 
undefined reference to `__sync_fetch_and_add_4'
../../lib/.libs/libodp.a(odp_buffer_pool.o): In function `odp_buffer_alloc':
/home/utils/ODP_MASTER/platform/linux-generic/odp_buffer_pool.c:430: undefined 
reference to `__aeabi_read_tp'
/home/utils/ODP_MASTER/platform/linux-generic/odp_buffer_pool.c:440: undefined 
reference to `__aeabi_read_tp'
/home/utils/ODP_MASTER/platform/linux-generic/odp_buffer_pool.c:445: undefined 
reference to `__aeabi_read_tp'
../../lib/.libs/libodp.a(odp_buffer_pool.o): In function `odp_buffer_free':
/home/utils/ODP_MASTER/platform/linux-generic/odp_buffer_pool.c:472: undefined 
reference to `__aeabi_read_tp'
/home/utils/ODP_MASTER/platform/linux-generic/odp_buffer_pool.c:485: undefined 
reference to `__aeabi_read_tp'
collect2: ld returned 1 exit status
make[2]: *** [odp_atomic] Error 1
make[2]: Leaving directory `/home/utils/ODP_MASTER/test/api_test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/utils/ODP_MASTER/test'
make: *** [all-recursive] Error 1
[root@localhost ODP_MASTER]#

We have constraints moving to newer version of gcc so can you provide guidance 
in this respect.





Best regards

Mrityunjay

Software Engineer

Aricent Group


"DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus."
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to