arm: libgcc: make -spec=sync-*.specs compatible with LTO [PR118642]
The arm-none-eabi port provides some alternative implementations of __sync_synchronize for different implementations of the architecture. These can be selected using one of -specs=sync-{none,dmb,cp15dmb}.specs. These specs fragments fail, however, when LTO is used because they unconditionally add a --defsym=__sync_synchronize=<implementation> to the linker arguments and that fails if libgcc is not added to the list of libraries. Fix this by only adding the defsym if libgcc will be passed to the linker. libgcc/ PR target/118642 * config/arm/sync-none.specs (link): Only add the defsym if libgcc will be used. * config/arm/sync-dmb.specs: Likewise. * config/arm/sync-cp15dmb.specs: Likewise.
This commit is contained in:
parent
54bdeca3c6
commit
0204dcf930
3 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
%rename link sync_sync_link
|
||||
|
||||
*link:
|
||||
--defsym=__sync_synchronize=__sync_synchronize_cp15dmb %(sync_sync_link)
|
||||
%{!nostdlib|lgcc: --defsym=__sync_synchronize=__sync_synchronize_cp15dmb} %(sync_sync_link)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%rename link sync_sync_link
|
||||
|
||||
*link:
|
||||
--defsym=__sync_synchronize=__sync_synchronize_dmb %(sync_sync_link)
|
||||
%{!nostdlib|lgcc: --defsym=__sync_synchronize=__sync_synchronize_dmb} %(sync_sync_link)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%rename link sync_sync_link
|
||||
|
||||
*link:
|
||||
--defsym=__sync_synchronize=__sync_synchronize_none %(sync_sync_link)
|
||||
%{!nostdlib|lgcc: --defsym=__sync_synchronize=__sync_synchronize_none} %(sync_sync_link)
|
||||
|
|
Loading…
Add table
Reference in a new issue