[Pymilter] Adding -fPIE optoin when building sendmail srcrpm for RedHat 4

Stuart D. Gathman stuart at bmsi.com
Mon Jan 4 22:54:26 EST 2010


On Tue, 5 Jan 2010, Kyle Oetken wrote:

> %ifarch s390 s390
> %define _fpie -fPIE
> %else
> %define _fpie -fPIE
> %endif
> 
> 
> so that _fpie is always set to -fPIE.  I've also made sure that the enable_pie variable is set to "yes".  Any help you can provide would be appreciated.

You probably don't want to set sendmail to PIE in general.  Only libmilter 
is the problem.  Here is the patch I added to CentOS5 for sendmail-8.14.3 
on x86_64:

$ cat sendmail-8.14.3-x86_64.patch
diff -up ./libmilter/Makefile.m4.bms ./libmilter/Makefile.m4
--- ./libmilter/Makefile.m4.bms 2008-04-08 01:23:44.000000000 -0400
+++ ./libmilter/Makefile.m4     2009-08-21 16:13:53.000000000 -0400
@@ -10,6 +10,7 @@ SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSR
 PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
 
 bldPRODUCT_START(`library', `libmilter')
+define(`confOPTIMIZE', `-O2 -g -m64 -mtune=generic -fPIC')
 define(`bldINSTALLABLE', `true')
 define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
 APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.


More information about the Pymilter mailing list