This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

FW: checking whether <arm-none-eabi-gcc accepts> -g... <no>


Dear Jeff and Corinna,

 I am trying to build two Newlib versions, latest master branch from git and release version newlib-2.1.0. My compiler is GCC ARM Embedded 4.7 update 4 downloaded from here: https://launchpad.net/gcc-arm-embedded/4.7/4.7-2014-q2-update . Configure and shell are supplied by mingw's msys, I am building on Windows 7 64 bit. My make tool is mingw32-make, version GNU Make 3.82.90.

My configure call from my makefile looks as follows (paths are stripped, TARGET is arm-none-eabi):

    ./configure --srcdir=$(realpath TARGET) --target=$(TARGET) --prefix=$(realpath TARGET)/install \
    --disable-nls \
    --disable-newlib-atexit-dynamic-alloc \
    --enable-newlib-global-atexit \
    --enable-newlib-reent-small \
    --disable-newlib-fvwrite-in-streamio \
    --disable-newlib-fseek-optimization \
    --disable-newlib-wide-orient \
    --enable-newlib-nano-malloc \
    --disable-newlib-unbuf-stream-opt \
    --enable-lite-exit \
    --enable-multilib \
    --enable-target-optspace \
    --enable-newlib-multithread \
    --disable-newlib-io-float \
    --disable-newlib-supplied-syscalls


The configure script successfully runs without critical errors, but I have noticed that configure fails the following test case for every architecture (multilib setup): "checking whether <arm-none-eabi-gcc> accepts -g... <no>"

Related part from Configure's log:

configure:3437: checking whether we are using GNU C
configure:3448: arm-none-eabi-gcc -E conftest.c
configure:3451: $? = 0
configure:3458: result: yes
configure:3467: checking whether arm-none-eabi-gcc accepts -g
configure:3487: arm-none-eabi-gcc -c -g  conftest.c >&5
configure:3487: $? = 0
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "newlib"
| #define PACKAGE_TARNAME "newlib"
| #define PACKAGE_VERSION "2.1.0"
| #define PACKAGE_STRING "newlib 2.1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3502: arm-none-eabi-gcc -c   conftest.c >&5
configure:3502: $? = 0
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "newlib"
| #define PACKAGE_TARNAME "newlib"
| #define PACKAGE_VERSION "2.1.0"
| #define PACKAGE_STRING "newlib 2.1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3518: arm-none-eabi-gcc -c -g  conftest.c >&5
configure:3518: $? = 0
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "newlib"
| #define PACKAGE_TARNAME "newlib"
| #define PACKAGE_VERSION "2.1.0"
| #define PACKAGE_STRING "newlib 2.1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3528: result: no


The first test "checking whether we are using GNU C" is only included to show that the compiler works in general...

I tried to manually set up conftest.c based on the failing test cases' log and calling the compiler with : "arm-none-eabi-gcc -c -g  conftest.c" successfully passes with result code 0, no warnings, no errors, object file exists, redirected output > creates an empty file. I also confirmed that the result code is 0. I tried to decipher how ac_fn_c_try_compile() in configure works but I am lost. If I would have to gess, I would say this test should/could fail, as I do not understand where this variable comes from: test -z "$ac_c_werror_flag" .

Could you please help me understand what could be the problem with my setup?

Please note that the following environment variables are defined by my makefile:

export CC := arm-none-eabi-gcc
export CXX := arm-none-eabi-g++
export CPP := arm-none-eabi-cpp

export AR := arm-none-eabi-ar
export AS := arm-none-eabi-as
export LD := arm-none-eabi-ld
export NM := arm-none-eabi-nm
export RANLIB := arm-none-eabi-ranlib
export STRIP := arm-none-eabi-strip
export OBJCOPY := arm-none-eabi-objcopy
export OBJDUMP := arm-none-eabi-objdump
export READELF := arm-none-eabi-readelf


Thank you in advance for your kind support!


Best regards

Tamas Kleiber 

Bosch Connected Devices and Solutions GmbH
Software Engineering (BCDS/ENG2)
Postfach 13 42
72703 Reutlingen
GERMANY
www.bosch-connectivity.com

Registered Office: Reutlingen, Registration Court: Amtsgericht Stuttgart, HRB 747319
Managing Directors: Dr. Thorsten Müller, Klaus Meder

_


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