We need to be able to modify or replace the build flags liblfds uses. For example, the Fedora/EL build system requires the ability to use hardening flags:
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
We need to be able to pass these when building liblfds
This is pretty important
Actually, I'm unclear if you want the CFLAGS/LDFLAGS from nunc-stans to be also be used for liblfds, or if you want to allow separate CFLAGS/LDFLAGS for liblfds. If the former, then I need to make a simple modification to the patch.
Replying to [comment:4 mreynolds]:
I'm not sure either. Certainly we want the hardening flags to be passed in via CFLAGS/LDFLAGS. In the case where there are conflicting flags, we would usually want to use the ones from our build, unless there is some feature of lfds that absolutely requires a particular compiler flag.
revision 0001-Ticket-48115-allow-passing-in-cflags-ldflags-to-libl.patch
Okay, So I changed the patch to pass the CFLAGS/LDFLAGS from the nunc-stans configure to liblfds, and I kept the new ENV vars(LFDS_CFLAGS/LFDS_LDFLAGS) that are exclusive to liblfds.
New patch attached.
Where are LFDS_CFLAGS and LFDS_LDFLAGS set?
Replying to [comment:8 rmeggins]:
In the configure command:
LFDS_CFLAGS='-mtune=generic -m64' CFLAGS='-pipe -fPIC -fexceptions -fstack-protector --param=ssp-buffer-size=4' CXXFLAGS='-pipe -fPIC -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' ../nunc-stans/configure --with-fhs --libdir=/usr/lib64
Replying to [comment:9 mreynolds]:
Replying to [comment:8 rmeggins]: Where are LFDS_CFLAGS and LFDS_LDFLAGS set? In the configure command: LFDS_CFLAGS='-mtune=generic -m64' CFLAGS='-pipe -fPIC -fexceptions -fstack-protector --param=ssp-buffer-size=4' CXXFLAGS='-pipe -fPIC -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' ../nunc-stans/configure --with-fhs --libdir=/usr/lib64
Do you have to specify LFDS_CFLAGS when using configure? Or is that only if you need to specify different flags when building lfds?
Replying to [comment:10 rmeggins]:
Replying to [comment:9 mreynolds]: Replying to [comment:8 rmeggins]: Where are LFDS_CFLAGS and LFDS_LDFLAGS set? In the configure command: LFDS_CFLAGS='-mtune=generic -m64' CFLAGS='-pipe -fPIC -fexceptions -fstack-protector --param=ssp-buffer-size=4' CXXFLAGS='-pipe -fPIC -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' ../nunc-stans/configure --with-fhs --libdir=/usr/lib64 Do you have to specify LFDS_CFLAGS when using configure? Or is that only if you need to specify different flags when building lfds?
Sorry I should have explained this better. So CFLAGS/LDFLAGS carry over to liblfds, then if you need something specific to liblfds you can use the LFDS_* vars.
Ok. Can you provide an example of what the output of "make" looks like when you build nunc-stans+lfds?
Replying to [comment:12 rmeggins]:
Attaching output...
make output with CFLAGS and LFDS_CFLAGS make-output
commit 430af16cc45b9e8435d63dca6a6c81d34ab83e0f Author: Mark Reynolds mreynolds@redhat.com Date: Mon Mar 9 17:29:33 2015 -0400
moved to https://fedorahosted.org/nunc-stans/ticket/17
Metadata Update from @mreynolds: - Issue assigned to mreynolds - Issue set to the milestone: N/A
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/1446
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.