Bug 1011415 - Enable sysroot support
Summary: Enable sysroot support
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cross-gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Howells
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1011412
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-24 08:49 UTC by Marcin Juszkiewicz
Modified: 2014-06-17 13:29 UTC (History)
2 users (show)

Fixed In Version: cross-gcc-4.8.2-2
Clone Of:
Environment:
Last Closed: 2014-06-17 13:29:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
spec patch (346 bytes, patch)
2013-09-24 08:49 UTC, Marcin Juszkiewicz
no flags Details | Diff

Description Marcin Juszkiewicz 2013-09-24 08:49:41 UTC
Created attachment 802102 [details]
spec patch

Description of problem:

I am aware that cross-{binutils,gcc} are limited to be useful only for bootloader/kernel compilation as there is no userspace support in packages.

But they can also be used for userspace compilation when sysroot with libraries/headers is created.

Version-Release number of selected component (if applicable):

4.8.1-5.1

How reproducible:

always

Steps to Reproduce:
1. grab aarch64 system image
2. populate it with glibc-devel
3. mount at /mnt
4. aarch64-linux-gnu-gcc helloworld.c --sysroot /mnt -o hello-aarch64

Actual results:

"linker is not configured for sysroots"

Expected results:

links and gives proper binary

Additional info:

https://bugzilla.redhat.com/show_bug.cgi?id=1011412 was reported for cross-binutils.

Comment 1 David Howells 2014-03-28 09:24:37 UTC
+	--with-sysroot=/ \

This does not work correctly.  It mixes stuff from /usr/include (specifically gnu/stubs.h) into the foreign libgccs.

Also, this doesn't build on Fedora arm rawhide as this results in trying to access a non-existent file.

Comment 2 David Howells 2014-03-31 10:00:47 UTC
This should be dealt with in cross-gcc-4.8.2-2, which should be hitting updates-testing shortly.  Note that the default sysroot is /usr/<arch>/sys-root/ rather than / as the latter causes problems when compiling libgcc.


Note You need to log in before you can comment on or make changes to this bug.