Bug 1327

Summary: mtd-utils compile failure due to lack of --sysroot in CFLAGS
Product: buildroot Reporter: Grant Edwards <grant.b.edwards>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: 2010.02   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Gentoo Linux Target: Atmel ARM9
Build: 2010.2
Attachments: Patch to correctly set CFLAGS when building mtd utils for use on target

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.