Bug 1327 - mtd-utils compile failure due to lack of --sysroot in CFLAGS
Summary: mtd-utils compile failure due to lack of --sysroot in CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2010.02
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-16 20:32 UTC by Grant Edwards
Modified: 2010-03-26 14:33 UTC (History)
1 user (show)

See Also:
Host: Gentoo Linux
Target: Atmel ARM9
Build: 2010.2


Attachments
Patch to correctly set CFLAGS when building mtd utils for use on target (648 bytes, patch)
2010-03-16 20:33 UTC, Grant Edwards
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Edwards 2010-03-16 20:32:40 UTC
After updating from a Decmeber git snapshot to 2010, mtd-utils stopped
building.  Compiles were failing because the compiler couldn't find
include files such as stdint.h.  Examination of the build log revealed
that buildroot's mtd util's make file was passing proper target LDFLAGS
but wasn't passing target CFLAGS.

Thus there was no --sysroot option being passed to gcc, and it couldn't
find its include files.

The attached patch fixes the problem by passing the appropriate CFLAGS
values to make.
Comment 1 Grant Edwards 2010-03-16 20:33:30 UTC
Created attachment 1303 [details]
Patch to correctly set CFLAGS when building mtd utils for use on target
Comment 2 Grant Edwards 2010-03-26 13:35:05 UTC
It looks like my patch was a week late.  This commit should fix the
problem:

  http://git.buildroot.net/buildroot/commit/?id=d5bf5f967009733da99c55febacb3fb0be686cad

I'll pull the new mtd.mk file and try it.
Comment 3 Grant Edwards 2010-03-26 14:33:12 UTC
The current mtd.mk I grabbed from git works.  The commit I mentioned
does fix this bug.