[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using /usr/lib/gcc-cross/ for triples



On 06/27/2013 10:28 AM, Stephen Kelly wrote:
However, I still don't understand what scenario could lead to a problem. I'll guess, and you tell me if I'm right.

1) We have a arm-linux-gnueabihf installation of debian and we install the gcc package natively. This installs the C runtime files to /usr/lib/gcc/arm-linux-gnueabihf as it is a native installation. 2) We then install the gcc-arm-linux-gnueabihf cross-compiler package (why would we do that?). This installs the C runtime files to /usr/lib/gcc-cross/arm-linux-gnueabihf as it is a cross installation. 2.1) If the package instead installed the files to /usr/lib/gcc/, the packages would be in conflict. This is the problem. (Why would this be a problem? Is it not reasonable to expect a conflict when installing a cross-compiler for the current native platform?) 2.2) The C runtime files for gcc-arm-linux-gnueabihf actually differ between the cross-compiler and the native compiler. This is the problem, so they must be kept separate.

I guess only one of 2.1 and 2.2 is correct.

I got confirmation from xnox on IRC that 2.2 is correct.

He also refined the scenario a bit to having an amd64 host with a native amd64 compiler and a native i386 compiler and a i386 cross compiler. As the C runtime files for the native i386 compiler and the i386 cross compiler are different, they need to be in separate directories.

Similarly, one might have an arm64 host with armhf native and armhf cross compilers. The /usr/lib/gcc-cross/arm-linux-gnueabihf/ content is for the cross compiler, and the incompatible /usr/lib/gcc/arm-linux-gnueabihf/ for the native one.

Thanks,

Steve.


Reply to: