This is the mail archive of the mailing list for the binutils 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]

Problem with cross compiling Gold linker

Hi. Iâm tring to run Gold on ARM-based board. So I have to cross compile gold linker on x86 platform first. The toolchain I used is arm-linux-gnueabi-gcc/g++ 4.8.3 and the version of gold I was compiling is 2.23 (the version of gold is 0.1).
The first configuration I tried is:
./gold/configure --host=arm-linux-gnueabihf CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++
and the result of make shows a lot of warnings on using deprecated header files, such as:

In file included from gcc-4.8.3/arm-linux-gnueabi/arm-linux-gnueabi/include/c++/4.8.3/ext/hash_map
                        from gold/gold.h:85
                        from gold/
/gcc-4.8.3/arm-linux-gnueabi/arm-linux-gnueabi/include/c++/4.8.3/backward/backward_warning.h:32.:2 error: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. â

so I tried the second configuration:
./gold/configure --disable-werror --host=arm-linux-gnueabihf CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++
And the warning wonât terminate the compilation, but I got:

gold/ eror: redefinition of âstruct iovecâ

In file included from gcc-4.8.3/arm-linux-gnueabi/arm-linux-gnueabi/include/bits/fcntl.h:26:0
                        from gcc-4.8.3/arm-linux-gnueabi/arm-linux-gnueabi/include/fcntl.h:32
                        from gold/
gcc-4.8.3/arm-linux-gnueabi/arm-linux-gnueabi/include/bits/uio.h:43:8: error: previous definition of âstruct iovecâ

And I searched this problem online and tried the solution to add -DHAVE_SYS_UIO_H into CXXFLAGS:
./gold/configure --disable-werror --host=arm-linux-gnueabihf CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ CXXFLAGS=â-DHAVE_SYS_UIO_Hâ

But it doesnât work. I canât find any guides on building gold linker online, so would anyone kindly help me with this? thanks.


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