Bug 662

Summary: Build system makes a wrong cross-compiler assumption
Product: Sudo Reporter: Gustavo Zacarias <gustavo>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: low    
Priority: low    
Version: 1.8.10   
Hardware: PC   
OS: Linux   
Attachments: Don't use CPPFLAGS/PIEFLAGS for host tools
Don't use SSP_CFLAGS/PIE_CFLAGS for host tools

Description Gustavo Zacarias 2014-09-20 04:49:25 MDT
Created attachment 427 [details]
Don't use CPPFLAGS/PIEFLAGS for host tools

When cross-compiling sudo host compiler != cross compiler.
The host tools (mksigname/mksiglist) are built using CPPFLAGS/PIEFLAGS which are tested against the cross compiler, and since the host compiler can be a wildly different version this may make the build fail.
Example:
http://autobuild.buildroot.net/results/b10/b1091bd04ab988744548b74fb48c64bf291fed2f/build-end.log
Since the tools aren't part of sudo runtime we can just remove those compiler flags.
Comment 1 Gustavo Zacarias 2014-09-20 04:52:04 MDT
Created attachment 428 [details]
Don't use SSP_CFLAGS/PIE_CFLAGS for host tools
Comment 2 Gustavo Zacarias 2014-09-20 04:52:39 MDT
Coffee didn't take yet, it's early here, adjusted patch/comment since it's SSP_CFLAGS/PIE_CFLAGS. Sorry for the noise.
Comment 3 Todd C. Miller 2014-09-20 06:46:50 MDT
Thanks, that patch will be in sudo 1.8.11.
Comment 4 Todd C. Miller 2014-09-24 09:33:41 MDT
Fixed in sudo 1.8.11.