This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug librt/23273] glibc 2.27 doesn't build on arm: .../librtld.os: In function `process_dl_debug': raise.c:(.text+0x4f0): undefined reference to `memcpy'


https://sourceware.org/bugzilla/show_bug.cgi?id=23273

Sergei Trofimovich <slyfox at inbox dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg, slyfox at inbox dot ru

--- Comment #1 from Sergei Trofimovich <slyfox at inbox dot ru> ---
I poked a bit at it and I think CFLAGS is not passed to .S files (but should).

The reproducer:

  $ ../glibc/configure --build=x86_64-pc-linux-gnu
--host=armv7a-hardfloat-linux-gnueabi CFLAGS="-pipe -march=armv7-a -O2
-mfpu=neon" --prefix=/usr
  $ make

The dtails:

On armv7 -mfpu=neon should disable ifunc selection and use neon memcpy()
unconditionally:

  $ cat glibc/sysdeps/arm/armv7/multiarch/memcpy_neon.S

  /* For __ARM_NEON__ this file defines memcpy.  */
  #ifndef __ARM_NEON__
  # define memcpy __memcpy_neon
  # undef libc_hidden_builtin_def
  # define libc_hidden_builtin_def(a)
  #endif

  #define MEMCPY_NEON
  #include "memcpy_impl.S"

Unfortunately __ARM_NEON__ is not set on .S files (CFLAGS is not propagated):

armv7a-hardfloat-linux-gnueabi-gcc ../sysdeps/arm/armv7/multiarch/memcpy_neon.S
-c  -U_FORTIFY_SOURCE   -I../include
-I/home/slyfox/dev/git/glibc-armv7a-neon/string 
-I/home/slyfox/dev/git/glibc-armv7a-neon  -I../sysdeps/unix/sysv/linux/arm 
-I../sysdeps/arm/nptl  -I../sysdeps/unix/sysv/linux/include
-I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread 
-I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv 
-I../sysdeps/unix/arm  -I../sysdeps/unix  -I../sysdeps/posix 
-I../sysdeps/arm/armv7/multiarch  -I../sysdeps/arm/armv7 
-I../sysdeps/arm/armv6t2  -I../sysdeps/arm/armv6  -I../sysdeps/arm/include
-I../sysdeps/arm  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/flt-32 
-I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I..
-I../libio -I.   -D_LIBC_REENTRANT -include
/home/slyfox/dev/git/glibc-armv7a-neon/libc-modules.h -DMODULE_NAME=libc
-include ../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -DASSEMBLER
  -Werror=undef -Wa,--noexecstack   -o
/home/slyfox/dev/git/glibc-armv7a-neon/string/memcpy_neon.o -MD -MP -MF
/home/slyfox/dev/git/glibc-armv7a-neon/string/memcpy_neon.o.dt -MT
/home/slyfox/dev/git/glibc-armv7a-neon/string/memcpy_neon.o

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]