On Wed, 2 Dec 2020 at 17:45, Richard Shaw <hobbes1...@gmail.com> wrote:
>
> On Wed, Dec 2, 2020 at 2:34 PM Elliott Sales de Andrade 
> <quantum.anal...@gmail.com> wrote:
>>
>>
>>
>> On Wed., Dec. 2, 2020, 11:08 a.m. Richard Shaw, <hobbes1...@gmail.com> wrote:
>>>
>>> I'm working on packaging chunkfs for fun and curiosity. It should make 
>>> backing up VMs or other large files with traditional backup compression and 
>>> deduplication methods (i.e. BackupPC) easier by breaking up the file into 
>>> chunks.
>>>
>>> It has a manual Makefile which I've patched to comply with the packaging 
>>> guidelines, but I've run into an issue.
>>>
>>> The build respects the required build flags:
>>>
>>> gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches 
>>> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
>>> -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
>>> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  
>>> -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection 
>>> -fcf-protection -DVERSION='"0.8"' -O2 -Wall   -c -o utils.o utils.c
>>> gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches 
>>> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
>>> -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
>>> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  
>>> -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection 
>>> -fcf-protection -DVERSION='"0.8"' -O2 -Wall   -c -o unchunkfs.o unchunkfs.c
>>> gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches 
>>> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
>>> -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
>>> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  
>>> -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection 
>>> -fcf-protection -DVERSION='"0.8"' -O2 -Wall   -c -o chunkfs.o chunkfs.c
>>> gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches 
>>> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
>>> -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
>>> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  
>>> -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection 
>>> -fcf-protection -s -lfuse  unchunkfs.o utils.o   -o unchunkfs
>>> gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches 
>>> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
>>> -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
>>> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  
>>> -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection 
>>> -fcf-protection -s -lfuse  chunkfs.o utils.o   -o chunkfs
>>
>>
>>
>> This appears to be applying CFLAGS, but not LDFLAGS.
>
>
> I tried adding LDFLAGS="%{build_ldflags}" but then I get:
>
> cc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches 
> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
> -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 
> -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection 
> -fcf-protection --Wl,-z,relro -Wl,--as-needed  -Wl,-z,now 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -s -lfuse  chunkfs.o utils.o   
> -o chunkfs
> make: *** Waiting for unfinished jobs....
> cc: error: unrecognized command-line option '--Wl,-z,relro'
>

Either your substitution or the makefile has a typo. The flag is
-Wl,-z,relro, single dash, just like the other ones.

Why not use %set_build_flags instead of manually setting *FLAGS?

> Thanks,
> Richard
>

--
Elliott
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to