Difference between "rpmbuild-ba" and "rpmbuild-bp"

Latest response

On RHEL8.1RC1, I compiled the 4.18.0-107.el8.x86_64 kernel using "rpmbuild -ba" and "rpmbuild -bp". The result of the iperf of the kernel compiled using the "rpmbuild -ba" method was found to be 21% lower than the result of "rpmbuild -bp".

The following is the compilation step of "rpmbuild -bp":
1.# rpm -ivh kernel-4.18.0-107.el8.src.rpm      
2.# cd /root/rpmbuild/SPEC      
3.# rpmbuild -bp kernel.spec      
4.# cd /root/rpmbuild/BUILD/kernel-4.18.0-107.el8/linux-4.18.0-107.el8.x86_64 
5.# cp /boot/config-4.18.0-107.el8.x86_64 .config    
6.# make oldconfig        
7.# make -j56        
8.# make        
9.# make modules_install      
10.# make install        
11.# reboot        

The following is the compilation step of "rpmbuild -ba":
1.# rpm -ivh kernel-4.18.0-107.el8.src.rpm          
2.# cd /root/rpmbuild/SPEC          
3.# rpmbuild -ba kernel.spec          
4.# cd /root/rpmbuild/RPMS/x86_64          
5.# rpm -ivh ./* --force              
6.# reboot            

The source code and config file generated by the two compilation methods are the same.
I want to know the difference between the two compilation methods, why the test results of iperf are different.

Thanks.

Responses