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 build/20721] New: Cross-compiling glibc with CFLAGS option -march fails


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

            Bug ID: 20721
           Summary: Cross-compiling glibc with CFLAGS option -march fails
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: devnglee at gmail dot com
                CC: carlos at redhat dot com
  Target Milestone: ---

Created attachment 9583
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9583&action=edit
error message

Hi.

I'm trying to cross-compile glibc for an arm system.
After adding -march=armv7-a option to CFLAGS environment variable,
the build fails, with error messages such as :

"Error: selected processor does not support 'uxtb r1, r1' in ARM mode"

I've included the error messages as an attachment.

The following is the step I took:

1) export CC=arm-linux-gnueabi-gcc
2) export CFLAGS="-g -O2 -march=armv7-a"
3) CC=$CC ../glibc/configure --prefix=[some_directory_path]
--host=arm-linux-gnueabi
4) make

* Build environment
- OS : Ubuntu 16.04
- Kernel : 4.4.0-43-generic
- compiler : arm-linux-gnueabi-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) 5.4.0
20160609

Looking at the "ARM Architecture Reference Manual, ARMv7-A and ARMv7-R
edition", the instructions 'uxtb, ldrd, pld, uqsub8' are indeed supported in
ARM mode.

I assume that the strchr.S file mentioned above (under sysdeps/arm/armv6) is
intended to be compiled in Thumb mode, by NOT defining the NO_THUMB macro.

The directive ".thumb" should be added by codes in line 139~145 of
sysdeps/arm/sysdep.h.

However, when compiling the strchr.S file in question, the include path order
states that it looks into the directory sysdeps/unix/sysv/linux/arm before
sysdeps/arm. Which results in including sysdeps/unix/sysv/linux/arm/sysdep.h,
and not including sysdeps/arm/sysdep.h.

Thanks for reading my report.

-- 
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]