Re: [linux-lvm] Does LVM2 support building with LTO enablement?

2019-05-14 Thread Gang He
Hi Zdenek,

The main motivation is to build the most opensuse rpms with LTO enablement, 
LVM2 is in the list.
I will try to compile the package with LTO enablement too.
Of course, if LVM2 does not support building with LTO enablement thoroughly, I 
think we need not to try.

Thanks
Gang

>>> On 2019/5/14 at 16:00, in message
<59ef89f8-9642-4455-cef0-450816eac...@redhat.com>, Zdenek Kabelac
 wrote:
> Dne 14. 05. 19 v 8:25 Gang He napsal(a):
>> Hello Guys,
>> 
>> Anybody touched this area?
>> 
>> Thanks
>> Gang
> 
> 
> Hi
> 
> I'll take a look - although it looks like the problem is possibly with libaio 
> ?
> 
> Is libaio usable with -flto ?
> 
> ATM libaio is mandatory for building lvm2.
> 
> BTW - why do you need to use this option - lvm2 isn't really CPU cycle 
> bounded 
> 
>   - if there is something slow it's typically some design issue - -flto will 
> not
> really improve things here...
> 
> Zdenek


___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Re: [linux-lvm] Does LVM2 support building with LTO enablement?

2019-05-14 Thread Zdenek Kabelac

Dne 14. 05. 19 v 8:25 Gang He napsal(a):

Hello Guys,

Anybody touched this area?

Thanks
Gang



Hi

I'll take a look - although it looks like the problem is possibly with libaio ?

Is libaio usable with -flto ?

ATM libaio is mandatory for building lvm2.

BTW - why do you need to use this option - lvm2 isn't really CPU cycle bounded 
 - if there is something slow it's typically some design issue - -flto will not

really improve things here...

Zdenek

___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Re: [linux-lvm] Does LVM2 support building with LTO enablement?

2019-05-14 Thread Gang He
Hello Guys,

Anybody touched this area? 

Thanks
Gang

>>> On 2019/5/10 at 11:00, in message
<5cd4e95002f900064...@prv1-mh.provo.novell.com>, "Gang He" 
wrote:
> Hello List,
> 
> Our build team wants to build LVM2 with LTO enablement, but looks failed.
> The error message likes,
> 
> [   30s] gcc -fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
> -D_FORTIFY_SOURCE=2 
> -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables 
> -fstack-clash-protection -flto=160 -g -fPIC  -L../libdm -L../lib 
> -L../libdaemon/client -L../daemons/dmeventd -Wl,-z,relro,-z,now -pie -fPIE 
> -Wl,--export-dynamic -o lvm command.o dumpconfig.o formats.o lvchange.o 
> lvconvert.o lvconvert_poll.o lvcreate.o lvdisplay.o lvextend.o lvmcmdline.o 
> lvmdiskscan.o lvreduce.o lvremove.o lvrename.o lvresize.o lvscan.o 
> polldaemon.o pvchange.o pvck.o pvcreate.o pvdisplay.o pvmove.o pvmove_poll.o 
> pvremove.o pvresize.o pvscan.o reporter.o segtypes.o tags.o toollib.o 
> vgcfgbackup.o vgcfgrestore.o vgchange.o vgck.o vgcreate.o vgconvert.o 
> vgdisplay.o vgexport.o vgextend.o vgimport.o vgmerge.o vgmknodes.o lvpoll.o 
> vgimportclone.o vgreduce.o vgremove.o vgrename.o vgscan.o vgsplit.o  lvm.o \
> [   30s]  -llvm-internal -ldevmapper-event -ldaemonclient  -ludev -ldl 
> -lblkid 
> -ldevmapper -laio -lreadline 
> [   30s] 
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: 
> /tmp/lvm.vKOJS8.ltrans0.ltrans.o: in function `_async_wait':
> [   30s] 
> /home/abuild/rpmbuild/BUILD/LVM2.2.02.180/tools/device/bcache.c:268: 
> undefined reference to `io_getevents'
> [   30s] 
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: 
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../lib64/libaio.so: undefined 
> reference to `io_cancel'
> [   30s] collect2: error: ld returned 1 exit status
> [   30s] make[1]: *** [Makefile:143: lvm] Error 1
> [   30s] make[1]: Leaving directory 
> '/home/abuild/rpmbuild/BUILD/LVM2.2.02.180/tools'
> [   30s] make[1]: *** Waiting for unfinished jobs
> [   30s] make[1]: Entering directory 
> '/home/abuild/rpmbuild/BUILD/LVM2.2.02.180/tools'
> [   30s] [CC] liblvm2cmd.so
> 
> About LTO information, you can look at the links as below,
> https://lists.opensuse.org/opensuse-factory/2019-04/msg00320.html 
> https://en.opensuse.org/openSUSE:LTO 
> 
> 
> Thanks
> Gang
> 
> 
> 
> ___
> linux-lvm mailing list
> linux-lvm@redhat.com 
> https://www.redhat.com/mailman/listinfo/linux-lvm 
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


___
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/