Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184711 - sys-fs/dosfstools: does not support cross compiling
Summary: sys-fs/dosfstools: does not support cross compiling
Status: RESOLVED DUPLICATE of bug 157785
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-09 10:45 UTC by Thibault Hild
Modified: 2007-07-09 18:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thibault Hild 2007-07-09 10:45:13 UTC
The make process is not autotools based and uses a makefile directly.
The makefile uses the gcc command as CC.
To make cross compiling work, I had to modify the Makefile this way:

--- Makefile.old        2007-07-08 06:59:03.000000000 +0200
+++ Makefile    2007-07-08 06:59:46.000000000 +0200
@@ -2,7 +2,7 @@
 # Makefile for dosfstools (mkdosfs and dosfsck)
 #
 
-CC = gcc
+CC := $(shell portageq envvar CHOST)-gcc
 CPP = $(CC) -E
 OPTFLAGS = -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
 WARNFLAGS = -Wall


Reproducible: Always

Steps to Reproduce:
Use the "Gentoo Cross Development Guide" (http://www.gentoo.org/proj/en/base/embedded/cross-development.xml)
When the cross-compile host is ready, do a:
xmerge dosfstools

During the compilation, you will see the host compiler used instead of the cross-compiler.
Actual Results:  
The dosfstools execs do not work on the target host.

Expected Results:  
The cross compiler should be used instead of the native gcc
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-07-09 18:26:16 UTC

*** This bug has been marked as a duplicate of bug 157785 ***