[Pymilter] Adding -fPIE optoin when building sendmail srcrpm for RedHat 4
Kyle Oetken
oetkenky at hotmail.com
Tue Jan 5 18:25:36 EST 2010
Stuart,
Thanks. I've got my milter working. For future reference I'm using RHEL 4 x86_64. I order to get the pymilter working I added the following line to the ./libmilter/Makefile.m4 file:
define(`confOPTIMIZE', `-O2 -g -m64 -fPIC')
I had to remove the mtune option in order to patch sendmail and recompile the src rpm successfully. Thanks for responding so promptly. I appreciate your work on the pymilter module.
Thanks,
Kyle Oetken
> Date: Mon, 4 Jan 2010 22:54:26 -0500
> From: stuart at bmsi.com
> To: oetkenky at hotmail.com
> CC: pymilter at bmsi.com
> Subject: Re: [Pymilter] Adding -fPIE optoin when building sendmail srcrpm for RedHat 4
>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gathman.org/pipermail/pymilter/attachments/20100105/39052ff2/attachment.html>
More information about the Pymilter
mailing list