Bug 21052

Summary: cross compiling glibc for arm.
Product: glibc Reporter: ataro+glibc_bug
Component: buildAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED INVALID    
Severity: normal CC: carlos
Priority: P2 Flags: fweimer: security-
Version: 2.24   
Target Milestone: ---   
Host: arm-linux-gnueabi Target:
Build: i686-pc-linux-gnu Last reconfirmed:
Attachments: configure command and config.log output.

Description ataro+glibc_bug 2017-01-15 19:10:00 UTC
Created attachment 9753 [details]
configure command and config.log output.

Hello,

When trying to compile glibc for arm using the attached configure command, it fails to compile because it try to pass the flag '--32' to the cross assembler which is not applicable to the cross assembler.

Regards,

Ataro.
Comment 1 Andreas Schwab 2017-01-15 21:34:44 UTC
You are missing a cross C++ compiler.  Since it is only needed for the testsuite this isn't a fatal error.
Comment 2 ataro+glibc_bug 2017-01-16 13:54:59 UTC
(In reply to Andreas Schwab from comment #1)
> You are missing a cross C++ compiler.  Since it is only needed for the
> testsuite this isn't a fatal error.

Sorry but I think that I do have a C++ compiler.

it is available in the gcc prefix directory: /root/andro_test/gcc-build/gcc/cpp

Regards,

Ataro.
Comment 3 Carlos O'Donell 2017-01-16 16:18:42 UTC
(In reply to ataro+glibc_bug from comment #2)
> (In reply to Andreas Schwab from comment #1)
> > You are missing a cross C++ compiler.  Since it is only needed for the
> > testsuite this isn't a fatal error.
> 
> Sorry but I think that I do have a C++ compiler.
> 
> it is available in the gcc prefix directory:
> /root/andro_test/gcc-build/gcc/cpp

Did you add this to the PATH?

Your config.log shows it's not found:

configure:2920: checking for arm-linux-gnueabi-g++
configure:2950: result: no

And the configure falls back to trying the system G++:

configure:2964: checking for g++
configure:2980: found /usr/bin/g++
configure:2991: result: g++

And the system g++ won't work because you're building cross.
Comment 4 ataro+glibc_bug 2017-01-16 16:42:35 UTC
(In reply to Carlos O'Donell from comment #3)
> (In reply to ataro+glibc_bug from comment #2)
> > (In reply to Andreas Schwab from comment #1)
> > > You are missing a cross C++ compiler.  Since it is only needed for the
> > > testsuite this isn't a fatal error.
> > 
> > Sorry but I think that I do have a C++ compiler.
> > 
> > it is available in the gcc prefix directory:
> > /root/andro_test/gcc-build/gcc/cpp
> 
> Did you add this to the PATH?
> 
> Your config.log shows it's not found:
> 
> configure:2920: checking for arm-linux-gnueabi-g++
> configure:2950: result: no
> 
> And the configure falls back to trying the system G++:
> 
> configure:2964: checking for g++
> configure:2980: found /usr/bin/g++
> configure:2991: result: g++
> 
> And the system g++ won't work because you're building cross.

I think I've added it to the $PATH but somehow the configure script failed to detect it. I also saw that it failed to find the nm cross compiled tool from binutils and I've to add it manually to the config.make file.

However, I've started a clean build of binutils, gcc and glibc all with the same --prefix directory and everything went all. (everything except that I was must to add the -O2 and the -I/root/androd_test/linux-3.4.57 flags to the $CFLAGS and $CPPFLAGS environment variables).

Thanks you for your replies.

Regards,

Ataro.