Description of problem: Installing the two packages arm-linux-gcc-gnu and glibc-arm-linux-gnu does not allow cross-compiling (even very simple things) out-of-the box arm-linux-gcc-gnu expects headers, libraries, etc. to be installed to /usr/arm-linux-gnueabi/<include, lib, etc.>, while the package glibc-arm-linux-gnu installs these to /usr/arm-linux/gnu/<include, lib, etc.> Version-Release number of selected component (if applicable): gcc-arm-linux-gnu -- 6.1.1-2.fc35 glibc-arm-linux-gnu -- 2.24-2.fc25 How reproducible: Easily Steps to Reproduce: 1. Download and install packages arm-linux-gcc-gnu and glibc-arm-linux-gnu from the standard Fedora repositories 2. Create a hello_world.c program (Be sure to include <stdio.h>) 3. Attempt to compile the hello_world.c program using "arm-linux-gnu-gcc hello_world.c" Actual results: GCC error saying that stdio.h cannot be found Expected results: An executable in the current directory compiled for 32-bit arm which would print something to the terminal if run Additional info: Linking the files provided by glibc-arm-linux-gnu to the location expected by arm-linux-gnu-cpp appears to work around this problem: "ln -s /usr/arm-linux-gnu/* /usr/arm-linux-gnueabi/"
By arm-linux-gcc-gnu, I presume you mean gcc-arm-linux-gnu? "GCC error saying that stdio.h cannot be found" Yes, that's exactly as intended. cross-gcc does not include any userspace library component because (a) not all arches will build with the same C library - some won't work with glibc and some won't work with uclibc - and (b) there's a massive multiplication problem: some arches would need multiple userspaces building (at least 6 for MIPS, for example). cross-gcc is intended primarily as an aid for kernel development.
This bug is still present in: glibc-arm-linux-gnu-devel-2.26-1.fc27.noarch If this is not a bug, I am trying to understand how you use /usr/arm-linux-gnu/ without doing: ln -v -s /usr/arm-linux-gnu/* /usr/arm-linux-gnueabi/ For example: arm-linux-gnu-gcc --sysroot=/usr/arm-linux-gnu does not work.
Even tho' cross-gcc was only intended for kernel development, with: dnf install gcc-arm-linux-gnu binutils-arm-linux-gnu glibc-arm-linux-gnu-devel ln -v -s /usr/arm-linux-gnu/* /usr/arm-linux-gnueabi/ And then getting busybox 1.28.1: make menuconfig #Go into Settings and set Build static binary #Set the cross compiler prefix to arm-linux-gnu- #These result in the .config file including: #CONFIG_STATIC=y #CONFIG_CROSS_COMPILER_PREFIX="arm-linux-gnu-" make generates a busybox that works fine on an ARM LineageOS (an Android Fork) smartphone. So glibc-arm-linux-gnu-devel is really close to being useful for things besides kernel development. If there is a way to use Fedora packages to let me compile busybox for Android besides having to run the: ln -v -s /usr/arm-linux-gnu/* /usr/arm-linux-gnueabi/ I would like to know. --sysroot=/usr/arm-linux-gnu doesn't work because gcc looks for a /usr/arm-linux-gnu/usr/include instead of the /usr/arm-linux-gnu/include that is there If this is still considered not a bug, I would like to be pointed to the fine manual I should be reading to figure out how to use glibc-arm-linux-gnu-devel Thank you.
Hitting the same issue in fc28.. Dave, what's the point of packaging an ARM glibc if your ARM gcc isn't working with it ? Other distros (ahem ... ubuntu... ahem) have that working fine...